Source-Changes-HG archive

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

[src/trunk]: src/distrib/news68k - Build an INSTALL kernel on the separate di...



details:   https://anonhg.NetBSD.org/src/rev/b0a28c85bd4a
branches:  trunk
changeset: 487688:b0a28c85bd4a
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jun 11 11:35:18 2000 +0000

description:
- Build an INSTALL kernel on the separate directory.
- Install an INSTALL kernel and boot.fs image to RELEASEDIR.

diffstat:

 distrib/news68k/Makefile                         |   4 +-
 distrib/news68k/floppies/Makefile                |   6 ++-
 distrib/news68k/floppies/bootfloppy/Makefile     |  37 ++++++++++------------
 distrib/news68k/floppies/bootfloppy/list         |   4 --
 distrib/news68k/floppies/ramdisk-kernel/Makefile |  39 ++++++++++++++++++++++++
 distrib/news68k/floppies/ramdisk/Makefile        |   4 +-
 6 files changed, 66 insertions(+), 28 deletions(-)

diffs (171 lines):

diff -r 0d116c96ffbc -r b0a28c85bd4a distrib/news68k/Makefile
--- a/distrib/news68k/Makefile  Sun Jun 11 11:06:24 2000 +0000
+++ b/distrib/news68k/Makefile  Sun Jun 11 11:35:18 2000 +0000
@@ -1,5 +1,7 @@
-#      $NetBSD: Makefile,v 1.1 2000/06/08 13:55:46 tsutsui Exp $
+#      $NetBSD: Makefile,v 1.2 2000/06/11 11:35:18 tsutsui Exp $
 
 SUBDIR= floppies
 
+TARGETS+=      release
+
 .include <bsd.subdir.mk>
diff -r 0d116c96ffbc -r b0a28c85bd4a distrib/news68k/floppies/Makefile
--- a/distrib/news68k/floppies/Makefile Sun Jun 11 11:06:24 2000 +0000
+++ b/distrib/news68k/floppies/Makefile Sun Jun 11 11:35:18 2000 +0000
@@ -1,5 +1,7 @@
-#      $NetBSD: Makefile,v 1.1 1999/12/09 14:58:59 tsutsui Exp $
+#      $NetBSD: Makefile,v 1.2 2000/06/11 11:35:20 tsutsui Exp $
 
-SUBDIR=        ramdisk bootfloppy
+SUBDIR=        ramdisk ramdisk-kernel bootfloppy
+
+TARGETS+=      release
 
 .include <bsd.subdir.mk>
diff -r 0d116c96ffbc -r b0a28c85bd4a distrib/news68k/floppies/bootfloppy/Makefile
--- a/distrib/news68k/floppies/bootfloppy/Makefile      Sun Jun 11 11:06:24 2000 +0000
+++ b/distrib/news68k/floppies/bootfloppy/Makefile      Sun Jun 11 11:35:18 2000 +0000
@@ -1,12 +1,14 @@
-#      $NetBSD: Makefile,v 1.3 2000/06/10 02:50:34 tsutsui Exp $
+#      $NetBSD: Makefile,v 1.4 2000/06/11 11:35:21 tsutsui Exp $
 
 TOP=           ${.CURDIR}/..
 
 .include "${TOP}/Makefile.inc"
-.include <bsd.kernobj.mk>
 
 IMAGE=         boot.fs
-KERN=          ${KERNOBJDIR}/INSTALL/netbsd
+.if !make(print-objdir)
+KERNDIR!=      cd ${.CURDIR}/../ramdisk-kernel && ${MAKE} print-objdir
+.endif
+KERN=          ${KERNDIR}/netbsd.INSTALL.gz
 
 MOUNT_POINT?=  /mnt
 VND?=          vnd0
@@ -20,11 +22,6 @@
 KERN?=         netbsd-xxx
 MDEC=          ${DESTDIR}/usr/mdec
 
-LISTS=         ${.CURDIR}/list
-RAMDISK!=      cd $(.CURDIR)/../ramdisk/; \
-                   printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" | \
-                   ${MAKE} -s -f-
-
 DISKTYPE=      floppy
 
 # Some reasonable values for the -i parameter to newfs are:
@@ -34,19 +31,14 @@
 # 65536                1407k,  29 inodes free
 INO_BYTES?=    65536
 
-CLEANFILES+=   netbsd.ram.gz netbsd.tmp
-
-all:   netbsd.ram.gz
+all:   ${KERN}
        dd if=/dev/zero of=${IMAGE} bs=1440k count=1
