diff mbox

[2/2] configs/pc_x86_64_efi_defconfig: enable kernel EFI support

Message ID 20160822015216.425-2-nunes.erico@gmail.com
State Superseded
Headers show

Commit Message

Erico Nunes Aug. 22, 2016, 1:52 a.m. UTC
The pc_x86_64_efi reference defconfig is targeted towards an EFI
environment but the kernel which comes with it does not enable EFI
support by default.

Booting this defconfig without kernel EFI support on a qemu virtual
machine with EFI firmware resulted in no output to tty1 or ttyS0.
Enabling EFI support in the kernel fixed this and seems saner for an EFI
reference Buildroot defconfig.

CONFIG_EFI was enabled in a separate kernel config fragment so that it
doesn't affect pc_x86_64_bios_defconfig needlessly.

This was tested with qemu 2.6.0 running with kvm enabled and firmware
EFI v2.60 by EDK II.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
---
 board/pc/linux-efi.config       | 1 +
 configs/pc_x86_64_efi_defconfig | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 board/pc/linux-efi.config

Comments

Thomas Petazzoni Aug. 22, 2016, 2:37 p.m. UTC | #1
Hello,

Added Gustavo in Cc, since he is the original author of this defconfig.

On Mon, 22 Aug 2016 03:52:16 +0200, Erico Nunes wrote:
> The pc_x86_64_efi reference defconfig is targeted towards an EFI
> environment but the kernel which comes with it does not enable EFI
> support by default.
> 
> Booting this defconfig without kernel EFI support on a qemu virtual
> machine with EFI firmware resulted in no output to tty1 or ttyS0.
> Enabling EFI support in the kernel fixed this and seems saner for an EFI
> reference Buildroot defconfig.
> 
> CONFIG_EFI was enabled in a separate kernel config fragment so that it
> doesn't affect pc_x86_64_bios_defconfig needlessly.
> 
> This was tested with qemu 2.6.0 running with kvm enabled and firmware
> EFI v2.60 by EDK II.
> 
> Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
> ---
>  board/pc/linux-efi.config       | 1 +
>  configs/pc_x86_64_efi_defconfig | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>  create mode 100644 board/pc/linux-efi.config

Is a separate linux configuration fragment really needed? Why not just
enable CONFIG_EFI in the linux-extras.config?

Yes, it's technically not needed for a BIOS-based configuration, but
the added size is probably not very significant, and I'm not sure it's
worth having a separate linux config fragment for that.

Gustavo?

Thanks!

Thomas
Gustavo Zacarias Aug. 22, 2016, 2:40 p.m. UTC | #2
On 2016-08-22 11:37, Thomas Petazzoni wrote:

> Is a separate linux configuration fragment really needed? Why not just
> enable CONFIG_EFI in the linux-extras.config?
> 
> Yes, it's technically not needed for a BIOS-based configuration, but
> the added size is probably not very significant, and I'm not sure it's
> worth having a separate linux config fragment for that.
> 
> Gustavo?
> 
> Thanks!
> 
> Thomas

Hi.
Indeed, it won't hurt a bit, the main difference between the bios and 
efi defconfigs is the bootloader strategy, so on the kernel side "just 
give it the feature".
Regards.
Thomas Petazzoni Aug. 22, 2016, 2:44 p.m. UTC | #3
Hello,

On Mon, 22 Aug 2016 11:40:16 -0300, Gustavo Zacarias wrote:

> Indeed, it won't hurt a bit, the main difference between the bios and 
> efi defconfigs is the bootloader strategy, so on the kernel side "just 
> give it the feature".

Thanks for the feedback. Erico, could you adjust your patch accordingly?

Thanks!

Thomas
Erico Nunes Aug. 22, 2016, 2:52 p.m. UTC | #4
Hello,

On Mon, Aug 22, 2016 at 4:44 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 22 Aug 2016 11:40:16 -0300, Gustavo Zacarias wrote:
>
>> Indeed, it won't hurt a bit, the main difference between the bios and
>> efi defconfigs is the bootloader strategy, so on the kernel side "just
>> give it the feature".
>
> Thanks for the feedback. Erico, could you adjust your patch accordingly?

Thanks for the review.
I was in doubt about that too and decided to go with separate at
first, but no problem with me about adding it in linux-extras.config.
I'll change it and re-submit.

Erico
diff mbox

Patch

diff --git a/board/pc/linux-efi.config b/board/pc/linux-efi.config
new file mode 100644
index 0000000..7dcf296
--- /dev/null
+++ b/board/pc/linux-efi.config
@@ -0,0 +1 @@ 
+CONFIG_EFI=y
diff --git a/configs/pc_x86_64_efi_defconfig b/configs/pc_x86_64_efi_defconfig
index 13194881..234f1d1 100644
--- a/configs/pc_x86_64_efi_defconfig
+++ b/configs/pc_x86_64_efi_defconfig
@@ -32,7 +32,7 @@  BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.7"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux-4.7.config"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/pc/linux-extras.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/pc/linux-extras.config board/pc/linux-efi.config"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
 
 # Firmware