diff options
author | xtraeme <xtraeme@pkgsrc.org> | 2004-04-26 17:28:58 +0000 |
---|---|---|
committer | xtraeme <xtraeme@pkgsrc.org> | 2004-04-26 17:28:58 +0000 |
commit | 5562c05f7256f7175e372abf14bc0a899373b0d7 (patch) | |
tree | 383f2b96ba58542bb6dda164fd31130ad86c404d /sysutils/mklivecd/files | |
parent | 56d6a536643477eef44e970059dcd61e165c13b1 (diff) | |
download | pkgsrc-5562c05f7256f7175e372abf14bc0a899373b0d7.tar.gz |
Update sysutils/mklivecd to 0.4 (Say hello to GNU GRUB+ISO9660 patch).
Changes:
o Added MKISOFS_ARGS option.
o mklivecd no longer uses NetBSD's Makefiles to create the
boot image, GNU GRUB with the ISO9660 patch is used instead.
With Grub's addition, mklivecd can now boot multiple kernels with
different configurations. Please read the MESSAGE to see the instructions.
mklivecd now should work in 1.6 systems (not tested).
Diffstat (limited to 'sysutils/mklivecd/files')
-rw-r--r-- | sysutils/mklivecd/files/Makefile.bootfloppy | 42 | ||||
-rw-r--r-- | sysutils/mklivecd/files/bootkern.mk | 23 | ||||
-rw-r--r-- | sysutils/mklivecd/files/mklivecd.8 | 11 | ||||
-rwxr-xr-x | sysutils/mklivecd/files/mklivecd.sh | 41 |
4 files changed, 32 insertions, 85 deletions
diff --git a/sysutils/mklivecd/files/Makefile.bootfloppy b/sysutils/mklivecd/files/Makefile.bootfloppy deleted file mode 100644 index ae2202b4592..00000000000 --- a/sysutils/mklivecd/files/Makefile.bootfloppy +++ /dev/null @@ -1,42 +0,0 @@ -# $NetBSD: Makefile.bootfloppy,v 1.2 2004/02/26 04:06:39 xtraeme Exp $ - -# Makefile snippet to create a set of USTAR floppies -# - -# -# Required variables: -# FLOPPYBASE Basename of floppies. Floppy number ${n} will -# be generated as ${FLOPPYBASE}${n}.fs -# FLOPPYKERNEL Kernel to copy -# -# Optional variables: -# FLOPPYKERNDIR ${FLOPPYKERNEL} is from ${.CURDIR}/../${FLOPPYKERNDIR} -# FLOPPY_BOOT Bootstrap to use. [${DESTDIR}/usr/mdec/boot] -# FLOPPYBOOTOPTIONS Options for installboot, eg -o console=com0 -# - -.include <bsd.own.mk> -.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" - -FLOPPYMAX?= 1 -FLOPPYSIZE?= 2880 -.if defined(FLOPPYSIZE) && (${FLOPPYSIZE} != 2880) -FLOPPYMETAFILE!= printf "USTAR.volsize.%o" ${FLOPPYSIZE} -.else -FLOPPYSIZE= 2880 -.endif -FLOPPYKERNDIR?= instkernel -FLOPPYSUFFIX?= .fs -MDEC= ${DESTDIR}/usr/mdec -FLOPPYINSTBOOT= "${TOOL_INSTALLBOOT} ${FLOPPYBOOTOPTIONS} -m${MACHINE} @IMAGE@ ${MDEC}/bootxx_ustarfs" -FLOPPYKERNOBJ!= cd ${FLOPPYKERNDIR} && ${PRINTOBJDIR} - -FLOPPY_BOOT?= ${MDEC}/boot -FLOPPY_NETBSD= ${FLOPPYKERNOBJ}/${FLOPPYKERNEL} -FLOPPYFILES= boot ${FLOPPYMETAFILE} netbsd - -FLOPPY_RELEASEDIR= @ISODIR@/stand - -.include "${DISTRIBDIR}/common/Makefile.tarfloppy" - -.include <bsd.prog.mk> diff --git a/sysutils/mklivecd/files/bootkern.mk b/sysutils/mklivecd/files/bootkern.mk deleted file mode 100644 index d9408d816a8..00000000000 --- a/sysutils/mklivecd/files/bootkern.mk +++ /dev/null @@ -1,23 +0,0 @@ -# $NetBSD: bootkern.mk,v 1.2 2004/02/26 04:06:39 xtraeme Exp $ - -# This Makefile builds a boot image on a 2.88M-sized image. -# -# Since NetBSD currently can't write 2.88M diskettes, it's only -# use is as a boot image for El Torito bootable CD-ROM images. -# -# To prepare a CD, do the following steps: -# 1) create a release(7) tree called NetBSD-1.3I -# 2) create NetBSD-1.3I/boot.i386/ and place boot.fs in that directory -# 3) do ``mkisofs -A "NetBSD ${version}" -b boot.i386/boot.fs -f \ -# -o i386-cd.img -r -T NetBSD-1.3I'' -# (you may omit '-f' if you're not using symlinks in the release tree) -# This should place the image in i386-cd.img, which can hopefully -# be used to burn a CD. - -FLOPPYBASE= cdlive-boot -FLOPPYPAD= 1 -FLOPPYSIZE= 5760 -FLOPPYKERNEL= netbsd -FLOPPYKERNDIR= ${.CURDIR}/@KERNEL_NAME@ - -.include "${.CURDIR}/Makefile.bootfloppy" diff --git a/sysutils/mklivecd/files/mklivecd.8 b/sysutils/mklivecd/files/mklivecd.8 index 34a047f5229..679983d926a 100644 --- a/sysutils/mklivecd/files/mklivecd.8 +++ b/sysutils/mklivecd/files/mklivecd.8 @@ -1,4 +1,4 @@ -.\" $NetBSD: mklivecd.8,v 1.5 2004/03/04 12:29:40 wiz Exp $ +.\" $NetBSD: mklivecd.8,v 1.6 2004/04/26 17:28:58 xtraeme Exp $ .\" .\" mklivecd - Build a NetBSD Live CD for i386 machines .\" Copyright (c) 2004 Juan RP <xtraeme@NetBSD.org> @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 3, 2004 +.Dd April 26, 2004 .Dt MKLIVECD 8 .Os .Sh NAME @@ -137,6 +137,13 @@ If set to then X11 sets and configuration files will be unpacked automatically. Defaults to .Sy no . +.It MKISOFS_ARGS +Arguments passed to +.Xr mkisofs 1 +when creating the +.Nx ISO image. +Defaults to +.Sy -nobak -J -R -v . .It CDRECORD_ARGS Arguments passed to .Xr cdrecord 1 diff --git a/sysutils/mklivecd/files/mklivecd.sh b/sysutils/mklivecd/files/mklivecd.sh index 8fea333806f..90d8b42fcdd 100755 --- a/sysutils/mklivecd/files/mklivecd.sh +++ b/sysutils/mklivecd/files/mklivecd.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: mklivecd.sh,v 1.6 2004/03/03 16:56:45 xtraeme Exp $ +# $NetBSD: mklivecd.sh,v 1.7 2004/04/26 17:28:58 xtraeme Exp $ # # Copyright (c) 2004 Juan RP <xtraeme@NetBSD.org> # All rights reserved. @@ -42,6 +42,11 @@ mntstat="$config_dir/mount.stat" MKISOFS="@PREFIX@/bin/mkisofs" CDRECORD="@PREFIX@/bin/cdrecord" +# +# Don't modify it! they are needed for booting grub +MKISOFS_FIXED_ARGS="-no-emul-boot -boot-load-size 30 -boot-info-table" +BOOTIMAGE="grub/stage2_eltorito" +GRUB_FILES="stage2_eltorito iso9660_stage1_5" trap "echo; showmsg \"Process cancelled!\"; bye 127" INT QUIT @@ -108,6 +113,7 @@ do_conf() # Miscellaneous options : ${ENABLE_X11:=no} + : ${MKISOFS_ARGS:=-J -R -nobak -v} : ${CDRECORD_ARGS:=-v} : ${BLANK_BEFORE_BURN:=no} : ${CDROM_DEVICE:=15,1,0} @@ -220,11 +226,6 @@ do_cdlive() showmsg "Kernel name: $KERNEL_NAME" echo sleep 2 - sed -e "s,@KERNEL_NAME@,${KERNEL_NAME}," \ - $SHAREDIR/bootkern.mk > $WORKDIR/Makefile - sed -e "s,@ISODIR@,${ISODIR},g" $SHAREDIR/Makefile.bootfloppy \ - > $WORKDIR/Makefile.bootfloppy - # if there's a kernel in ~/.mklivecd, use it, otherwise # use the default one located in SHAREDIR. if [ -s $config_dir/$BOOTKERN ]; then @@ -240,13 +241,17 @@ do_cdlive() cd $KERNEL_NAME make depend make COPTS="-Os" # Don't use additional flags - cd $WORKDIR - make USETOOLS=no COPTS= # Don't use tools/copts if [ $? -eq 0 ]; then - [ ! -d $ISODIR/stand ] && mkdir -p $ISODIR/stand - cp cdlive-boot1.fs $ISODIR/stand/cdlive-boot.fs - cp netbsd $ISODIR - make clean + [ ! -d $ISODIR/grub ] && mkdir -p $ISODIR/grub + for f in $GRUB_FILES + do + cp @PREFIX@/share/grub/@MACHINE_ARCH@-/$f $ISODIR/grub + if [ "$verbose_mode" = "on" ]; then + showmsg "Copying $f into $ISODIR/grub." + fi + done + cp $WORKDIR/$KERNEL_NAME/netbsd $ISODIR + make clean >/dev/null 2>&1 rm -rf $KERNEL_NAME echo showmsg "Build successful" @@ -263,7 +268,7 @@ do_cdlive() fi ;; base) - chown root:wheel $ISODIR/netbsd $ISODIR/stand/* + chown root:wheel $ISODIR/netbsd $ISODIR/grub/* for F in ${BASE_SETS} do @@ -336,7 +341,7 @@ do_cdlive() cat > $ISODIR/etc/rc.d/root <<_EOF_ #!/bin/sh # -# \$NetBSD: mklivecd.sh,v 1.6 2004/03/03 16:56:45 xtraeme Exp $ +# \$NetBSD: mklivecd.sh,v 1.7 2004/04/26 17:28:58 xtraeme Exp $ # # PROVIDE: root @@ -494,7 +499,7 @@ _EOF_ if [ "$cnt" -gt 1 ]; then cnt=$(($cnt - 1)) echo $cnt > $mntstat - showmsg "pkgsrc Still in use by mklivecd." + showmsg "pkgsrc still in use by mklivecd." else showmsg "Unmounting pkgsrc." umount -R $ISODIR/usr/pkgsrc @@ -522,7 +527,7 @@ _EOF_ rm -rf $ISODIR/$F fi done - showmsg "Done" + showmsg "Done." ;; iso) if [ ! -f $ISODIR/netbsd ]; then @@ -554,8 +559,8 @@ _EOF_ if [ ! -f $BASEDIR/$IMAGE_NAME.iso ]; then echo showmsg "Creating ISO CD9660 image" - $MKISOFS -nobak -b stand/cdlive-boot.fs \ - -o $BASEDIR/$IMAGE_NAME.iso -J -R $ISODIR + $MKISOFS $MKISOFS_FIXED_ARGS $MKISOFS_ARGS -b $BOOTIMAGE \ + -o $BASEDIR/$IMAGE_NAME.iso $ISODIR fi ;; |