OSDN Git Service

EFI support for ISO
authorLuke <hatharry@gmail.com>
Thu, 14 Jan 2016 09:56:00 +0000 (22:56 +1300)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 17 Jan 2016 18:12:42 +0000 (02:12 +0800)
Android.mk
boot/.disk/info [new file with mode: 0644]
boot/boot/grub/efi.img [new file with mode: 0644]
boot/boot/grub/grub.cfg [moved from boot/efi/boot/grub.cfg with 71% similarity]
install/grub2/efi/boot/BOOTx64.EFI [new file with mode: 0644]
install/grub2/efi/boot/bootia32.efi
install/grub2/efi/boot/bootx64.efi [deleted file]
install/grub2/efi/boot/grubx64.efi [new file with mode: 0644]

index ccf82ac..ab27c6f 100644 (file)
@@ -92,16 +92,18 @@ $(ISO_IMAGE): $(boot_dir) $(BUILT_IMG)
        @echo ----- Making iso image ------
        $(hide) $(call check-density,$</isolinux/isolinux.cfg)
        $(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)|" $</boot/grub/grub.cfg
+       $(hide) cp -r $(<D)/../../../../bootable/newinstaller/install/grub2/efi $</efi
        genisoimage -vJURT -b isolinux/isolinux.bin -c isolinux/boot.cat \
-               -no-emul-boot -boot-load-size 4 -boot-info-table \
+               -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 $@ || 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 "isohybrid not found.\nInstall syslinux 4.0 or higher if you want to build a usb bootable iso."
        @echo -e "\n\n$@ is built successfully.\n\n"
 
 # Note: requires dosfstools
 EFI_IMAGE := $(PRODUCT_OUT)/$(TARGET_PRODUCT).img
 ESP_LAYOUT := $(LOCAL_PATH)/editdisklbl/esp_layout.conf
-$(EFI_IMAGE): $(wildcard $(LOCAL_PATH)/boot/efi/*/*) $(BUILT_IMG) $(ESP_LAYOUT) | $(edit_mbr)
+$(EFI_IMAGE): $(wildcard $(LOCAL_PATH)/boot/boot/*/*) $(BUILT_IMG) $(ESP_LAYOUT) | $(edit_mbr)
        $(hide) sed "s|VER|$(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $(<D)/grub.cfg > $(@D)/grub.cfg
        $(hide) size=0; \
        for s in `du -sk $^ | awk '{print $$1}'`; do \
@@ -110,7 +112,7 @@ $(EFI_IMAGE): $(wildcard $(LOCAL_PATH)/boot/efi/*/*) $(BUILT_IMG) $(ESP_LAYOUT)
        size=$$(($$(($$(($$(($$(($$size + $$(($$size / 100)))) - 1)) / 32)) + 1)) * 32)); \
        rm -f $@.fat; mkdosfs -n Android-x86 -C $@.fat $$size
        $(hide) mcopy -Qsi $@.fat $(<D)/../../../install/grub2/efi $(BUILT_IMG) ::
-       $(hide) mcopy -Qoi $@.fat $(@D)/grub.cfg ::efi/boot
+       $(hide) mcopy -Qoi $@.fat $(@D)/grub.cfg ::boot/grub
        $(hide) cat /dev/null > $@; $(edit_mbr) -l $(ESP_LAYOUT) -i $@ esp=$@.fat
        $(hide) rm -f $@.fat
 
diff --git a/boot/.disk/info b/boot/.disk/info
new file mode 100644 (file)
index 0000000..c32758b
--- /dev/null
@@ -0,0 +1 @@
+Android-x86
diff --git a/boot/boot/grub/efi.img b/boot/boot/grub/efi.img
new file mode 100644 (file)
index 0000000..d81e5a2
Binary files /dev/null and b/boot/boot/grub/efi.img differ
similarity index 71%
rename from boot/efi/boot/grub.cfg
rename to boot/boot/grub/grub.cfg
index 5195227..58f5d11 100644 (file)
@@ -1,19 +1,21 @@
+set timeout=30
+
 menuentry 'Android-x86 VER Live' --class android-x86 {
        search --file --no-floppy --set=root /system.sfs
-       linuxefi /kernel CMDLINE quiet DATA=
-       initrdefi /initrd.img
+       linux /kernel CMDLINE quiet DATA=
+       initrd /initrd.img
 }
 
 menuentry 'Android-x86 VER DEBUG mode' --class android-x86 {
        search --file --no-floppy --set=root /system.sfs
-       linuxefi /kernel CMDLINE DATA= DEBUG=2
-       initrdefi /initrd.img
+       linux /kernel CMDLINE DATA= DEBUG=2
+       initrd /initrd.img
 }
 
 menuentry 'Android-x86 VER Installation' --class android-x86 {
        search --file --no-floppy --set=root /system.sfs
-       linuxefi /kernel CMDLINE DEBUG= INSTALL=1
-       initrdefi /initrd.img
+       linux /kernel CMDLINE DEBUG= INSTALL=1
+       initrd /initrd.img
 }
 
 menuentry 'Windows' {
diff --git a/install/grub2/efi/boot/BOOTx64.EFI b/install/grub2/efi/boot/BOOTx64.EFI
new file mode 100644 (file)
index 0000000..7691415
Binary files /dev/null and b/install/grub2/efi/boot/BOOTx64.EFI differ
index 0dd80c9..90c6eb4 100644 (file)
Binary files a/install/grub2/efi/boot/bootia32.efi and b/install/grub2/efi/boot/bootia32.efi differ
diff --git a/install/grub2/efi/boot/bootx64.efi b/install/grub2/efi/boot/bootx64.efi
deleted file mode 100644 (file)
index 82305e9..0000000
Binary files a/install/grub2/efi/boot/bootx64.efi and /dev/null differ
diff --git a/install/grub2/efi/boot/grubx64.efi b/install/grub2/efi/boot/grubx64.efi
new file mode 100644 (file)
index 0000000..a6581a9
Binary files /dev/null and b/install/grub2/efi/boot/grubx64.efi differ