Skip to content

Commit

Permalink
x86/build: Add new paths for isolinux.bin and ldlinux.c32
Browse files Browse the repository at this point in the history
Recently I failed to build isoimage target, because the path of isolinux.bin
changed to /usr/xxx/ISOLINUX/isolinux.bin, as well as ldlinux.c32 which
changed to /usr/xxx/syslinux/modules/bios/ldlinux.c32.

This patch improves the file search logic:
  - Show a error message instead of silent fail.
  - Add above new paths.

Signed-off-by: Changbin Du <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Changbin Du authored and Ingo Molnar committed Nov 7, 2017
1 parent 4366d57 commit 8a7546a
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions arch/x86/boot/genimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,27 @@ genisoimage() {
rm -rf $tmp_dir
mkdir $tmp_dir
for i in lib lib64 share end ; do
if [ -f /usr/$i/syslinux/isolinux.bin ] ; then
cp /usr/$i/syslinux/isolinux.bin $tmp_dir
if [ -f /usr/$i/syslinux/ldlinux.c32 ]; then
cp /usr/$i/syslinux/ldlinux.c32 $tmp_dir
for j in syslinux ISOLINUX ; do
if [ -f /usr/$i/$j/isolinux.bin ] ; then
isolinux=/usr/$i/$j/isolinux.bin
echo "Using $isolinux"
cp $isolinux $tmp_dir
fi
done
for j in syslinux syslinux/modules/bios ; do
if [ -f /usr/$i/$j/ldlinux.c32 ]; then
ldlinux=/usr/$i/$j/ldlinux.c32
echo "Using $ldlinux"
cp $ldlinux $tmp_dir
fi
done
if [ -n "$isolinux" -a -n "$ldlinux" ] ; then
break
fi
if [ $i = end ] ; then exit 1 ; fi ;
if [ $i = end -a -z "$isolinux" ] ; then
echo 'Need an isolinux.bin file, please install syslinux/isolinux.'
exit 1
fi
done
cp $FBZIMAGE $tmp_dir/linux
echo "$KCMDLINE" > $tmp_dir/isolinux.cfg
Expand Down

0 comments on commit 8a7546a

Please sign in to comment.