[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
merging ieee1275's grub-mkrescue into the common grub-mkrescue
From: |
Daniel Kahn Gillmor |
Subject: |
merging ieee1275's grub-mkrescue into the common grub-mkrescue |
Date: |
Wed, 17 Feb 2010 00:09:40 -0500 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20091109) |
attached is a patch offered to merge the ieee1275 implementation of
grub-mkrescue into the common grub-mkrescue (currently shared only by
grub-coreboot and grub-pc). It depends on grub-mkisofs supporting HFS
extensions, though.
Once grub-mkisofs can support these features, this patch would supercede
my earlier patch [0]. Perhaps the earlier patch should be applied in
the meantime to normalize the interface to grub-mkrescue?
The additional flags needed for support would be (see genisoimage(1) for
descriptions of what they do):
-hfs
-part
-map MAPFILE
-hfs-bless BLESSDIR
-chrp-boot
Looking at cdrkit's libhfs_iso/ directory, it appears that the code to
implement these features is mostly under "GPLv2 or later", despite the
disclaimer at http://www.cdrkit.org/ which claims plain GPLv2.
Similar code (probably with a common ancestor [1]) is also available in
the hfsutils package, which does appear to be unambiguously GPLv2+.
Neither hfsutils nor genisoimage offers a shared library, unfortunately.
Regards,
--dkg
[0]
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=12;filename=570119.patch;att=1;bug=570119
[1] http://bugs.debian.org/570187
=== modified file 'util/grub-mkrescue.in'
--- util/grub-mkrescue.in 2009-12-22 17:20:27 +0000
+++ util/grub-mkrescue.in 2010-02-16 22:54:29 +0000
@@ -32,6 +32,7 @@
coreboot_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed
${transform})/${target_cpu}-coreboot
pc_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/${target_cpu}-pc
+ieee1275_dir=${libdir}/$(echo ${PACKAGE_TARNAME} | sed
${transform})/${target_cpu}-ieee1275
# Usage: usage
# Print the usage.
@@ -120,13 +121,18 @@
if test -e "${pc_dir}" ; then
process_input_dir ${pc_dir} pc
fi
+ if test -e "${ieee1275_dir}" ; then
+ process_input_dir ${ieee1275_dir} ieee1275
+ fi
else
process_input_dir ${override_dir} ${native_platform}
coreboot_dir=
pc_dir=
+ ieee1275_dir=
case "${native_platform}" in
coreboot) coreboot_dir=${override_dir} ;;
pc) pc_dir=${override_dir} ;;
+ ieee1275) ieee1275_dir=${override_dir} ;;
esac
fi
@@ -183,10 +189,34 @@
--embedded-boot ${embed_img}"
fi
+# build ieee1275 core.img
+if test -e "${ieee1275_dir}" ; then
+ echo "Enabling ieee1275 support ..."
+ boot_dir=${iso9660_dir}/boot/grub/powerpc-ieee1275/boot
+ mkdir ${boot_dir}
+ grub-mkelfimage -n -d ${ieee1275_dir}/ -o ${boot_dir}/grub.img ${modules}
iso9660
+
+ modules="$(cat ${ieee1275_dir}/partmap.lst) ${modules}"
+ (for i in ${modules} ; do
+ echo "insmod $i"
+ done ; \
+ echo "source /boot/grub/grub.cfg") \
+ > ${iso9660_dir}/boot/grub/powerpc-ieee1275/grub.cfg
+
+ map_file=`mktemp`
+ cat >${map_file} <<EOF
+# EXTN XLate CREATOR TYPE Comment
+grub.img Raw 'UNIX' 'tbxi' "bootstrap"
+EOF
+
+ grub_mkisofs_arguments="${grub_mkisofs_arguments} -hfs -part -no-desktop
-map ${map_file} -hfs-bless ${boot_dir} -chrp-boot"
+fi
+
# build iso image
grub-mkisofs ${grub_mkisofs_arguments} --protective-msdos-label -o
${output_image} -r ${iso9660_dir} ${source}
rm -rf ${iso9660_dir}
rm -f ${embed_img}
+rm -f ${map_file}
exit 0
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- merging ieee1275's grub-mkrescue into the common grub-mkrescue,
Daniel Kahn Gillmor <=