From a6b7c3e672764858fd294998406ae791f5964b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=9B=BD?= Date: Thu, 26 Mar 2020 14:05:33 +0800 Subject: x86: generate EFI platform bootable images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add EFI platform bootable images for x86 platforms. These images can also boot from legacy BIOS platform. EFI System Partition need to be fat12/fat16/fat32 (not need to load filesystem drivers), so the first partition of EFI images are not ext4 filesystem any more. GPT partition table has an alternate partition table, we did not generate it. This may cause problems when use these images as qemu disk (kernel can not find rootfs), we pad enough sectors will be ok. Signed-off-by: 李国 [part_magic_* refactoring, removed genisoimage checks] Signed-off-by: Petr Štetiar --- config/Config-images.in | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'config') diff --git a/config/Config-images.in b/config/Config-images.in index e4db0482ce..4c54ac9399 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -188,19 +188,28 @@ menu "Target Images" select PACKAGE_grub2 default y + config GRUB_EFI_IMAGES + bool "Build GRUB EFI images (Linux x86 or x86_64 host only)" + depends on TARGET_x86 + depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS + select PACKAGE_grub2 + select PACKAGE_grub2-efi + select PACKAGE_kmod-fs-vfat + default y + config GRUB_CONSOLE bool "Use Console Terminal (in addition to Serial)" - depends on GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES default y config GRUB_SERIAL string "Serial port device" - depends on GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES default "ttyS0" config GRUB_BAUDRATE int "Serial port baud rate" - depends on GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES default 38400 if TARGET_x86_generic default 115200 @@ -211,20 +220,20 @@ menu "Target Images" config GRUB_BOOTOPTS string "Extra kernel boot options" - depends on GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES help If you don't know, just leave it blank. config GRUB_TIMEOUT string "Seconds to wait before booting the default entry" - depends on GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES default "5" help If you don't know, 5 seconds is a reasonable default. config GRUB_TITLE string "Title for the menu entry in GRUB" - depends on GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES default "OpenWrt" help This is the title of the GRUB menu entry. @@ -233,18 +242,18 @@ menu "Target Images" config ISO_IMAGES bool "Build LiveCD image (ISO)" depends on TARGET_x86 - select GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES config VDI_IMAGES bool "Build VirtualBox image files (VDI)" depends on TARGET_x86 - select GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES select PACKAGE_kmod-e1000 config VMDK_IMAGES bool "Build VMware image files (VMDK)" depends on TARGET_x86 - select GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES select PACKAGE_kmod-e1000 config TARGET_IMAGES_GZIP @@ -272,7 +281,7 @@ menu "Target Images" config TARGET_ROOTFS_PARTNAME string "Root partition on target device" - depends on GRUB_IMAGES + depends on GRUB_IMAGES || GRUB_EFI_IMAGES help Override the root partition on the final device. If left empty, it will be mounted by PARTUUID which makes the kernel find the -- cgit v1.2.3