Source-Changes-HG archive

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

[src/trunk]: src/distrib/x68k/floppies Reduce the size to fit with a single f...



details:   https://anonhg.NetBSD.org/src/rev/3d86e43027d5
branches:  trunk
changeset: 488111:3d86e43027d5
user:      minoura <minoura%NetBSD.org@localhost>
date:      Sun Jun 18 10:33:18 2000 +0000

description:
Reduce the size to fit with a single floppy.
Still too large by 20KB.  ...give up IPv6?

diffstat:

 distrib/x68k/floppies/bootfloppy-common/Makefile.inc  |    4 +-
 distrib/x68k/floppies/ramdisk.sysinst/Makefile        |   25 ++-
 distrib/x68k/floppies/ramdisk.sysinst/installboot.sh  |  111 ++++++++++++++++++
 distrib/x68k/floppies/ramdisk.sysinst/list            |   22 +--
 distrib/x68k/floppies/ramdisk.sysinst/ramdiskbin.conf |   18 +-
 5 files changed, 150 insertions(+), 30 deletions(-)

diffs (truncated from 322 to 300 lines):

diff -r f78b18f82b0c -r 3d86e43027d5 distrib/x68k/floppies/bootfloppy-common/Makefile.inc
--- a/distrib/x68k/floppies/bootfloppy-common/Makefile.inc      Sun Jun 18 10:30:35 2000 +0000
+++ b/distrib/x68k/floppies/bootfloppy-common/Makefile.inc      Sun Jun 18 10:33:18 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.14 2000/05/02 16:06:56 sjg Exp $
+#      $NetBSD: Makefile.inc,v 1.15 2000/06/18 10:33:18 minoura Exp $
 
 # TOP is assumed to be defined by Makefile including this one.
 
@@ -33,7 +33,7 @@
 
 CLEANFILES+=   ${KERNNAME} ${GZNAME} netbsd.tmp*
 
-all:   ${GZNAME}
+realall: ${GZNAME}
        dd if=/dev/zero of=${IMAGE} bs=100k count=12
        vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
        disklabel -rw ${VND_CDEV} ${DISKTYPE}
diff -r f78b18f82b0c -r 3d86e43027d5 distrib/x68k/floppies/ramdisk.sysinst/Makefile
--- a/distrib/x68k/floppies/ramdisk.sysinst/Makefile    Sun Jun 18 10:30:35 2000 +0000
+++ b/distrib/x68k/floppies/ramdisk.sysinst/Makefile    Sun Jun 18 10:33:18 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 2000/05/02 16:06:57 sjg Exp $
+#      $NetBSD: Makefile,v 1.5 2000/06/18 10:33:19 minoura Exp $
 
 TOP=           ${.CURDIR}/..
 WARNS=1
@@ -25,14 +25,18 @@
 CRUNCHCONF=    ${CBIN}.conf
 MTREE=         mtree.conf
 
-DISKTYPE=      floppy3
+RAMDISKSPT=    36
+RAMDISKCYLS=   80
+RAMDISKSIZE!=  expr ${RAMDISKSPC} \* ${RAMDISKCYLS} \* 2
 
-all: ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS}
-       dd if=/dev/zero of=${IMAGE} count=2880
-       vnconfig -v -c ${VND_CDEV} ${IMAGE} 512/18/2/80
+realall: ${IMAGE}
+
+${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREE} ${LISTS} passwd
+       dd if=/dev/zero of=${IMAGE} count=${RAMDISKSIZE}
+       vnconfig -v -c ${VND_CDEV} ${IMAGE} 512/${RAMDISKTPC}/2/${RAMDISKCYLS}
        newfs -B be -m 0 -o space -i 5120 -c 80 ${VND_RDEV}
        mount ${VND_DEV} ${MOUNT_POINT}
-       mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
+       mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -U
        TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
            KERNOBJDIR=${KERNOBJDIR} \
            TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
@@ -42,6 +46,12 @@
        umount ${MOUNT_POINT}
        vnconfig -u ${VND_CDEV}
 
