We have reason to believe that we should not be setting CONFIG_EFI_DISABLE_RUNTIME=y In our Kernel configs. I want to perform a controlled expereient booting two Kernel builds, one with this option set and one with it disabled. Since I have the option set, building that Kernel is trivial.
make olddefconfig make -j$(nproc) rpm-pkg |
Now, to turn that option off, I could just edit the .config file. However, it is possible that there are other config options linked to that one, and there is logic to modify them together. I want to see what happens if I use make menuconfig to change the option to confirm (or deny) that only that option gets changed. But where do I find this option in the menu?
grep -rn EFI_DISABLE_RUNTIME . ... ./drivers/firmware/efi/Kconfig:278:config EFI_DISABLE_RUNTIME ... |
Lets take a quick look at that file. Near the end of it, we can see the longer entry that will show up in Menuconfig:
config EFI_DISABLE_RUNTIME bool "Disable EFI runtime services support by default" default y if PREEMPT_RT |
At the top of it we have:
menu "EFI (Extensible Firmware Interface) Support" depends on EFI
However, that second level menu is not visible from the main menu screen
What thinks to pull in this file? Lets take a guess and look one level up in the directory.
$ grep Kconfig ./drivers/firmware/Kconfig source "drivers/firmware/arm_scmi/Kconfig" source "drivers/firmware/arm_ffa/Kconfig" source "drivers/firmware/broadcom/Kconfig" source "drivers/firmware/cirrus/Kconfig" source "drivers/firmware/google/Kconfig" source "drivers/firmware/efi/Kconfig" source "drivers/firmware/imx/Kconfig" source "drivers/firmware/meson/Kconfig" source "drivers/firmware/psci/Kconfig" source "drivers/firmware/smccc/Kconfig" source "drivers/firmware/tegra/Kconfig" source "drivers/firmware/xilinx/Kconfig" |
So the directory structure should be mirrored in the menu structure. Lets again look one level up.
$ grep drivers/firmware ./drivers/Kconfig source "drivers/firmware/Kconfig" |
And again one level up.
[ayoung@eng14sys-r111 linux]$ grep drivers ./Kconfig source "drivers/Kconfig" |
Now, the toplevel one does not have a “menu” entry in it, it just sources all of the entries below it, and I assume that makes a flat structure that is somehow organized. To get a tree we probably need those menu entries..
$ grep menu ./drivers/Kconfig menu "Device Drivers" endmenu $ grep menu ./drivers/firmware/Kconfig menu "Firmware Drivers" endmenu |
Going back to our top level menu, we can see that there is a Device Drivers entry just under networking support. On the second level menu we can see a Firmware Drivers entry.
Scroll a few lines down and you can see the EFI entry
From here we can deselct the option and see the change in our config file:
$ diff old.config .config 2354c2354 < CONFIG_EFI_DISABLE_RUNTIME=y --- > # CONFIG_EFI_DISABLE_RUNTIME is not set |