Module Name: src
Committed By: jym
Date: Tue Jan 18 00:22:57 UTC 2011
Modified Files:
src/distrib/amd64: Makefile
src/distrib/amd64/instkernel: Makefile
src/etc/etc.amd64: Makefile.inc
Added Files:
src/distrib/amd64/kmod: Makefile
Log Message:
Build miniroot.kmod installation module for amd64. Hook GENERIC
with it.
See http://mail-index.netbsd.org/port-i386/2011/01/14/msg002247.html
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/amd64/Makefile
cvs rdiff -u -r1.3 -r1.4 src/distrib/amd64/instkernel/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/amd64/kmod/Makefile
cvs rdiff -u -r1.11 -r1.12 src/etc/etc.amd64/Makefile.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/amd64/Makefile
diff -u src/distrib/amd64/Makefile:1.4 src/distrib/amd64/Makefile:1.5
--- src/distrib/amd64/Makefile:1.4 Tue Mar 6 21:52:44 2007
+++ src/distrib/amd64/Makefile Tue Jan 18 00:22:56 2011
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2007/03/06 21:52:44 bouyer Exp $
+# $NetBSD: Makefile,v 1.5 2011/01/18 00:22:56 jym Exp $
SUBDIR=
SUBDIR+= ramdisks
SUBDIR+= .WAIT
SUBDIR+= instkernel
+SUBDIR+= kmod
SUBDIR+= .WAIT
SUBDIR+= cdroms
SUBDIR+= floppies
Index: src/distrib/amd64/instkernel/Makefile
diff -u src/distrib/amd64/instkernel/Makefile:1.3 src/distrib/amd64/instkernel/Makefile:1.4
--- src/distrib/amd64/instkernel/Makefile:1.3 Thu Nov 22 21:23:43 2007
+++ src/distrib/amd64/instkernel/Makefile Tue Jan 18 00:22:56 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2007/11/22 21:23:43 bouyer Exp $
+# $NetBSD: Makefile,v 1.4 2011/01/18 00:22:56 jym Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -13,10 +13,14 @@
.endfor
MDSETTARGETS= INSTALL ${RAMDISK} -
+MDSETTARGETS+= GENERIC ${RAMDISK} -
MDSETTARGETS+=INSTALL_XEN3_DOMU ${RAMDISK} -
MDSET_RELEASEDIR= binary/kernel
+# need symbols to load modules. don't actually want image inserted.
+MDSET_NOSTRIP.netbsd-GENERIC=
+MDSET_NOIMAGE.netbsd-GENERIC=
# do not strip Xen kernels, there's no space constraints here.
MDSET_NOSTRIP.netbsd-INSTALL_XEN3_DOMU=
MDSET_NOSYMBOLS.netbsd-INSTALL_XEN3_DOMU=
Index: src/etc/etc.amd64/Makefile.inc
diff -u src/etc/etc.amd64/Makefile.inc:1.11 src/etc/etc.amd64/Makefile.inc:1.12
--- src/etc/etc.amd64/Makefile.inc:1.11 Tue Mar 18 04:20:36 2008
+++ src/etc/etc.amd64/Makefile.inc Tue Jan 18 00:22:56 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2008/03/18 04:20:36 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.12 2011/01/18 00:22:56 jym Exp $
#
# etc.amd64/Makefile.inc -- amd64-specific etc Makefile targets
#
@@ -14,9 +14,11 @@
INSTALLATION_DIRS+= installation/cdrom
INSTALLATION_DIRS+= installation/floppy
INSTALLATION_DIRS+= installation/misc
+INSTALLATION_DIRS+= installation/miniroot
snap_md_post:
cd ${KERNSRCDIR}/arch/i386/stand/pxeboot && ${MAKE} release
${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom '*.iso'
${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/floppy '*.fs'
+ ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot '*.*'
${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc '*.*'
Added files:
Index: src/distrib/amd64/kmod/Makefile
diff -u /dev/null src/distrib/amd64/kmod/Makefile:1.1
--- /dev/null Tue Jan 18 00:22:57 2011
+++ src/distrib/amd64/kmod/Makefile Tue Jan 18 00:22:56 2011
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1 2011/01/18 00:22:56 jym Exp $
+
+.include <bsd.own.mk>
+.include "../../common/Makefile.distrib"
+
+MKMAN= no
+PROG= miniroot.kmod
+
+SRCMOD= ${DESTDIR}/stand/${MACHINE}/${DISTRIBVER}/modules/miniroot/miniroot.kmod
+DSTMOD= ${.OBJDIR}/miniroot.kmod
+RAMDISK= ramdisk
+RAMDISKDIR!= cd ${.CURDIR}/../ramdisks/${RAMDISK} && ${PRINTOBJDIR}
+RAMDISKFS= ${RAMDISKDIR}/${RAMDISK}.fs
+
+miniroot.kmod: ${RAMDISKFS} ${SRCMOD}
+ ${OBJCOPY} --add-section miniroot=${RAMDISKFS} \
+ --set-section-flags miniroot=alloc,contents,load,data \
+ ${SRCMOD} ${DSTMOD}.tmp
+ gzip -9nc < ${DSTMOD}.tmp > ${DSTMOD}
+ rm -f ${DSTMOD}.tmp
+
+.include <bsd.prog.mk>
+
+release: miniroot.kmod
+ ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
+ ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/miniroot/
+