Commit 5f0e3fe6 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Ingo Molnar

x86/build: Make isoimage work on Debian

Debian does not ship a 'mkisofs' symlink to genisoimage.  All modern
distros ship genisoimage, so just use that directly.  That requires
renaming the 'genisoimage' function.  Also neaten up the 'for' loop
while I'm in here.
Signed-off-by: default avatarMatthew Wilcox <mawilcox@microsoft.com>
Cc: Changbin Du <changbin.du@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent c739f930
...@@ -80,39 +80,43 @@ genfdimage288() { ...@@ -80,39 +80,43 @@ genfdimage288() {
mcopy $FBZIMAGE w:linux mcopy $FBZIMAGE w:linux
} }
genisoimage() { geniso() {
tmp_dir=`dirname $FIMAGE`/isoimage tmp_dir=`dirname $FIMAGE`/isoimage
rm -rf $tmp_dir rm -rf $tmp_dir
mkdir $tmp_dir mkdir $tmp_dir
for i in lib lib64 share end ; do for i in lib lib64 share ; do
for j in syslinux ISOLINUX ; do for j in syslinux ISOLINUX ; do
if [ -f /usr/$i/$j/isolinux.bin ] ; then if [ -f /usr/$i/$j/isolinux.bin ] ; then
isolinux=/usr/$i/$j/isolinux.bin isolinux=/usr/$i/$j/isolinux.bin
cp $isolinux $tmp_dir
fi fi
done done
for j in syslinux syslinux/modules/bios ; do for j in syslinux syslinux/modules/bios ; do
if [ -f /usr/$i/$j/ldlinux.c32 ]; then if [ -f /usr/$i/$j/ldlinux.c32 ]; then
ldlinux=/usr/$i/$j/ldlinux.c32 ldlinux=/usr/$i/$j/ldlinux.c32
cp $ldlinux $tmp_dir
fi fi
done done
if [ -n "$isolinux" -a -n "$ldlinux" ] ; then if [ -n "$isolinux" -a -n "$ldlinux" ] ; then
break break
fi fi
if [ $i = end -a -z "$isolinux" ] ; then done
if [ -z "$isolinux" ] ; then
echo 'Need an isolinux.bin file, please install syslinux/isolinux.' echo 'Need an isolinux.bin file, please install syslinux/isolinux.'
exit 1 exit 1
fi fi
done if [ -z "$ldlinux" ] ; then
echo 'Need an ldlinux.c32 file, please install syslinux/isolinux.'
exit 1
fi
cp $isolinux $tmp_dir
cp $ldlinux $tmp_dir
cp $FBZIMAGE $tmp_dir/linux cp $FBZIMAGE $tmp_dir/linux
echo "$KCMDLINE" > $tmp_dir/isolinux.cfg echo "$KCMDLINE" > $tmp_dir/isolinux.cfg
if [ -f "$FDINITRD" ] ; then if [ -f "$FDINITRD" ] ; then
cp "$FDINITRD" $tmp_dir/initrd.img cp "$FDINITRD" $tmp_dir/initrd.img
fi fi
mkisofs -J -r -input-charset=utf-8 -quiet -o $FIMAGE -b isolinux.bin \ genisoimage -J -r -input-charset=utf-8 -quiet -o $FIMAGE \
-c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table \ -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 \
$tmp_dir -boot-info-table $tmp_dir
isohybrid $FIMAGE 2>/dev/null || true isohybrid $FIMAGE 2>/dev/null || true
rm -rf $tmp_dir rm -rf $tmp_dir
} }
...@@ -121,6 +125,6 @@ case $1 in ...@@ -121,6 +125,6 @@ case $1 in
bzdisk) genbzdisk;; bzdisk) genbzdisk;;
fdimage144) genfdimage144;; fdimage144) genfdimage144;;
fdimage288) genfdimage288;; fdimage288) genfdimage288;;
isoimage) genisoimage;; isoimage) geniso;;
*) echo 'Unknown image format'; exit 1; *) echo 'Unknown image format'; exit 1;
esac esac
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment