2
1

Config.in 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. config 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. default y if BR2_RISCV_64
  8. depends on BR2_USE_MMU
  9. menuconfig 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. Amongst others, GRUB2 offers EFI support, which GRUB Legacy
  27. doesn't provide.
  28. The file boot/grub2/grub.cfg is used by default as the Grub
  29. configuration file. It can be overridden using a rootfs
  30. overlay or post-build script.
  31. For additional notes on using Grub 2 with Buildroot, see
  32. boot/grub2/readme.txt
  33. http://www.gnu.org/software/grub/
  34. if BR2_TARGET_GRUB2
  35. config BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
  36. bool
  37. config BR2_TARGET_GRUB2_HAS_EFI_BOOT
  38. bool
  39. config BR2_TARGET_GRUB2_HAS_PTF
  40. bool
  41. config BR2_TARGET_GRUB2_I386_PC
  42. bool "i386-pc"
  43. depends on BR2_i386 || BR2_x86_64
  44. select BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
  45. help
  46. Select this option if the platform you're targeting is a
  47. x86 or x86-64 legacy BIOS based platform.
  48. config BR2_TARGET_GRUB2_I386_EFI
  49. bool "i386-efi"
  50. depends on BR2_i386 || BR2_x86_64
  51. select BR2_TARGET_GRUB2_HAS_PTF
  52. select BR2_TARGET_GRUB2_HAS_EFI_BOOT
  53. help
  54. Select this option if the platform you're targeting has a
  55. 32 bits EFI BIOS. Note that some x86-64 platforms use a 32
  56. bits EFI BIOS, and this option should be used in this case.
  57. config BR2_TARGET_GRUB2_X86_64_EFI
  58. bool "x86-64-efi"
  59. depends on BR2_x86_64
  60. select BR2_TARGET_GRUB2_HAS_PTF
  61. select BR2_TARGET_GRUB2_HAS_EFI_BOOT
  62. help
  63. Select this option if the platform you're targeting has a
  64. 64 bits EFI BIOS.
  65. config BR2_TARGET_GRUB2_ARM_UBOOT
  66. bool "arm-uboot"
  67. depends on BR2_arm
  68. select BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
  69. help
  70. Select this option if the platform you're targeting is an
  71. ARM u-boot platform, and you want to boot Grub 2 as an u-boot
  72. compatible image.
  73. config BR2_TARGET_GRUB2_ARM_EFI
  74. bool "arm-efi"
  75. depends on BR2_arm
  76. select BR2_TARGET_GRUB2_HAS_PTF
  77. select BR2_TARGET_GRUB2_HAS_EFI_BOOT
  78. help
  79. Select this option if the platform you're targeting is an
  80. ARM platform and you want to boot Grub 2 as an EFI
  81. application.
  82. config BR2_TARGET_GRUB2_ARM64_EFI
  83. bool "arm64-efi"
  84. depends on BR2_aarch64
  85. select BR2_TARGET_GRUB2_HAS_EFI_BOOT
  86. help
  87. Select this option if the platform you're targeting is an
  88. Aarch64 platform and you want to boot Grub 2 as an EFI
  89. application.
  90. config BR2_TARGET_GRUB2_RISCV64_EFI
  91. bool "riscv64-efi"
  92. depends on BR2_RISCV_64
  93. select BR2_TARGET_GRUB2_HAS_EFI_BOOT
  94. help
  95. Select this option if the platform you're targeting is a
  96. 64bit RISC-V platform and you want to boot Grub 2 as an EFI
  97. application.
  98. if BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
  99. comment "Options for the x86 legacy BIOS or ARM U-Boot support"
  100. config BR2_TARGET_GRUB2_BOOT_PARTITION
  101. string "boot partition"
  102. default "hd0,msdos1"
  103. help
  104. Specify the partition where the /boot/grub/grub.cfg file is
  105. located. Use 'hd0,msdos1' for the first partition of the
  106. first disk if using a legacy partition table, or 'hd0,gpt1'
  107. if using GPT partition table.
  108. config BR2_TARGET_GRUB2_BUILTIN_MODULES_PC
  109. string "builtin modules"
  110. default BR2_TARGET_GRUB2_BUILTIN_MODULES if BR2_TARGET_GRUB2_BUILTIN_MODULES != "" # legacy
  111. default "boot linux ext2 fat squash4 part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC
  112. default "linux ext2 fat part_msdos normal" if BR2_TARGET_GRUB2_ARM_UBOOT
  113. config BR2_TARGET_GRUB2_BUILTIN_CONFIG_PC
  114. string "builtin config"
  115. default BR2_TARGET_GRUB2_BUILTIN_CONFIG if BR2_TARGET_GRUB2_BUILTIN_CONFIG != "" # legacy
  116. help
  117. Path to a Grub 2 configuration file that will be embedded
  118. into the Grub image itself. This allows to set the root
  119. device and other configuration parameters, but however menu
  120. entries cannot be described in this embedded configuration.
  121. endif # BR2_TARGET_GRUB2_HAS_LEGACY_BOOT
  122. if BR2_TARGET_GRUB2_HAS_EFI_BOOT
  123. comment "Options for the EFI BIOS or ARM EFI support"
  124. config BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI
  125. string "builtin modules"
  126. default BR2_TARGET_GRUB2_BUILTIN_MODULES if BR2_TARGET_GRUB2_BUILTIN_MODULES != "" # legacy
  127. default "boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop"
  128. config BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI
  129. string "builtin config"
  130. default BR2_TARGET_GRUB2_BUILTIN_CONFIG if BR2_TARGET_GRUB2_BUILTIN_CONFIG != "" # legacy
  131. help
  132. Path to a Grub 2 configuration file that will be embedded
  133. into the Grub image itself. This allows to set the root
  134. device and other configuration parameters, but however menu
  135. entries cannot be described in this embedded configuration.
  136. endif # BR2_TARGET_GRUB2_HAS_EFI_BOOT
  137. config BR2_TARGET_GRUB2_INSTALL_TOOLS
  138. bool "install tools"
  139. help
  140. Install support tools to interact with GNU GRUB Multiboot
  141. boot loader.
  142. This will also install the Grub 2 loadable modules to the
  143. target.
  144. endif # BR2_TARGET_GRUB2
  145. comment "grub2 needs a toolchain w/ wchar"
  146. depends on BR2_TARGET_GRUB2_ARCH_SUPPORTS
  147. depends on !BR2_USE_WCHAR