Port-sun2 archive

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

crunched miniroot (Re: CVS commit: src/distrib/sun2/miniroot)



I wrote on source-changes:

> > > Maybe sun2 should also switch to crunched binary on miniroot.
> > 
> > Yes, that would probably make sense.
> 
> I'll take a look it after sun3. (they are mostly same)

I've tried the attached diff and miniroot.fs is created successfully.
It's actually much smaller (~17MB vs ~3MB), but INSTALL kernel on tme
panics right after md_makerootwritable() in the install script:

---
Welcome to the NetBSD/sun2 39924 installation program.

[..snip message..]

Proceed with installation? [n] y
Cool!  Let's get to it...
Remounting root read-write...
Preserved 2111 pages of miniroot leaving 79808 pages of swap
panic: genfs_getpages: too many pages
syncing disks... panic: lockmgr: locking against myself

dumping to dev 7,1 offset 319476

---
(typed from tme screen, sorry if typo)

I'm not sure if this is MI problem or not, though.
(GENERIC kernel works fine even on multiuser mode,
 but GENERIC also panics in the install script)
---

Index: Makefile
===================================================================
RCS file: /cvsroot/src/distrib/sun2/miniroot/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile    31 Jul 2006 22:56:09 -0000      1.19
+++ Makefile    2 Aug 2006 12:13:10 -0000
@@ -6,7 +6,7 @@
 .include <bsd.kernobj.mk>
 
 IMAGE=         miniroot.fs
-IMAGESIZE=     18m
+IMAGESIZE=     4m
 MAKEFS_FLAGS=  -o minfree=0,optimization=space,density=8k
 
 KERNEL=                ${KERNOBJDIR}/INSTALL/netbsd
@@ -14,51 +14,26 @@
 WARNS=         1
 DBG=           -Os
 
+CRUNCHBIN=     instbin
+CRUNCHBIN_FLAGS= -d "${DBG}
+
 LISTS=         ${.CURDIR}/list
 MTREECONF=     ${.CURDIR}/mtree.conf
 IMAGEENDIAN=   be
 PARSELISTENV=  KERNEL=${KERNEL}
 MAKEDEVTARGETS=        std md0 cd0 st0 st1 sd0 sd1 sd2 xd0 xy0
-IMAGEDEPENDS=  ${KERNEL} \
+IMAGEDEPENDS=  ${CRUNCHBIN} \
+               ${KERNEL} \
                fstab install.md profile termcap \
-               ${DESTDIR}/bin/cat ${DESTDIR}/bin/chmod ${DESTDIR}/bin/cp \
-               ${DESTDIR}/bin/date ${DESTDIR}/bin/dd ${DESTDIR}/bin/df \
-               ${DESTDIR}/bin/ed ${DESTDIR}/bin/expr ${DESTDIR}/bin/hostname \
-               ${DESTDIR}/bin/kill ${DESTDIR}/bin/ln ${DESTDIR}/bin/ls \
-               ${DESTDIR}/bin/mkdir ${DESTDIR}/bin/mt ${DESTDIR}/bin/mv \
-               ${DESTDIR}/bin/pax ${DESTDIR}/bin/ps ${DESTDIR}/bin/pwd \
-               ${DESTDIR}/bin/rm ${DESTDIR}/bin/rmdir ${DESTDIR}/bin/sh \
-               ${DESTDIR}/bin/sleep ${DESTDIR}/bin/stty ${DESTDIR}/bin/sync \
-               ${DESTDIR}/bin/test  \
                ${DESTDIR}/dev/MAKEDEV ${DESTDIR}/dev/MAKEDEV.local \
                ${DESTDIR}/etc/disktab ${DESTDIR}/etc/group \
                ${DESTDIR}/etc/master.passwd ${DESTDIR}/etc/netconfig \
                ${DESTDIR}/etc/passwd ${DESTDIR}/etc/protocols \
                ${DESTDIR}/etc/pwd.db ${DESTDIR}/etc/services \
                ${DESTDIR}/etc/spwd.db \
