Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
configuring live images
I have found it useful to configure at least parts of the contents of
live images produced with the 'live-image' target of build.sh. In
particular, I have found it useful to configure the exact MBR bootcode
and the installboot options. Consequently, I suggest (something like)
the attached patch as a means of allowing greater flexibility.
Any thoughts?
Cheers,
Brook
Index: distrib/amd64/installimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/amd64/installimage/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- distrib/amd64/installimage/Makefile 22 Jan 2012 03:53:29 -0000 1.1
+++ distrib/amd64/installimage/Makefile 16 Apr 2012 13:55:56 -0000
@@ -11,7 +11,7 @@
SECONDARY_BOOT= boot
SECONDARY_BOOT_ARG= # unnecessary
-USE_MBR= yes
+USE_MBR?= mbr
CLEANFILES+= boot.cfg
Index: distrib/amd64/liveimage/Makefile.liveimage
===================================================================
RCS file: /cvsroot/src/distrib/amd64/liveimage/Makefile.liveimage,v
retrieving revision 1.1
diff -u -r1.1 Makefile.liveimage
--- distrib/amd64/liveimage/Makefile.liveimage 22 Jan 2012 03:53:29 -0000
1.1
+++ distrib/amd64/liveimage/Makefile.liveimage 16 Apr 2012 13:55:57 -0000
@@ -8,6 +8,6 @@
SECONDARY_BOOT= boot
SECONDARY_BOOT_ARG= # unnecessary
-USE_MBR= yes
+USE_MBR?= mbr
.include "${.CURDIR}/../../../common/bootimage/Makefile.liveimage"
Index: distrib/common/bootimage/Makefile.bootimage
===================================================================
RCS file: /cvsroot/src/distrib/common/bootimage/Makefile.bootimage,v
retrieving revision 1.4
diff -u -r1.4 Makefile.bootimage
--- distrib/common/bootimage/Makefile.bootimage 9 Apr 2012 19:22:49 -0000
1.4
+++ distrib/common/bootimage/Makefile.bootimage 16 Apr 2012 13:55:57 -0000
@@ -38,8 +38,9 @@
# device name of target bootable disk specified in /etc/fstab
# (default: sd0)
# USE_MBR
-# set yes if target disk image requires MBR partition
-# (defautl: no)
+# set to the name of the MBR file (in /usr/mdec/)
+# if target disk image requires an MBR partition
+# (default: no)
# USE_SUNLABEL
# set yes if target disk image requires Sun's label
# (default: no)
@@ -92,6 +93,9 @@
# IMGMAKEFSOPTIONS
# options passed to makefs(8) to create root file system
# (default: -o bsize=16384,fsize=2048,density=8192)
+# BOOTOPTIONS
+# options passed to installboot(8), e.g., -o console=com0
+# (default: empty)
# PRIMARY_BOOT
# primary boot loader that should be installed into
# the target image via installboot(8)
@@ -286,7 +290,7 @@
${IMGMAKEFSOPTIONS} \
${WORKFS} ${WORKDIR}
.if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} == "no"
- ${TOOL_INSTALLBOOT} -vm ${MACHINE} ${WORKFS} \
+ ${TOOL_INSTALLBOOT} -vm ${MACHINE} ${BOOTOPTIONS} ${WORKFS} \
${WORKDIR}/usr/mdec/${PRIMARY_BOOT} ${SECONDARY_BOOT_ARG}
.endif
@echo done.
@@ -334,7 +338,7 @@
${TOOL_FDISK} -f -u \
-b ${MBRCYLINDERS}/${MBRHEADS}/${MBRSECTORS} \
-0 -a -s ${MBRNETBSD}/${FSOFFSET}/${BSDPARTSECTORS} \
- -i -c ${WORKDIR}/usr/mdec/mbr \
+ -i -c ${WORKDIR}/usr/mdec/${USE_MBR} \
-F ${WORKMBR}
${DD} if=${WORKMBR} count=${LABELSECTORS} | \
${CAT} - ${TARGETFS} > ${WORKIMG}
@@ -354,7 +358,7 @@
.endif
${TOOL_DISKLABEL} -R -F ${WORKIMG} ${WORKLABEL}
.if !empty(PRIMARY_BOOT) && ${INSTALLBOOT_AFTER_DISKLABEL} != "no"
- ${TOOL_INSTALLBOOT} -vm ${MACHINE} ${WORKIMG} \
+ ${TOOL_INSTALLBOOT} -vm ${MACHINE} ${BOOTOPTIONS} ${WORKIMG} \
${WORKDIR}/usr/mdec/${PRIMARY_BOOT}
.endif
mv ${WORKIMG} ${.TARGET}
Index: distrib/i386/installimage/Makefile
===================================================================
RCS file: /cvsroot/src/distrib/i386/installimage/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- distrib/i386/installimage/Makefile 22 Jan 2012 03:53:30 -0000 1.1
+++ distrib/i386/installimage/Makefile 16 Apr 2012 13:55:57 -0000
@@ -11,7 +11,7 @@
SECONDARY_BOOT= boot
SECONDARY_BOOT_ARG= # unnecessary
-USE_MBR= yes
+USE_MBR?= mbr
CLEANFILES+= boot.cfg
Index: distrib/i386/liveimage/Makefile.liveimage
===================================================================
RCS file: /cvsroot/src/distrib/i386/liveimage/Makefile.liveimage,v
retrieving revision 1.1
diff -u -r1.1 Makefile.liveimage
--- distrib/i386/liveimage/Makefile.liveimage 22 Jan 2012 03:53:30 -0000
1.1
+++ distrib/i386/liveimage/Makefile.liveimage 16 Apr 2012 13:55:57 -0000
@@ -8,6 +8,6 @@
SECONDARY_BOOT= boot
SECONDARY_BOOT_ARG= # unnecessary
-USE_MBR= yes
+USE_MBR?= mbr
.include "${.CURDIR}/../../../common/bootimage/Makefile.liveimage"
Home |
Main Index |
Thread Index |
Old Index