OSDN Git Service

Use xorriso to generate iso if possible
authorChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 8 May 2018 03:13:44 +0000 (11:13 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 11 May 2018 10:36:33 +0000 (18:36 +0800)
On some Linux distributions (e.g. Debian 9) genisoimage does not
support -e option we need. Use xorriso to solve that.

Android.mk

index 19970fd..0f0e200 100644 (file)
@@ -82,13 +82,14 @@ $(boot_dir): $(shell find $(LOCAL_PATH)/boot -type f | sort -r) $(systemimg) $(I
 BUILT_IMG := $(addprefix $(PRODUCT_OUT)/,ramdisk.img initrd.img install.img) $(systemimg)
 BUILT_IMG += $(if $(TARGET_PREBUILT_KERNEL),$(TARGET_PREBUILT_KERNEL),$(PRODUCT_OUT)/kernel)
 
+GENISOIMG := $(if $(shell which xorriso 2> /dev/null),xorriso -as mkisofs,genisoimage)
 ISO_IMAGE := $(PRODUCT_OUT)/$(TARGET_PRODUCT).iso
 $(ISO_IMAGE): $(boot_dir) $(BUILT_IMG)
        @echo ----- Making iso image ------
        $(hide) sed -i "s|\(Installation CD\)\(.*\)|\1 $(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $</isolinux/isolinux.cfg
        $(hide) sed -i "s|VER|$(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $</efi/boot/android.cfg
        sed -i "s|OS_TITLE|$(if $(RELEASE_OS_TITLE),$(RELEASE_OS_TITLE),Android-x86)|" $</isolinux/isolinux.cfg $</efi/boot/android.cfg
-       genisoimage -vJURT -b isolinux/isolinux.bin -c isolinux/boot.cat \
+       $(GENISOIMG) -vJURT -b isolinux/isolinux.bin -c isolinux/boot.cat \
                -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
                -input-charset utf-8 -V "Android-x86 LiveCD" -o $@ $^
        $(hide) isohybrid --uefi $@ || echo -e "isohybrid not found.\nInstall syslinux 4.0 or higher if you want to build a usb bootable iso."