OSDN Git Service

Use isohybrid in AOSP's tree
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 12 Mar 2020 16:17:10 +0000 (00:17 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 12 Mar 2020 16:17:10 +0000 (00:17 +0800)
This removes the dependency of an external host tool.

Android.mk

index 56d9c3f..bf4d728 100644 (file)
@@ -14,7 +14,6 @@
 
 ifneq ($(filter x86%,$(TARGET_ARCH)),)
 LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
 
 include $(CLEAR_VARS)
 LOCAL_IS_HOST_MODULE := true
@@ -84,6 +83,7 @@ BUILT_IMG += $(if $(TARGET_PREBUILT_KERNEL),$(TARGET_PREBUILT_KERNEL),$(PRODUCT_
 
 GENISOIMG := $(if $(shell which xorriso 2> /dev/null),xorriso -as mkisofs,genisoimage)
 ISO_IMAGE := $(PRODUCT_OUT)/$(TARGET_PRODUCT).iso
+ISOHYBRID := LD_LIBRARY_PATH=$(LOCAL_PATH)/install/lib external/syslinux/bios/utils/isohybrid
 $(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
@@ -92,7 +92,7 @@ $(ISO_IMAGE): $(boot_dir) $(BUILT_IMG)
        $(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 "$(if $(RELEASE_OS_TITLE),$(RELEASE_OS_TITLE),Android-x86) $(VER) ($(TARGET_ARCH))" -o $@ $^
-       $(hide) isohybrid --uefi $@ || echo -e "isohybrid not found.\nInstall syslinux 4.0 or higher if you want to build a usb bootable iso."
+       $(hide) $(ISOHYBRID) --uefi $@
        @echo -e "\n\n$@ is built successfully.\n\n"
 
 rpm: $(wildcard $(LOCAL_PATH)/rpm/*) $(BUILT_IMG)