xref: /OK3568_Linux_fs/buildroot/boot/grub2/Config.in (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1config BR2_TARGET_GRUB2_ARCH_SUPPORTS
2	bool
3	default y if BR2_i386
4	default y if BR2_x86_64
5	default y if BR2_arm
6	default y if BR2_aarch64
7	depends on BR2_USE_MMU
8
9config BR2_TARGET_GRUB2
10	bool "grub2"
11	depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
12	depends on BR2_USE_WCHAR
13	select BR2_TARGET_GRUB2_I386_PC if \
14		!BR2_TARGET_GRUB2_HAS_PTF && \
15		(BR2_i386 || BR2_x86_64)
16	select BR2_TARGET_GRUB2_ARM_UBOOT if \
17		!BR2_TARGET_GRUB2_HAS_PTF && \
18		BR2_arm
19	select BR2_TARGET_GRUB2_ARM64_EFI if BR2_aarch64
20	help
21	  GNU GRUB is a Multiboot boot loader. It was derived from
22	  GRUB, the GRand Unified Bootloader, which was originally
23	  designed and implemented by Erich Stefan Boleyn. GRUB 2 has
24	  replaced what was formerly known as GRUB (i.e. version
25	  0.9x), which has, in turn, become GRUB Legacy.
26
27	  Amongst others, GRUB2 offers EFI support, which GRUB Legacy
28	  doesn't provide.
29
30	  For additional notes on using Grub 2 with Buildroot, see
31	  boot/grub2/readme.txt
32
33	  http://www.gnu.org/software/grub/
34
35if BR2_TARGET_GRUB2
36
37config BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
38	bool
39
40config BR2_TARGET_GRUB2_HAS_EFI_BOOT
41	bool
42
43config BR2_TARGET_GRUB2_HAS_PTF
44	bool
45
46config BR2_TARGET_GRUB2_I386_PC
47	bool "i386-pc"
48	depends on BR2_i386 || BR2_x86_64
49	select BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
50	help
51	  Select this option if the platform you're targetting is a
52	  x86 or x86-64 legacy BIOS based platform.
53
54config BR2_TARGET_GRUB2_I386_EFI
55	bool "i386-efi"
56	depends on BR2_i386 || BR2_x86_64
57	select BR2_TARGET_GRUB2_HAS_PTF
58	select BR2_TARGET_GRUB2_HAS_EFI_BOOT
59	help
60	  Select this option if the platform you're targetting has a
61	  32 bits EFI BIOS. Note that some x86-64 platforms use a 32
62	  bits EFI BIOS, and this option should be used in this case.
63
64config BR2_TARGET_GRUB2_X86_64_EFI
65	bool "x86-64-efi"
66	depends on BR2_x86_64
67	select BR2_TARGET_GRUB2_HAS_PTF
68	select BR2_TARGET_GRUB2_HAS_EFI_BOOT
69	help
70	  Select this option if the platform you're targetting has a
71	  64 bits EFI BIOS.
72
73config BR2_TARGET_GRUB2_ARM_UBOOT
74	bool "arm-uboot"
75	depends on BR2_arm
76	select BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
77	help
78	  Select this option if the platform you're targetting is an
79	  ARM u-boot platform, and you want to boot Grub 2 as an u-boot
80	  compatible image.
81
82config BR2_TARGET_GRUB2_ARM_EFI
83	bool "arm-efi"
84	depends on BR2_arm
85	select BR2_TARGET_GRUB2_HAS_PTF
86	select BR2_TARGET_GRUB2_HAS_EFI_BOOT
87	help
88	  Select this option if the platform you're targetting is an
89	  ARM platform and you want to boot Grub 2 as an EFI
90	  application.
91
92config BR2_TARGET_GRUB2_ARM64_EFI
93	bool "arm64-efi"
94	depends on BR2_aarch64
95	select BR2_TARGET_GRUB2_HAS_EFI_BOOT
96	help
97	  Select this option if the platform you're targetting is an
98	  Aarch64 platform and you want to boot Grub 2 as an EFI
99	  application.
100
101if BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
102
103comment "Options for the x86 legacy BIOS or ARM U-Boot support"
104
105config BR2_TARGET_GRUB2_BOOT_PARTITION
106	string "boot partition"
107	default "hd0,msdos1"
108	help
109	  Specify the partition where the /boot/grub/grub.cfg file is
110	  located. Use 'hd0,msdos1' for the first partition of the
111	  first disk if using a legacy partition table, or 'hd0,gpt1'
112	  if using GPT partition table.
113
114config BR2_TARGET_GRUB2_BUILTIN_MODULES_PC
115	string "builtin modules"
116	default BR2_TARGET_GRUB2_BUILTIN_MODULES if BR2_TARGET_GRUB2_BUILTIN_MODULES != "" # legacy
117	default "boot linux ext2 fat squash4 part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC
118	default "linux ext2 fat part_msdos normal" if BR2_TARGET_GRUB2_ARM_UBOOT
119
120config BR2_TARGET_GRUB2_BUILTIN_CONFIG_PC
121	string "builtin config"
122	default BR2_TARGET_GRUB2_BUILTIN_CONFIG if BR2_TARGET_GRUB2_BUILTIN_CONFIG != "" # legacy
123	help
124	  Path to a Grub 2 configuration file that will be embedded
125	  into the Grub image itself. This allows to set the root
126	  device and other configuration parameters, but however menu
127	  entries cannot be described in this embedded configuration.
128
129endif # BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
130
131if BR2_TARGET_GRUB2_HAS_EFI_BOOT
132
133comment "Options for the EFI BIOS or ARM EFI support"
134
135config BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI
136	string "builtin modules"
137	default BR2_TARGET_GRUB2_BUILTIN_MODULES if BR2_TARGET_GRUB2_BUILTIN_MODULES != "" # legacy
138	default "boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop"
139
140config BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI
141	string "builtin config"
142	default BR2_TARGET_GRUB2_BUILTIN_CONFIG if BR2_TARGET_GRUB2_BUILTIN_CONFIG != "" # legacy
143	help
144	  Path to a Grub 2 configuration file that will be embedded
145	  into the Grub image itself. This allows to set the root
146	  device and other configuration parameters, but however menu
147	  entries cannot be described in this embedded configuration.
148
149endif # BR2_TARGET_GRUB2_HAS_EFI_BOOT
150
151config BR2_TARGET_GRUB2_INSTALL_TOOLS
152	bool "install tools"
153	help
154	  Install support tools to interact with GNU GRUB Multiboot
155	  boot loader.
156
157	  This will also install the Grub 2 loadable modules to the
158	  target.
159
160endif # BR2_TARGET_GRUB2
161
162comment "grub2 needs a toolchain w/ wchar"
163	depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
164	depends on !BR2_USE_WCHAR
165