Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/embedded/conf Use make_label_evbarm instead of...



details:   https://anonhg.NetBSD.org/src/rev/176e91e7f6da
branches:  trunk
changeset: 466891:176e91e7f6da
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Jan 05 16:41:07 2020 +0000

description:
Use make_label_evbarm instead of home grown

diffstat:

 distrib/utils/embedded/conf/rpi_inst.conf |  47 +-----------------------------
 1 files changed, 2 insertions(+), 45 deletions(-)

diffs (61 lines):

diff -r 0a0ab85641a9 -r 176e91e7f6da distrib/utils/embedded/conf/rpi_inst.conf
--- a/distrib/utils/embedded/conf/rpi_inst.conf Sun Jan 05 15:57:15 2020 +0000
+++ b/distrib/utils/embedded/conf/rpi_inst.conf Sun Jan 05 16:41:07 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rpi_inst.conf,v 1.13 2020/01/01 14:16:51 skrll Exp $
+# $NetBSD: rpi_inst.conf,v 1.14 2020/01/05 16:41:07 skrll Exp $
 # Raspberry Pi customization script used by mkimage
 #
 
@@ -19,50 +19,7 @@
 msdosid=12
 
 make_label() {
-       # compute all sizes in terms of sectors
-       local totalsize=$(( ${newsize} * 1024 * 2 / 512 ))
-
-       local swapsize=$(( ${swap} * 1024 ))
-       local bootsize=$(( ${boot} * 1024 ))
-
-       local bootoffset=$(( ${init} * 1024 ))
-       local swapoffset=$(( ${bootoffset} + ${bootsize} ))
-
-       local asize=$(( ${totalsize} - ${swapsize} - ${bootsize} - ${bootoffset} ))
-       local aoffset=$(( ${swapoffset} + ${swapsize} ))
-
-       local bps=512
-       local spt=32
-       local tpc=64
-       local spc=2048
-       local cylinders=$(( ${totalsize} / ${spc} ))
-
-       cat << EOF
-type: SCSI
-disk: STORAGE DEVICE
-label: fictitious
-flags: removable
-bytes/sector: ${bps}
-sectors/track: ${spt}
-tracks/cylinder: ${tpc}
-sectors/cylinder: ${spc}
-cylinders: ${cylinders}
-total sectors: ${totalsize}
-rpm: 3600
-interleave: 1
-trackskew: 0
-cylinderskew: 0
-headswitch: 0           # microseconds
-track-to-track seek: 0  # microseconds
-drivedata: 0 
-
-8 partitions:
-#     size         offset        fstype [fsize bsize cpg/sgs]
- a:   ${asize}     ${aoffset}    4.2BSD  ${fsize} ${bsize} 0  # 
- b:   ${swapsize}  ${swapoffset} swap                         #
- d:   ${totalsize} 0             unused      0     0          #
- e:   ${bootsize}  ${bootoffset} MSDOS                        #
-EOF
+       make_label_evbarm
 }
 
 customize() {



Home | Main Index | Thread Index | Old Index