kumquat-buildroot/boot/grub2/Config.in
Erico Nunes 273a27804a boot/grub2: enable support for arm and aarch64 targets
This commit enables the arm-uboot, arm-efi and aarch64-efi grub2
platforms in Buildroot.

With the uboot platform, the grub2 image gets built as a u-boot image
and is loaded from u-boot through a regular "bootm". The only
requirement from the u-boot side in order to allow this is that u-boot
is built with CONFIG_API enabled. CONFIG_API seems to not be enabled
by default in most in-tree configurations, however, it seems to be
available for quite some time now. So it might be possible to use this
even on older u-boot versions. This is available only for arm
(32-bit).

With the efi platform, grub2 gets built as an EFI executable. This
allows EFI firmware to find and load it similarly as it can be done
for x86_64. Also, since u-boot v2016.05, u-boot is able to load and
boot an EFI executable, so the uboot efi platform can also be used
from u-boot in recent versions. This has been enabled (mostly) by
default for ARM u-boot. efi platform is available for both arm and
aarch64.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
[Thomas: move the BR2_USE_MMU dependency in
BR2_TARGET_GRUB2_ARCH_SUPPORTS]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-11-26 21:08:13 +01:00

124 lines
3.6 KiB
Plaintext

config BR2_TARGET_GRUB2_ARCH_SUPPORTS
bool
default y if BR2_i386
default y if BR2_x86_64
default y if BR2_arm
default y if BR2_aarch64
depends on BR2_USE_MMU
config BR2_TARGET_GRUB2
bool "grub2"
depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
depends on BR2_USE_WCHAR
help
GNU GRUB is a Multiboot boot loader. It was derived from
GRUB, the GRand Unified Bootloader, which was originally
designed and implemented by Erich Stefan Boleyn. GRUB 2 has
replaced what was formerly known as GRUB (i.e. version
0.9x), which has, in turn, become GRUB Legacy.
Amongst others, GRUB2 offers EFI support, which GRUB Legacy
doesn't provide.
For additional notes on using Grub 2 with Buildroot, see
boot/grub2/readme.txt
http://www.gnu.org/software/grub/
if BR2_TARGET_GRUB2
choice
prompt "Platform"
config BR2_TARGET_GRUB2_I386_PC
bool "i386-pc"
depends on BR2_i386 || BR2_x86_64
help
Select this option if the platform you're targetting is a
x86 or x86-64 legacy BIOS based platform.
config BR2_TARGET_GRUB2_I386_EFI
bool "i386-efi"
depends on BR2_i386 || BR2_x86_64
help
Select this option if the platform you're targetting has a
32 bits EFI BIOS. Note that some x86-64 platforms use a 32
bits EFI BIOS, and this option should be used in this case.
config BR2_TARGET_GRUB2_X86_64_EFI
bool "x86-64-efi"
depends on BR2_x86_64
help
Select this option if the platform you're targetting has a
64 bits EFI BIOS.
config BR2_TARGET_GRUB2_ARM_UBOOT
bool "arm-uboot"
depends on BR2_arm
help
Select this option if the platform you're targetting is an
ARM u-boot platform, and you want to boot Grub 2 as an u-boot
compatible image.
config BR2_TARGET_GRUB2_ARM_EFI
bool "arm-efi"
depends on BR2_arm
help
Select this option if the platform you're targetting is an
ARM platform and you want to boot Grub 2 as an EFI
application.
config BR2_TARGET_GRUB2_ARM64_EFI
bool "arm64-efi"
depends on BR2_aarch64
help
Select this option if the platform you're targetting is an
Aarch64 platform and you want to boot Grub 2 as an EFI
application.
endchoice
if BR2_TARGET_GRUB2_I386_PC || BR2_TARGET_GRUB2_ARM_UBOOT
config BR2_TARGET_GRUB2_BOOT_PARTITION
string "boot partition"
default "hd0,msdos1"
help
Specify the partition where the /boot/grub/grub.cfg file is
located. Use 'hd0,msdos1' for the first partition of the
first disk if using a legacy partition table, or 'hd0,gpt1'
if using GPT partition table.
endif # BR2_TARGET_GRUB2_I386_PC || BR2_TARGET_GRUB2_ARM_UBOOT
config BR2_TARGET_GRUB2_BUILTIN_MODULES
string "builtin modules"
default "boot linux ext2 fat squash4 part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC
default "boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop" \
if BR2_TARGET_GRUB2_I386_EFI || BR2_TARGET_GRUB2_X86_64_EFI || \
BR2_TARGET_GRUB2_ARM_EFI || BR2_TARGET_GRUB2_ARM64_EFI
default "linux ext2 fat part_msdos normal" if BR2_TARGET_GRUB2_ARM_UBOOT
config BR2_TARGET_GRUB2_BUILTIN_CONFIG
string "builtin config"
help
Path to a Grub 2 configuration file that will be embedded
into the Grub image itself. This allows to set the root
device and other configuration parameters, but however menu
entries cannot be described in this embedded configuration.
config BR2_TARGET_GRUB2_INSTALL_TOOLS
bool "install tools"
help
Install support tools to interact with GNU GRUB Multiboot
boot loader.
This will also install the Grub 2 loadable modules to the
target.
endif # BR2_TARGET_GRUB2
comment "grub2 needs a toolchain w/ wchar"
depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
depends on !BR2_USE_WCHAR