-               ${DESTDIR}/sbin/dmesg ${DESTDIR}/sbin/edlabel \
-               ${DESTDIR}/sbin/fsck ${DESTDIR}/sbin/fsck_ffs \
-               ${DESTDIR}/sbin/ifconfig ${DESTDIR}/sbin/init \
-               ${DESTDIR}/sbin/mknod ${DESTDIR}/sbin/mount \
-               ${DESTDIR}/sbin/mount_cd9660 ${DESTDIR}/sbin/mount_ffs \
-               ${DESTDIR}/sbin/mount_kernfs ${DESTDIR}/sbin/mount_nfs \
-               ${DESTDIR}/sbin/newfs ${DESTDIR}/sbin/ping \
-               ${DESTDIR}/sbin/reboot ${DESTDIR}/sbin/restore \
-               ${DESTDIR}/sbin/route ${DESTDIR}/sbin/shutdown \
-               ${DESTDIR}/sbin/slattach ${DESTDIR}/sbin/swapctl \
-               ${DESTDIR}/sbin/sysctl ${DESTDIR}/sbin/umount \
-               ${DESTDIR}/usr/bin/chflags ${DESTDIR}/usr/bin/cksum \
-               ${DESTDIR}/usr/bin/cmp ${DESTDIR}/usr/bin/false \
-               ${DESTDIR}/usr/bin/ftp ${DESTDIR}/usr/bin/gzip \
-               ${DESTDIR}/usr/bin/less ${DESTDIR}/usr/bin/rsh \
-               ${DESTDIR}/usr/bin/sed ${DESTDIR}/usr/bin/sort \
-               ${DESTDIR}/usr/bin/tip ${DESTDIR}/usr/bin/true \
-               ${DESTDIR}/usr/bin/vi \
                ${DESTDIR}/usr/mdec/bootxx ${DESTDIR}/usr/mdec/bootyy \
                ${DESTDIR}/usr/mdec/netboot ${DESTDIR}/usr/mdec/tapeboot \
                ${DESTDIR}/usr/mdec/ufsboot \
-               ${DESTDIR}/usr/sbin/chown ${DESTDIR}/usr/sbin/installboot \
-               ${DESTDIR}/usr/sbin/rdate \
                ${DISTRIBDIR}/miniroot/install.sh \
                ${DISTRIBDIR}/miniroot/upgrade.sh \
                install.sub
@@ -67,11 +42,17 @@
                            ${DESTDIR}/usr/mdec/bootxx /ufsboot
 IMAGE_RELEASEDIR=      installation/miniroot
 
+# Use stubs to eliminate some large stuff from libc
+HACKSRC=       ${DISTRIBDIR}/utils/libhack
+.include       "${HACKSRC}/Makefile.inc"
+${CRUNCHBIN}:  libhack.o
+
 install.sub: ${DISTRIBDIR}/miniroot/install.sub
        sed -e "/^VERSION=/s/=.*/=${DISTRIBREV}/" < $? > $@
 
 CLEANFILES+= install.sub
 
+.include "${DISTRIBDIR}/common/Makefile.crunch"
 .include "${DISTRIBDIR}/common/Makefile.makedev"
 .include "${DISTRIBDIR}/common/Makefile.image"
 
Index: list
===================================================================
RCS file: /cvsroot/src/distrib/sun2/miniroot/list,v
retrieving revision 1.2
diff -u -r1.2 list
--- list        5 Jun 2002 11:22:05 -0000       1.2
+++ list        2 Aug 2006 12:13:10 -0000
@@ -51,103 +51,104 @@
 COPY   ${DISTRIBDIR}/miniroot/install.sh install               555
 COPY   ${DISTRIBDIR}/miniroot/upgrade.sh upgrade               555
 
+SRCDIRS        bin sbin usr.bin usr.sbin
+
 # miniroot files from /sbin:
 # Extras not in ../../miniroot/list:
 #  disklabel dmesg edlabel mount_kernfs restore 
 