+passwd:
+       -/bin/mkdir ${.OBJDIR}/etc
+       /bin/cp -pf ${.CURDIR}/../../../../etc/master.passwd ${.OBJDIR}/etc
+       pwd_mkdb -p -d ${.OBJDIR} ${.OBJDIR}/etc/master.passwd
+       /bin/cp -pf ${.OBJDIR}/etc/passwd ${.OBJDIR}
+
 unconfig:
        -umount -f ${MOUNT_POINT}
        -vnconfig -u ${VND_DEV}
@@ -60,7 +70,8 @@
 .include "${HACKSRC}/Makefile.inc"
 
 # turn off small gethostby* temporarily
-HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o
+HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o localeconv.o perror.o setlocale.o strerror.o strsignal.o utmp.o yplib.o
+DBG=   -Os
 
 # Used in building bootfloppy
 echoimage:
diff -r f78b18f82b0c -r 3d86e43027d5 distrib/x68k/floppies/ramdisk.sysinst/installboot.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/x68k/floppies/ramdisk.sysinst/installboot.sh      Sun Jun 18 10:33:18 2000 +0000
@@ -0,0 +1,111 @@
+#! /bin/sh
+#
+#      size-reduced installboot for the install floppy.
+#      supports only SCSI disks.
+#
+#      requires /bin/sh /bin/dd (x_dd) /bin/mkdir /bin/rm /bin/test
+#               /sbin/disklabel
+#
+#      $NetBSD: installboot.sh,v 1.3 2000/06/18 10:33:20 minoura Exp $
+#
+#
+#    originally from:
+#      do like as disklabel -B
+#
+#      usage: installboot <boot_file> <boot_device(raw)>
+#
+#      requires /bin/sh /bin/dd /bin/mkdir /bin/rm /bin/test
+#               /sbin/disklabel /usr/bin/sed /usr/bin/od
+#
+#      Public domain   --written by Yasha (ITOH Yasufumi)
+#
+#      NetBSD: installboot.sh,v 1.1 1998/09/01 20:02:34 itohy Exp
+
+usage='echo "usage: $0 [-nvf] /usr/mdec/xxboot /dev/rxx?a"     >&2; exit 1'
+
+blksz=1024
+nblock=8       # boot block in $blksz (8KB)
+rawpart=c
+
+PATH=/bin:/sbin:/usr/bin
+
+# parse options
+dowrite=true
+verbose=false
+force=false
+while (case "$1" in -*) ;; *) exit 1;; esac); do
+       case "$1" in
+       -[nvf]|-[nvf][nvf]|-[nvf][nvf][nvf]|-[nvf][nvf][nvf][nvf]) # enough?
+               case "$1" in *n*) dowrite=false;; esac
+               case "$1" in *v*) verbose=true;; esac
+               case "$1" in *f*) force=true;; esac
+               shift
+               ;;
+       *)
+               eval $usage;;
+       esac
+done
+
+case "$#" in
+2)     ;;
+*)     eval $usage;;
+esac
+
+boot="$1"
+rootdev="$2"
+temp=/tmp/installboot$$
+
+# report error early
+if test ! -f "$boot"; then
+       echo "$boot: file not found"    >&2
+       eval $usage
+fi
+
+# check device so as not to destroy non-BSD partitions
+if test -b "$rootdev"; then
+       echo "$rootdev: is a block special---specify a char special"
+       exit 1
+fi
+if test -c "$rootdev"; then
+       if $force; then :; else         # check if not  -f
+               case "$rootdev" in
+               /dev/rfd??)     # floppies---check disklabel later
+                       echo "$rootdev: floppies are not supported!"
+                       exit 1
+               /dev/r*[a-h])   # SCSI disks
+                       $verbose && echo "checking partition type..."
+                       rawdev="`echo \"$rootdev\" | sed 's/.$/'$rawpart'/'`"
+                       part="`echo \"$rootdev\" | sed 's/^.*\(.\)$/\1/'`"
+                       pinfo="`disklabel \"$rawdev\" | sed '1,/^$/d' |
+                               sed -n -e 's/^#.*/#/p' -e \"/^  $part/p\"`"
+                       $verbose && echo "$pinfo" | sed '/^#/d'
+                       case "$pinfo" in
+                       '#'*' '$part:*4.2BSD*)
+                               $verbose && echo "partition OK"
+                               ;;
+                       '#')    echo "$rootdev: no such partition"      >&2
+                               exit 1;;
+                       '')     echo "$rootdev: can't read disklabel"   >&2
+                               exit 1;;
+                       *)      echo "$rootdev: not a BSD filesystem"   >&2
+                               exit 1;;
+                       esac
+                       ;;
+               /*)             # ???
+                       echo "$rootdev: can't install boot to this device" >&2
+                       exit 1;;
+               *)
+                       echo "$rootdev: not in the absolute path"       >&2
+                       exit 1;;
+               esac
+       fi
+elif test ! -f "$rootdev"; then
+       echo "$rootdev: no such file or character special"      >&2
+       exit 1
+fi
+
+# write boot block
+$verbose && echo "writing $boot to $rootdev"
+cmd="cat $boot /dev/null dd bs=$blksz count=$nblock of=$rootdev"
+$verbose && echo "$cmd"
+if $dowrite; then $cmd; else :; fi
diff -r f78b18f82b0c -r 3d86e43027d5 distrib/x68k/floppies/ramdisk.sysinst/list
--- a/distrib/x68k/floppies/ramdisk.sysinst/list        Sun Jun 18 10:30:35 2000 +0000
+++ b/distrib/x68k/floppies/ramdisk.sysinst/list        Sun Jun 18 10:33:18 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: list,v 1.4 2000/06/07 20:49:02 thorpej Exp $
+#      $NetBSD: list,v 1.5 2000/06/18 10:33:20 minoura Exp $
 
 # copy the crunched binary, link to it, and kill it
 COPY   ${OBJDIR}/ramdiskbin            ramdiskbin
@@ -21,8 +21,6 @@
 LINK   ramdiskbin                      bin/sh
 LINK   ramdiskbin                      bin/stty
 LINK   ramdiskbin                      bin/sync
-LINK   ramdiskbin                      bin/test
-LINK   ramdiskbin                      bin/[
 LINK   ramdiskbin                      sbin/cd9660
 LINK   ramdiskbin                      sbin/disklabel
 LINK   ramdiskbin                      sbin/ffs
@@ -43,53 +41,51 @@
 LINK   ramdiskbin                      sbin/newfs
 LINK   ramdiskbin                      sbin/nfs
 LINK   ramdiskbin                      sbin/ping
+LINK   ramdiskbin                      sbin/ping6
 LINK   ramdiskbin                      sbin/reboot
 LINK   ramdiskbin                      sbin/restore
 LINK   ramdiskbin                      sbin/route
 LINK   ramdiskbin                      sbin/rrestore
+LINK   ramdiskbin                      sbin/rtsol
 LINK   ramdiskbin                      sbin/shutdown
 LINK   ramdiskbin                      sbin/slattach
 LINK   ramdiskbin                      sbin/swapctl
+LINK   ramdiskbin                      sbin/test
 LINK   ramdiskbin                      sbin/umount
 SYMLINK        /bin/cat                usr/bin/chgrp
 SYMLINK        /bin/cat                usr/bin/ftp
 SYMLINK        /bin/cat                usr/bin/gunzip
 SYMLINK        /bin/cat                usr/bin/gzcat
 SYMLINK        /bin/cat                usr/bin/gzip
-SYMLINK        /bin/cat                usr/bin/hexdump
 SYMLINK        /bin/cat                usr/bin/less
 SYMLINK        /bin/cat                usr/bin/more
-SYMLINK        /bin/cat                usr/bin/od
 SYMLINK        /bin/cat                usr/bin/sed
 SYMLINK        /bin/cat                usr/bin/tar
 SYMLINK        /bin/cat                usr/bin/tip
+SYMLINK        /bin/cat                usr/mdec/newdisk
 SYMLINK        /bin/cat                usr/sbin/chown
 SYMLINK        /bin/cat                usr/sbin/chroot
-SYMLINK /bin/cat               usr/sbin/memswitch
+SYMLINK        /bin/cat                usr/sbin/memswitch
 SPECIAL        /bin/rm ramdiskbin
 
 # various files that we need in /etc for the install
 COPY   ${CURDIR}/../../../../etc/group         etc/group
-COPY   ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
+COPY   ${OBJDIR}/passwd                        etc/passwd
 COPY   ${CURDIR}/../../../../etc/protocols     etc/protocols
 COPY   ${CURDIR}/../../../../etc/netconfig     etc/netconfig
 COPY   ${CURDIR}/../../../../etc/services      etc/services
 
-SPECIAL        pwd_mkdb -p -d ./ etc/master.passwd
-SPECIAL /bin/rm etc/spwd.db
-SPECIAL /bin/rm etc/pwd.db
-
 # copy the MAKEDEV script and make some devices
 COPY   ${CURDIR}/../../../../etc/etc.x68k/MAKEDEV      dev/MAKEDEV
 SPECIAL        cd dev; sh MAKEDEV ramdisk
 SPECIAL        /bin/rm dev/MAKEDEV
 
 # we need the boot blocks in /usr/mdec
-COPY   ${DESTDIR}/usr/mdec/installboot usr/mdec/installboot
+COPY   ${CURDIR}/installboot.sh        usr/mdec/installboot
+SPECIAL        /bin/chmod 555 usr/mdec/installboot
 COPY   ${DESTDIR}/usr/mdec/sdboot      usr/mdec/sdboot
 LINK   usr/mdec/sdboot                 usr/mdec/fdboot
 COPY   ${DESTDIR}/usr/mdec/mboot       usr/mdec/mboot
-COPY   ${DESTDIR}/usr/mdec/newdisk     usr/mdec/newdisk
 
 # and the common installation tools
 COPY   ${CURDIR}/termcap.vt            usr/share/misc/termcap
diff -r f78b18f82b0c -r 3d86e43027d5 distrib/x68k/floppies/ramdisk.sysinst/ramdiskbin.conf
--- a/distrib/x68k/floppies/ramdisk.sysinst/ramdiskbin.conf     Sun Jun 18 10:30:35 2000 +0000
+++ b/distrib/x68k/floppies/ramdisk.sysinst/ramdiskbin.conf     Sun Jun 18 10:33:18 2000 +0000
@@ -1,39 +1,41 @@
-#      $NetBSD: ramdiskbin.conf,v 1.2 1999/12/24 17:02:15 minoura Exp $
+#      $NetBSD: ramdiskbin.conf,v 1.3 2000/06/18 10:33:20 minoura Exp $
 #
 # ramdiskbin.conf - unified binary for the install ramdisk
 #
 
-srcdirs bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin
+srcdirs bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin sys/arch/x68k/stand
 
 progs cat chmod chown chroot cp dd df disklabel ed
-progs fsck fsck_ffs ftp gzip hexdump ifconfig init less
+progs fsck fsck_ffs ftp gzip ifconfig init less
 progs ln ls memswitch mkdir mknod mount mount_cd9660 mount_ffs mount_msdos
 progs mount_nfs mount_kernfs mt mv newfs ping pwd rcmd reboot restore rm
-progs route sed sh shutdown slattach stty swapctl sync pax test
-progs tip umount
+progs route sed sh shutdown slattach stty swapctl sync test pax
+progs tip umount ping6 rtsol
 progs sysinst
+progs newdisk
 
 special sysinst srcdir distrib/utils/sysinst/arch/x68k
 special init srcdir distrib/utils/init_s
 
-#special ftp srcdir distrib/utils/x_ftp
+special dd srcdir distrib/utils/x_dd
+special ftp srcdir distrib/utils/x_ftp



Home | Main Index | Thread Index | Old Index