kumquat-buildroot/fs/iso9660/Config.in
Kory Maincent 179ae068eb fs/iso9660: add support to Grub EFI bootloader in the image
Add support to boot the Grub bootloader from an EFI BIOS in the ISO9660
image.
For that we need to create EFI System Partition (ESP). The ESP is a vfat
partition which contain the Grub2 binary at the /EFI/BOOT/ location.
xorriso command will generate the iso image including the ESP.

We notice Grub can not read and mount the ESP, therefore we place the Grub
configuration file in the ISO9660 partition. A Grub2 builtin configuration
need to be used to tell Grub2 to search automatically its configuration
file in the ISO9660 partition. Use 'set root=(cd0)' in the configuration
file passed to BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
[yann.morin.1998@free.fr: fix timestamp fixup hook]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-09-27 22:35:20 +02:00

105 lines
3.5 KiB
Plaintext

config BR2_TARGET_ROOTFS_ISO9660
bool "iso image"
depends on (BR2_i386 || BR2_x86_64)
depends on BR2_LINUX_KERNEL
depends on BR2_TARGET_GRUB2 || BR2_TARGET_SYSLINUX_ISOLINUX
select BR2_LINUX_KERNEL_INSTALL_TARGET \
if (!BR2_TARGET_ROOTFS_ISO9660_INITRD && !BR2_TARGET_ROOTFS_INITRAMFS)
help
Build a bootable ISO9660 image. By default, the root
filesystem is directly packed as the ISO9660 filesystem,
which means the root filesystem will be read-only. It
requires ISO9660 filesystem support and CDROM support in the
kernel.
However, if BR2_TARGET_ROOTFS_INITRAMFS or
BR2_TARGET_ROOTFS_ISO9660_INITRD have been enabled, the
ISO9660 filesystem will only contain a kernel image and
optionally an external initrd image. In this case, the
filesystem being in RAM, it will be read/write. No ISO9660
or CDROM support is needed in the kernel.
if BR2_TARGET_ROOTFS_ISO9660
choice
prompt "Bootloader"
config BR2_TARGET_ROOTFS_ISO9660_GRUB2
bool "grub2"
depends on BR2_TARGET_GRUB2
help
Use Grub 2 as the bootloader for the ISO9660 image. Make
sure to enable the 'iso9660' module in
BR2_TARGET_GRUB2_BUILTIN_MODULES_PC or
BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI. Use 'cd' as the boot
partition in BR2_TARGET_GRUB2_BOOT_PARTITION= for GRUB on BIOS
or 'set root=(cd0)' in the configuration file passed to
BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI for GRUB on EFI.
config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX
bool "isolinux"
depends on BR2_TARGET_SYSLINUX_ISOLINUX
endchoice
choice
prompt "Boot payload"
config BR2_TARGET_ROOTFS_ISO9660_BIOS_BOOTLOADER
bool "legacy bios"
depends on BR2_TARGET_GRUB2_I386_PC || BR2_TARGET_ROOTFS_ISO9660_ISOLINUX
config BR2_TARGET_ROOTFS_ISO9660_EFI_BOOTLOADER
bool "UEFI"
depends on BR2_TARGET_GRUB2_I386_EFI || BR2_TARGET_GRUB2_X86_64_EFI
endchoice
config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU
string "Boot menu config file"
default "fs/iso9660/grub.cfg" if BR2_TARGET_ROOTFS_ISO9660_GRUB2
default "fs/iso9660/isolinux.cfg" if BR2_TARGET_ROOTFS_ISO9660_ISOLINUX
help
Use this option to provide a custom bootloader configuration
file (grub.cfg for Grub 2, isolinux.cfg for isolinux).
Note that the strings __KERNEL_PATH__ and __INITRD_PATH__
will automatically be replaced by the path to the kernel and
initrd images respectively.
config BR2_TARGET_ROOTFS_ISO9660_INITRD
bool "Use initrd"
default y
select BR2_TARGET_ROOTFS_CPIO
help
Enable this option to have the root filesystem bundled as an
initrd/initramfs rather than directly as the ISO9660
filesystem. With this option enabled, the ISO9660 will only
contain a kernel image, an initrd image (unless an initramfs
linked into the kernel is used) and the bootloader.
config BR2_TARGET_ROOTFS_ISO9660_TRANSPARENT_COMPRESSION
bool "transparent compression"
depends on !BR2_TARGET_ROOTFS_ISO9660_INITRD
depends on !BR2_TARGET_ROOTFS_INITRAMFS
help
Say 'y' to enable use of transparent (de)compression. Files
are stored compressed and will be decompressed on-the-fly
upon access at runtime.
config BR2_TARGET_ROOTFS_ISO9660_HYBRID
bool "Build hybrid image"
depends on BR2_TARGET_ROOTFS_ISO9660_ISOLINUX
help
Enable this option to build an hybrid image, i.e an image
which can either be booted from a CD-ROM or from a device
which BIOS considers a hard disk or ZIP disk, e.g. a USB key
or similar.
endif
comment "iso image needs a Linux kernel and either grub2 or isolinux to be built"
depends on BR2_i386 || BR2_x86_64
depends on !BR2_LINUX_KERNEL || \
!(BR2_TARGET_GRUB2 || BR2_TARGET_SYSLINUX_ISOLINUX)