-COPY   ${DESTDIR}/sbin/dmesg           sbin/dmesg              555
-COPY   ${DESTDIR}/sbin/edlabel         sbin/edlabel            555
-
-COPY   ${DESTDIR}/sbin/fsck            sbin/fsck               555
-COPY   ${DESTDIR}/sbin/fsck_ffs        sbin/fsck_ffs           555
-
-COPY   ${DESTDIR}/sbin/ifconfig        sbin/ifconfig           555
-COPY   ${DESTDIR}/sbin/init            sbin/init               555
-COPY   ${DESTDIR}/sbin/mknod           sbin/mknod              555
-
-COPY   ${DESTDIR}/sbin/mount           sbin/mount              555
-COPY   ${DESTDIR}/sbin/mount_cd9660    sbin/mount_cd9660       555
-COPY   ${DESTDIR}/sbin/mount_ffs       sbin/mount_ffs          555
-COPY   ${DESTDIR}/sbin/mount_kernfs    sbin/mount_kernfs       555
-COPY   ${DESTDIR}/sbin/mount_nfs       sbin/mount_nfs          555
-
-COPY   ${DESTDIR}/sbin/newfs           sbin/newfs              555
-COPY   ${DESTDIR}/sbin/ping            sbin/ping               555
-COPY   ${DESTDIR}/sbin/reboot          sbin/reboot             555
-LINK              sbin/reboot          sbin/halt
-
-COPY   ${DESTDIR}/sbin/restore         sbin/restore            555
-LINK              sbin/restore         sbin/rrestore
-
-COPY   ${DESTDIR}/sbin/route           sbin/route              555
-COPY   ${DESTDIR}/sbin/shutdown        sbin/shutdown           555
-COPY   ${DESTDIR}/sbin/slattach        sbin/slattach           555
-COPY   ${DESTDIR}/sbin/swapctl         sbin/swapctl            555
-COPY   ${DESTDIR}/sbin/sysctl          sbin/sysctl             555
-COPY   ${DESTDIR}/sbin/umount          sbin/umount             555
+PROG   sbin/disklabel
+PROG   sbin/dmesg
+PROG   sbin/edlabel
+
+PROG   sbin/fsck
+PROG   sbin/fsck_ffs
+
+PROG   sbin/ifconfig
+PROG   sbin/init
+PROG   sbin/mknod
+
+PROG   sbin/mount
+PROG   sbin/mount_cd9660
+PROG   sbin/mount_ffs
+PROG   sbin/mount_kernfs
+PROG   sbin/mount_nfs
+
+PROG   sbin/newfs      sbin/mount_mfs
+PROG   sbin/ping
+PROG   sbin/reboot     sbin/halt
+
+PROG   sbin/restore    sbin/rrestore
+
+PROG   sbin/route
+PROG   sbin/shutdown
+PROG   sbin/slattach
+PROG   sbin/swapctl
+PROG   sbin/sysctl
+PROG   sbin/umount
 
 # miniroot files from /bin:
 # Extras not in ../../miniroot/list:
 #  date ps rmdir
 
