Dear Gerd,
On 2021-03-23 15:18, Gerd Hoffmann wrote:
Add a config option for fast device init (i.e. skip non-bootable devices). This optimization breaks boot in some rare configurations, specifically in case the boot loader needs access to secondary disks.
Thank you for the patch. Could you please elaborate and describe your test setup and how much the boot time is decreased?
Signed-off-by: Gerd Hoffmann kraxel@redhat.com
src/boot.c | 2 ++ src/Kconfig | 10 ++++++++++ 2 files changed, 12 insertions(+)
diff --git a/src/boot.c b/src/boot.c index 1effd802ce06..771d2382e38f 100644 --- a/src/boot.c +++ b/src/boot.c @@ -299,6 +299,8 @@ u8 is_bootprio_strict(void) { static int prio_halt = -2;
- if (!CONFIG_BOOT_FAST_INIT)
Maybe print a debug message?
if (prio_halt == -2) prio_halt = find_prio("HALT"); return prio_halt >= 0;return 0;
diff --git a/src/Kconfig b/src/Kconfig index 3a8ffa15fded..6b750a41b42c 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -72,6 +72,16 @@ endchoice help Support controlling of the boot order via the fw_cfg/CBFS "bootorder" file.
- config BOOT_FAST_INIT
depends on BOOTORDER
bool "Fast boot device init"
default y
help
Skip initialization for devices without bootindex. Speeds
up boot and reduced memory footprint, but may cause boot
problems in case the bootloader needs access to secondary
disks.
- config HOST_BIOS_GEOMETRY depends on BOOT bool "Boot device bios geometry override"
The diff looks good.
Kind regards,
Paul