From b3dc16eecb29a6c711797247138e08c9e5bd4ca4 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 8 Jan 2019 19:31:15 -0500 Subject: [PATCH] build: Use xorriso instead of mkisofs or genisoimage. It seems that not all Linux distributions ship an EFI-enabled cdrtools (i.e. mkisofs takes -e option), Arch being one that does not. So instead, we now use xorriso universally, which is as (or more, in most cases) widely available, and supports emulating mkisofs with the EFI commands universally. This also has the added benefit that we can drop genisoimage support altogether. --- build/jam/ImageRules | 11 ++++------- build/scripts/build_haiku_image | 17 ++++++----------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/build/jam/ImageRules b/build/jam/ImageRules index f67a701044..98fd2f4672 100644 --- a/build/jam/ImageRules +++ b/build/jam/ImageRules @@ -1565,13 +1565,14 @@ rule BuildCDBootImage image : bootfloppy : bootefi : extrafiles actions BuildCDBootImageMBR { $(RM) $(<) - mkisofs -b $(BOOTIMG) -r -J -V bootimg -o $(<) $(>[1]) $(>[2-]) + xorriso -as mkisofs -b $(BOOTIMG) -r -J -V bootimg -o $(<) $(>[1]) $(>[2-]) } actions BuildCDBootImageEFI { $(RM) $(<) - mkisofs -b $(BOOTIMG) -eltorito-alt-boot -no-emul-boot -e $(BOOTEFI) -r -J -V bootimg -o $(<) $(>[1]) $(>[2]) $(>[3-]) + xorriso -as mkisofs -b $(BOOTIMG) -eltorito-alt-boot -no-emul-boot -e $(BOOTEFI) \ + -r -J -V bootimg -o $(<) $(>[1]) $(>[2]) $(>[3-]) } @@ -1605,11 +1606,7 @@ actions BuildCDBootPPCImage1 bind MAPS # Extras (readme files, etc) cp $(>[4]) $(HAIKU_OUTPUT_DIR)/cd/ - mkisofs -v -hfs -part -map $(MAPS) -no-desktop -hfs-volid bootimg \ - -V bootimg -hfs-bless $(HAIKU_OUTPUT_DIR)/cd/boot -prep-boot \ - boot/haikuloader.xcf -r -o $(<) $(HAIKU_OUTPUT_DIR)/cd \ - || \ - genisoimage -v -hfs -part -map $(MAPS) -no-desktop -hfs-volid bootimg \ + xorriso -as mkisofs -v -hfs -part -map $(MAPS) -no-desktop -hfs-volid bootimg \ -V bootimg -hfs-bless $(HAIKU_OUTPUT_DIR)/cd/boot -prep-boot \ boot/haikuloader.xcf -r -o $(<) $(HAIKU_OUTPUT_DIR)/cd $(RM) -r $(HAIKU_OUTPUT_DIR)/cd diff --git a/build/scripts/build_haiku_image b/build/scripts/build_haiku_image index e67b018708..29b9bfe163 100755 --- a/build/scripts/build_haiku_image +++ b/build/scripts/build_haiku_image @@ -329,18 +329,13 @@ if [ $isCD ]; then echo "Copying boot image ..." $cp "$cdBootFloppy" "$outputDir" - if [ $(which mkisofs) ]; then - # build the iso image using mkisofs - echo "Building CD image (mkisofs)..." - mkisofs -uid 0 -gid 0 -b `basename $cdBootFloppy` -R -V "$cdLabel" -o "$cdImagePath" "$tPrefix" - elif [ $(which genisoimage) ]; then - # build the iso image using genisoimage - echo "Building CD image (genisoimage)..." - echo "WARNING: genisoimage fallback has known problems with long filenames!" - echo " Please install mkisofs before making production releases!" - genisoimage -r -iso-level 4 -b `basename $cdBootFloppy` -V "$cdLabel" -o "$cdImagePath" "$tPrefix" + if [ $(which xorriso) ]; then + # build the iso image using xorriso + echo "Building CD image..." + xorriso -as mkisofs -r -b `basename $cdBootFloppy` \ + -V "$cdLabel" -o "$cdImagePath" "$tPrefix" else - echo "you need mkisofs (preferred) or genisoimage to create a CD image." + echo "you need xorriso to create a CD image." exit 1 fi