diff --git a/distrib/sparc64/xminiroot/Makefile b/distrib/sparc64/xminiroot/Makefile index 1a1948e10b74..31c648a543e4 100644 --- a/distrib/sparc64/xminiroot/Makefile +++ b/distrib/sparc64/xminiroot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2002/01/20 05:57:10 mrg Exp $ +# $NetBSD: Makefile,v 1.12 2002/01/21 13:46:26 mrg Exp $ TOP= ${.CURDIR}/.. MINIROOT= ${TOP}/../miniroot @@ -11,7 +11,8 @@ MINIROOT= ${TOP}/../miniroot HACKSRC= ${TOP}/../utils/libhack SRCROOT= ${TOP}/../.. WARNS=1 -KERN?= ${KERNOBJDIR}/INSTALL/netbsd +INSTKERN?= ${KERNOBJDIR}/INSTALL/netbsd +GENERICKERN?= ${KERNOBJDIR}/GENERIC/netbsd AUXDEPENDS= dot.profile disktab.preinstall termcap.mini \ dist/base_obsolete dist/comp_obsolete \ @@ -24,6 +25,8 @@ CBIN= ramdiskbin CSIZE?= 15360 IMAGE?= miniroot.fs +INSTALLSIZE?= 10240 +INSTALLIMAGE?= install.fs MDEC= ${DESTDIR}/usr/mdec MOUNT_POINT?= ${.OBJDIR}/mountpoint @@ -36,18 +39,20 @@ MDSETIMAGE?= mdsetimage MTREE?= mtree DISKTYPE?= miniroot -MAKEFSOPTS?= -o optimization=space,minfree=1,nsectors=1,ntracks=${CSIZE},bsize=16k,fsize=2k +MAKEFSOPTS?= -o optimization=space,minfree=1,bsize=16k,fsize=2k -all: netbsd.INSTALL ${IMAGE} +all: netbsd.INSTALL ${INSTALLIMAGE} ${IMAGE} -netbsd.INSTALL: ${KERN} ${IMAGE} - cp ${KERN} netbsd.tmp - ${MDSETIMAGE} -v netbsd.tmp ${IMAGE} +netbsd.gz: ${GENERICKERN} + gzip -9 < ${GENERICKERN} > netbsd.gz + +netbsd.INSTALL: ${INSTKERN} ${INSTALLIMAGE} + cp ${INSTKERN} netbsd.tmp + ${MDSETIMAGE} -v netbsd.tmp ${INSTALLIMAGE} ${STRIP} netbsd.tmp mv netbsd.tmp ${.TARGET} - -${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREECONF} ${LISTS} dot.profile +${INSTALLIMAGE} ${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREECONF} ${LISTS} dot.profile netbsd.gz @echo "Building miniroot tree..." -rm -rf ${MOUNT_POINT} mkdir -m 755 ${MOUNT_POINT} @@ -55,9 +60,17 @@ ${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREECONF} ${LISTS} dot.profile TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ KERNOBJDIR=${KERNOBJDIR} \ TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS} + @echo "Creating install image..." + -rm -f ${INSTALLIMAGE} + ${MAKEFS} -t ffs -B be -s ${INSTALLSIZE}b ${MAKEFSOPTS} \ + -o nsectors=1,ntracks=${INSTALLSIZE} \ + ${INSTALLIMAGE}.tmp ${MOUNT_POINT} && mv ${INSTALLIMAGE}.tmp ${INSTALLIMAGE} + @echo "Copying in GENERIC kernel..." + cp netbsd.gz ${MOUNT_POINT}/netbsd @echo "Creating miniroot image..." -rm -f ${IMAGE} ${MAKEFS} -t ffs -B be -s ${CSIZE}b ${MAKEFSOPTS} \ + -o nsectors=1,ntracks=${CSIZE} \ ${IMAGE}.tmp ${MOUNT_POINT} && mv ${IMAGE}.tmp ${IMAGE} # use sunlabel? #-disklabel -f ${.CURDIR}/disktab -rw ${VND_CDEV} ${DISKTYPE} diff --git a/distrib/sparc64/xminiroot/list.m4 b/distrib/sparc64/xminiroot/list.m4 index 694eb6e6f285..293bb69f08f2 100644 --- a/distrib/sparc64/xminiroot/list.m4 +++ b/distrib/sparc64/xminiroot/list.m4 @@ -1,4 +1,4 @@ -# $NetBSD: list.m4,v 1.4 2002/01/05 07:42:10 mrg Exp $ +# $NetBSD: list.m4,v 1.5 2002/01/21 13:46:27 mrg Exp $ # copy the crunched binary, link to it, and kill it COPY ${OBJDIR}/ramdiskbin ramdiskbin @@ -55,8 +55,6 @@ LINK ramdiskbin sbin/shutdown LINK ramdiskbin sbin/slattach LINK ramdiskbin sbin/swapctl LINK ramdiskbin sbin/umount -ifelse(MACHINE,i386, LINK ramdiskbin sbin/fdisk) -ifelse(MACHINE,i386, LINK ramdiskbin sbin/mbrlabel) LINK ramdiskbin usr/libexec/lfs_cleanerd LINK ramdiskbin usr/bin/chgrp LINK ramdiskbin usr/bin/ftp @@ -71,11 +69,10 @@ LINK ramdiskbin usr/bin/tip LINK ramdiskbin usr/mdec/installboot LINK ramdiskbin usr/sbin/chown LINK ramdiskbin usr/sbin/chroot -ifelse(MACHINE,i386, LINK ramdiskbin usr/sbin/bad144) -ifelse(MACHINE,sparc64, LINK ramdiskbin usr/sbin/chat) -ifelse(MACHINE,sparc64, LINK ramdiskbin usr/sbin/pppd) -ifelse(MACHINE,sparc64, LINK ramdiskbin usr/bin/getopt) -ifelse(MACHINE,sparc64, LINK ramdiskbin sbin/sysctl) +LINK ramdiskbin usr/sbin/chat +LINK ramdiskbin usr/sbin/pppd +LINK ramdiskbin usr/bin/getopt +LINK ramdiskbin sbin/sysctl SPECIAL /bin/rm ramdiskbin # various files that we need in /etc for the install @@ -97,16 +94,10 @@ SPECIAL cd dev; sh MAKEDEV ramdisk SPECIAL /bin/rm dev/MAKEDEV # we need the boot block in /usr/mdec + the arch specific extras -ifelse(MACHINE,sparc, COPY ${DESTDIR}/usr/mdec/boot usr/mdec/boot) -ifelse(MACHINE,sparc, COPY ${DESTDIR}/usr/mdec/bootxx usr/mdec/bootxx) -ifelse(MACHINE,sparc, COPY ${DESTDIR}/usr/mdec/binstall usr/mdec/binstall) -ifelse(MACHINE,sparc64, COPY ${DESTDIR}/usr/mdec/ofwboot usr/mdec/ofwboot) -ifelse(MACHINE,sparc64, COPY ${DESTDIR}/usr/mdec/ofwboot ofwboot) -ifelse(MACHINE,sparc64, COPY ${DESTDIR}/usr/mdec/bootblk usr/mdec/bootblk) -ifelse(MACHINE,sparc64, COPY ${DESTDIR}/usr/mdec/binstall usr/mdec/binstall) -ifelse(MACHINE,i386, COPY ${DESTDIR}/usr/mdec/biosboot.sym usr/mdec/biosboot.sym) -ifelse(MACHINE,i386, COPY ${DESTDIR}/usr/mdec/mbr usr/mdec/mbr) -ifelse(MACHINE,i386, COPY ${DESTDIR}/usr/mdec/mbr_bootsel usr/mdec/mbr_bootsel) +COPY ${DESTDIR}/usr/mdec/ofwboot usr/mdec/ofwboot +COPY ${DESTDIR}/usr/mdec/ofwboot ofwboot +COPY ${DESTDIR}/usr/mdec/bootblk usr/mdec/bootblk +COPY ${DESTDIR}/usr/mdec/binstall usr/mdec/binstall # and the common installation tools COPY termcap.mini usr/share/misc/termcap @@ -133,4 +124,4 @@ COPY ${OBJDIR}/dot.profile .profile #the lists of obsolete files used by sysinst SPECIAL sh ${CURDIR}/../../sets/makeobsolete -b -s ${CURDIR}/../../sets -t ./dist -ifelse(MACHINE,sparc64, SPECIAL gzip -9 < ${KERNOBJDIR}/GENERIC/netbsd > netbsd) +#SPECIAL gzip -9 < ${KERNOBJDIR}/GENERIC/netbsd > netbsd