Source-Changes-HG archive

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

[src/trunk]: src Build miniroot.kmod installation module for amd64. Hook GENERIC



details:   https://anonhg.NetBSD.org/src/rev/444e6a3adddb
branches:  trunk
changeset: 760970:444e6a3adddb
user:      jym <jym%NetBSD.org@localhost>
date:      Tue Jan 18 00:22:56 2011 +0000

description:
Build miniroot.kmod installation module for amd64. Hook GENERIC
with it.

See http://mail-index.netbsd.org/port-i386/2011/01/14/msg002247.html

diffstat:

 distrib/amd64/Makefile            |   3 ++-
 distrib/amd64/instkernel/Makefile |   6 +++++-
 distrib/amd64/kmod/Makefile       |  27 +++++++++++++++++++++++++++
 etc/etc.amd64/Makefile.inc        |   4 +++-
 4 files changed, 37 insertions(+), 3 deletions(-)

diffs (91 lines):

diff -r 323d223c878f -r 444e6a3adddb distrib/amd64/Makefile
--- a/distrib/amd64/Makefile    Tue Jan 18 00:19:28 2011 +0000
+++ b/distrib/amd64/Makefile    Tue Jan 18 00:22:56 2011 +0000
@@ -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
diff -r 323d223c878f -r 444e6a3adddb distrib/amd64/instkernel/Makefile
--- a/distrib/amd64/instkernel/Makefile Tue Jan 18 00:19:28 2011 +0000
+++ b/distrib/amd64/instkernel/Makefile Tue Jan 18 00:22:56 2011 +0000
@@ -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=
diff -r 323d223c878f -r 444e6a3adddb distrib/amd64/kmod/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/amd64/kmod/Makefile       Tue Jan 18 00:22:56 2011 +0000
@@ -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/
+
diff -r 323d223c878f -r 444e6a3adddb etc/etc.amd64/Makefile.inc
--- a/etc/etc.amd64/Makefile.inc        Tue Jan 18 00:19:28 2011 +0000
+++ b/etc/etc.amd64/Makefile.inc        Tue Jan 18 00:22:56 2011 +0000
@@ -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 '*.*'



Home | Main Index | Thread Index | Old Index