-COPY   ${DESTDIR}/bin/cat              bin/cat                 555
-COPY   ${DESTDIR}/bin/chmod            bin/chmod               555
-COPY   ${DESTDIR}/bin/cp               bin/cp                  555
-COPY   ${DESTDIR}/bin/date             bin/date                555
-COPY   ${DESTDIR}/bin/dd               bin/dd                  555
-COPY   ${DESTDIR}/bin/df               bin/df                  555
-COPY   ${DESTDIR}/bin/ed               bin/ed                  555
-COPY   ${DESTDIR}/bin/expr             bin/expr                555
-COPY   ${DESTDIR}/bin/hostname         bin/hostname            555
-COPY   ${DESTDIR}/bin/kill             bin/kill                555
-COPY   ${DESTDIR}/bin/ln               bin/ln                  555
-COPY   ${DESTDIR}/bin/ls               bin/ls                  555
-COPY   ${DESTDIR}/bin/mkdir            bin/mkdir               555
-COPY   ${DESTDIR}/bin/mt               bin/mt                  555
-COPY   ${DESTDIR}/bin/mv               bin/mv                  555
-COPY   ${DESTDIR}/bin/pax              bin/pax                 555
-COPY   ${DESTDIR}/bin/ps               bin/ps                  555
-COPY   ${DESTDIR}/bin/pwd              bin/pwd                 555
-COPY   ${DESTDIR}/bin/rm               bin/rm                  555
-COPY   ${DESTDIR}/bin/rmdir            bin/rmdir               555
-COPY   ${DESTDIR}/bin/sh               bin/sh                  555
-COPY   ${DESTDIR}/bin/sleep            bin/sleep               555
-COPY   ${DESTDIR}/bin/stty             bin/stty                555
-COPY   ${DESTDIR}/bin/sync             bin/sync                555
-
-COPY   ${DESTDIR}/bin/test             bin/test                555
-LINK              bin/test             bin/[
-
-# new, combined pax,tar,cpio
-LINK              bin/pax              usr/bin/tar
+PROG   bin/cat
+PROG   bin/chmod
+PROG   bin/cp
+PROG   bin/date
+PROG   bin/dd
+PROG   bin/df
+PROG   bin/ed
+PROG   bin/expr
+PROG   bin/hostname
+PROG   bin/kill
+PROG   bin/ln
+PROG   bin/ls
+PROG   bin/mkdir
+PROG   bin/mt
+PROG   bin/mv
+PROG   bin/pax usr/bin/tar     usr/bin/cpio
+PROG   bin/ps
+PROG   bin/pwd
+PROG   bin/rm
+PROG   bin/rmdir
+PROG   bin/sh
+PROG   bin/sleep
+PROG   bin/stty
+PROG   bin/sync
 
-# miniroot files from /usr:
-SYMLINK        /usr/lib usr/libexec
+PROG   bin/test        bin/[
 
 # usr.sbin:
-COPY   ${DESTDIR}/usr/sbin/installboot usr/sbin/installboot    555
-COPY   ${DESTDIR}/usr/sbin/chown       usr/sbin/chown          555
-COPY   ${DESTDIR}/usr/sbin/rdate       usr/sbin/rdate          555
+PROG   usr/sbin/installboot
+PROG   usr/sbin/chown  usr/bin/chgrp
+PROG   usr/sbin/rdate
 
 # usr.bin:
 
-LINK              usr/sbin/chown       usr/bin/chgrp
+PROG   usr/bin/chflags
+PROG   usr/bin/cksum
+PROG   usr/bin/cmp
+PROG   usr/bin/ftp
+PROG   usr/bin/less    usr/bin/more
+PROG   usr/bin/rsh
+PROG   usr/bin/sed
+PROG   usr/bin/tip
+PROG   usr/bin/vi
 
-COPY   ${DESTDIR}/usr/bin/chflags      usr/bin/chflags         555
-COPY   ${DESTDIR}/usr/bin/cksum        usr/bin/cksum           555
-COPY   ${DESTDIR}/usr/bin/cmp          usr/bin/cmp             555
-COPY   ${DESTDIR}/usr/bin/ftp          usr/bin/ftp             555
-COPY   ${DESTDIR}/usr/bin/less         usr/bin/less            555
-LINK              usr/bin/less         usr/bin/more
-COPY   ${DESTDIR}/usr/bin/rsh          usr/bin/rsh             555
-COPY   ${DESTDIR}/usr/bin/sed          usr/bin/sed             555
-COPY   ${DESTDIR}/usr/bin/tip          usr/bin/tip             555
-COPY   ${DESTDIR}/usr/bin/vi           usr/bin/vi              555
-
-# gnu/usr.bin:
-COPY   ${DESTDIR}/usr/bin/gzip         usr/bin/gzip            555
-LINK              usr/bin/gzip         usr/bin/gunzip
-LINK              usr/bin/gzip         usr/bin/gzcat
+PROG   usr/bin/gzip    usr/bin/gunzip  usr/bin/gzcat
 
 # install.md still uses sort
-COPY   ${DESTDIR}/usr/bin/sort         usr/bin/sort            555
+PROG   usr/bin/sort
+
+SPECIAL        less            srcdir  usr.bin/less/less
+SPECIAL        vi              srcdir  usr.bin/vi/build
+
+SPECIAL        ed              srcdir  distrib/utils/x_ed
+SPECIAL        ifconfig        srcdir  distrib/utils/x_ifconfig
+SPECIAL        ping            srcdir  distrib/utils/x_ping
+SPECIAL        route           srcdir  distrib/utils/x_route
+
+ARGVLN sh -sh
+
+LIBS   libhack.o
+LIBS   -lrmt -ledit -lutil -lcurses -ltermcap -lcrypt -ll -lm -lkvm -lbz2 -lz

---
Izumi Tsutsui



Home | Main Index | Thread Index | Old Index