pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Update sysutils/mklivecd to 0.4 (Say hello to GNU GRUB...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2857bdc628d6
branches: trunk
changeset: 474231:2857bdc628d6
user: xtraeme <xtraeme%pkgsrc.org@localhost>
date: Mon Apr 26 17:28:58 2004 +0000
description:
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:
doc/CHANGES | 3 +-
sysutils/mklivecd/MESSAGE | 16 +++++++++++
sysutils/mklivecd/Makefile | 15 ++++-----
sysutils/mklivecd/PLIST | 4 +--
sysutils/mklivecd/files/Makefile.bootfloppy | 42 -----------------------------
sysutils/mklivecd/files/bootkern.mk | 23 ---------------
sysutils/mklivecd/files/mklivecd.8 | 11 ++++++-
sysutils/mklivecd/files/mklivecd.sh | 41 +++++++++++++++------------
8 files changed, 58 insertions(+), 97 deletions(-)
diffs (truncated from 309 to 300 lines):
diff -r 09712c9da716 -r 2857bdc628d6 doc/CHANGES
--- a/doc/CHANGES Mon Apr 26 16:49:17 2004 +0000
+++ b/doc/CHANGES Mon Apr 26 17:28:58 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.5745 2004/04/26 14:58:33 adam Exp $
+$NetBSD: CHANGES,v 1.5746 2004/04/26 17:28:58 xtraeme Exp $
Changes to the packages collection and infrastructure in 2004:
@@ -2252,3 +2252,4 @@
Updated thunderbird to 0.5nb1 [taya 2004-04-26]
Added thunderbird-gtk2-0.5 [taya 2004-04-26]
Updated xplanet to 1.0.6 [adam 2004-04-26]
+ Updated mklivecd to 0.4 [xtraeme 2004-04-26]
diff -r 09712c9da716 -r 2857bdc628d6 sysutils/mklivecd/MESSAGE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/mklivecd/MESSAGE Mon Apr 26 17:28:58 2004 +0000
@@ -0,0 +1,16 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2004/04/26 17:28:58 xtraeme Exp $
+
+You'll have to install pkgsrc/sysutils/grub with the option "GRUB_ISO9660"
+enabled to use mklivecd, so you'll be able to boot big kernels or
+multiple kernels via grub.
+
+For example, if you want to boot a kernel called "mykernel", in the grub
+shell, you should to type:
+
+grub> kernel --type=netbsd /mykernel
+grub> boot
+
+And the kernel will be loaded correctly. Good luck!.
+
+===========================================================================
diff -r 09712c9da716 -r 2857bdc628d6 sysutils/mklivecd/Makefile
--- a/sysutils/mklivecd/Makefile Mon Apr 26 16:49:17 2004 +0000
+++ b/sysutils/mklivecd/Makefile Mon Apr 26 17:28:58 2004 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2004/03/03 16:26:40 xtraeme Exp $
+# $NetBSD: Makefile,v 1.4 2004/04/26 17:28:58 xtraeme Exp $
-DISTNAME= mklivecd-0.3
+DISTNAME= mklivecd-0.4
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
@@ -8,7 +8,7 @@
MAINTAINER= xtraeme%NetBSD.org@localhost
COMMENT= Build a NetBSD i386 Live CD via command line
-DEPENDS+= cdrecord-[0-9]*:../../sysutils/cdrecord
+#DEPENDS+= cdrecord-[0-9]*:../../sysutils/cdrecord
PKG_INSTALLATION_TYPES= overwrite pkgviews
@@ -20,16 +20,15 @@
NO_CONFIGURE= YES
NO_BUILDLINK= YES
NO_BUILD= YES
-USE_LANGUAGES= # empty
INSTALLATION_DIRS= share/mklivecd sbin
-FILES= bootkern.mk Makefile.bootfloppy \
- KERN-LIVECD mfs_rcd personal_config
+FILES= KERN-LIVECD mfs_rcd personal_config
do-install:
- @${SED} -e "s,@PREFIX@,${PREFIX},g" ${FILESDIR}/mklivecd.sh > \
- ${WRKDIR}/mklivecd
+ @${SED} -e "s,@PREFIX@,${PREFIX},g" \
+ -e "s,@MACHINE_ARCH@,${MACHINE_ARCH},g" \
+ ${FILESDIR}/mklivecd.sh > ${WRKDIR}/mklivecd
${INSTALL_DATA_DIR} ${PREFIX}/share/mklivecd
${INSTALL_SCRIPT} ${WRKDIR}/mklivecd ${PREFIX}/sbin
${INSTALL_MAN} ${FILESDIR}/mklivecd.8 ${PREFIX}/man/man8
diff -r 09712c9da716 -r 2857bdc628d6 sysutils/mklivecd/PLIST
--- a/sysutils/mklivecd/PLIST Mon Apr 26 16:49:17 2004 +0000
+++ b/sysutils/mklivecd/PLIST Mon Apr 26 17:28:58 2004 +0000
@@ -1,9 +1,7 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2004/02/26 03:58:51 xtraeme Exp $
+@comment $NetBSD: PLIST,v 1.2 2004/04/26 17:28:58 xtraeme Exp $
man/man8/mklivecd.8
sbin/mklivecd
share/mklivecd/KERN-LIVECD
-share/mklivecd/Makefile.bootfloppy
-share/mklivecd/bootkern.mk
share/mklivecd/mfs_rcd
share/mklivecd/personal_config
@dirrm share/mklivecd
diff -r 09712c9da716 -r 2857bdc628d6 sysutils/mklivecd/files/Makefile.bootfloppy
--- a/sysutils/mklivecd/files/Makefile.bootfloppy Mon Apr 26 16:49:17 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 09712c9da716 -r 2857bdc628d6 sysutils/mklivecd/files/bootkern.mk
--- a/sysutils/mklivecd/files/bootkern.mk Mon Apr 26 16:49:17 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 09712c9da716 -r 2857bdc628d6 sysutils/mklivecd/files/mklivecd.8
--- a/sysutils/mklivecd/files/mklivecd.8 Mon Apr 26 16:49:17 2004 +0000
+++ b/sysutils/mklivecd/files/mklivecd.8 Mon Apr 26 17:28:58 2004 +0000
@@ -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@localhost>
@@ -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 @@
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 -r 09712c9da716 -r 2857bdc628d6 sysutils/mklivecd/files/mklivecd.sh
--- a/sysutils/mklivecd/files/mklivecd.sh Mon Apr 26 16:49:17 2004 +0000
+++ b/sysutils/mklivecd/files/mklivecd.sh Mon Apr 26 17:28:58 2004 +0000
@@ -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@localhost>
# All rights reserved.
@@ -42,6 +42,11 @@
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 @@
# 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
rm -rf $ISODIR/$F
fi
done
- showmsg "Done"
+ showmsg "Done."
;;
iso)
if [ ! -f $ISODIR/netbsd ]; then
@@ -554,8 +559,8 @@
if [ ! -f $BASEDIR/$IMAGE_NAME.iso ]; then
Home |
Main Index |
Thread Index |
Old Index