-       # vnconfig -v -c ${VND_CDEV} ${IMAGE}
        vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE}
        disklabel -rw ${VND_CDEV} ${DISKTYPE}
        newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 \
            -f 1024 -b 8192 ${VND_RDEV}
        mount ${VND_DEV} ${MOUNT_POINT}
-       TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
-           KERNOBJDIR=${KERNOBJDIR} \
-           TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS}
+       cp ${KERN} ${MOUNT_POINT}/netbsd
        @echo ""
        @df -i ${MOUNT_POINT}
        @echo ""
@@ -62,11 +54,16 @@
        -umount -f ${MOUNT_POINT}
        -vnconfig -u ${VND_DEV}
 
-netbsd.ram.gz: ${KERN} ${RAMDISK}
-       cp ${KERN} netbsd.tmp
-       mdsetimage -v netbsd.tmp ${RAMDISK}
-       gzip -9 netbsd.tmp
-       mv netbsd.tmp.gz ${.TARGET}
+.ifndef RELEASEDIR
+release:
+       @echo set RELEASEDIR first!
+       @false
+.else
+release:
+       -mkdir -p ${RELEASEDIR}/installation/floppies
+       cp -p ${IMAGE} ${RELEASEDIR}/installation/floppies
+       gzip -c -9 ${IMAGE} > ${RELEASEDIR}/installation/floppies/${IMAGE}.gz
+.endif
 
 clean cleandir distclean:
        rm -f *.core ${IMAGE} ${CLEANFILES}
diff -r 0d116c96ffbc -r b0a28c85bd4a distrib/news68k/floppies/bootfloppy/list
--- a/distrib/news68k/floppies/bootfloppy/list  Sun Jun 11 11:06:24 2000 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-#      $NetBSD: list,v 1.1 1999/12/09 14:59:01 tsutsui Exp $
-
-# copy the kernel
-COPY   ${OBJDIR}/netbsd.ram.gz netbsd
diff -r 0d116c96ffbc -r b0a28c85bd4a distrib/news68k/floppies/ramdisk-kernel/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/news68k/floppies/ramdisk-kernel/Makefile  Sun Jun 11 11:35:18 2000 +0000
@@ -0,0 +1,39 @@
+#      $NetBSD: Makefile,v 1.1 2000/06/11 11:35:20 tsutsui Exp $
+
+TOP=           ${.CURDIR}/..
+
+.include "${TOP}/Makefile.inc"
+.include <bsd.kernobj.mk>
+
+KERN=          ${KERNOBJDIR}/INSTALL/netbsd
+.if !make(print-objdir)
+RAMDISKDIR!=   cd ${.CURDIR}/../ramdisk && ${MAKE} print-objdir
+.endif
+RAMDISK=       ${RAMDISKDIR}/ramdisk.fs
+KERNEL=                netbsd.INSTALL.gz
+
+CLEANFILES+=   ${KERNEL} netbsd.tmp netbsd.tmp.gz
+
+all:   ${KERNEL}
+
+${KERNEL}: ${KERN} ${RAMDISK}
+       cp ${KERN} netbsd.tmp
+       mdsetimage -v netbsd.tmp ${RAMDISK}
+       gzip -9 netbsd.tmp
+       mv netbsd.tmp.gz ${.TARGET}
+
+.ifndef RELEASEDIR
+release:
+       @echo set RELEASEDIR first!
+       @false
+.else
+release:
+       -mkdir -p ${RELEASEDIR}/binary/kernel
+       cp -p ${KERNEL} ${RELEASEDIR}/binary/kernel
+.endif
+
+clean cleandir distclean:
+       rm -f *.core ${CLEANFILES}
+
+.include <bsd.obj.mk>
+.include <bsd.subdir.mk>
diff -r 0d116c96ffbc -r b0a28c85bd4a distrib/news68k/floppies/ramdisk/Makefile
--- a/distrib/news68k/floppies/ramdisk/Makefile Sun Jun 11 11:06:24 2000 +0000
+++ b/distrib/news68k/floppies/ramdisk/Makefile Sun Jun 11 11:35:18 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.7 2000/06/10 02:50:34 tsutsui Exp $
+#      $NetBSD: Makefile,v 1.8 2000/06/11 11:35:20 tsutsui Exp $
 
 TOP=           ${.CURDIR}/..
 
@@ -57,6 +57,8 @@
 # turn off small gethostby* temporarily
 HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o setlocale.o yplib.o
 
+release:
+
 clean cleandir distclean:
        rm -f ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache
        rm -f *.core *.o *.cro *.c



Home | Main Index | Thread Index | Old Index