From c2ca92a169f0b5a91e8139e41f745879d05ac2fa Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 19 Jun 2024 14:32:42 +0100 Subject: [PATCH] roms: don't insert timeout.cfg this is bloat, because it's something the user can already do at runtime configuration anyway. set it to a reasonable default of 8 seconds instead of 5, and don't honour the timeout variable in target.cfg. this will be documented in the next release. Signed-off-by: Leah Rowe --- config/coreboot/g43t_am3/target.cfg | 1 - config/coreboot/g43t_am3_16mb/target.cfg | 1 - config/coreboot/ga_g41m_es2l/target.cfg | 1 - config/coreboot/kcma_d8_rdimm_16mb/target.cfg | 1 - config/coreboot/kcma_d8_udimm_2mb/target.cfg | 1 - config/coreboot/kfsn4_dre_1mb/target.cfg | 1 - config/coreboot/kfsn4_dre_2mb/target.cfg | 1 - config/coreboot/kgpe_d16_rdimm_16mb/target.cfg | 1 - config/coreboot/kgpe_d16_rdimm_2mb/target.cfg | 1 - config/coreboot/kgpe_d16_udimm_16mb/target.cfg | 1 - config/coreboot/kgpe_d16_udimm_2mb/target.cfg | 1 - config/grub/default/config/payload | 2 +- config/grub/nvme/config/payload | 2 +- config/grub/xhci/config/payload | 2 +- script/roms | 10 +++------- 15 files changed, 6 insertions(+), 21 deletions(-) diff --git a/config/coreboot/g43t_am3/target.cfg b/config/coreboot/g43t_am3/target.cfg index f0e838f..796ceab 100644 --- a/config/coreboot/g43t_am3/target.cfg +++ b/config/coreboot/g43t_am3/target.cfg @@ -2,5 +2,4 @@ tree="default" xarch="i386-elf" payload_seabios="y" payload_memtest="y" -grub_timeout=10 grubtree="nvme" diff --git a/config/coreboot/g43t_am3_16mb/target.cfg b/config/coreboot/g43t_am3_16mb/target.cfg index 533d8b5..46e8fc4 100644 --- a/config/coreboot/g43t_am3_16mb/target.cfg +++ b/config/coreboot/g43t_am3_16mb/target.cfg @@ -2,6 +2,5 @@ tree="default" xarch="i386-elf" payload_seabios="y" payload_memtest="y" -grub_timeout=10 release="n" grubtree="nvme" diff --git a/config/coreboot/ga_g41m_es2l/target.cfg b/config/coreboot/ga_g41m_es2l/target.cfg index f0e838f..796ceab 100644 --- a/config/coreboot/ga_g41m_es2l/target.cfg +++ b/config/coreboot/ga_g41m_es2l/target.cfg @@ -2,5 +2,4 @@ tree="default" xarch="i386-elf" payload_seabios="y" payload_memtest="y" -grub_timeout=10 grubtree="nvme" diff --git a/config/coreboot/kcma_d8_rdimm_16mb/target.cfg b/config/coreboot/kcma_d8_rdimm_16mb/target.cfg index 80d2018..744b6e1 100644 --- a/config/coreboot/kcma_d8_rdimm_16mb/target.cfg +++ b/config/coreboot/kcma_d8_rdimm_16mb/target.cfg @@ -4,6 +4,5 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" xlang="c" -grub_timeout=10 grub_scan_disk="nvme ahci" grubtree="nvme" diff --git a/config/coreboot/kcma_d8_udimm_2mb/target.cfg b/config/coreboot/kcma_d8_udimm_2mb/target.cfg index d4079eb..00e1d51 100644 --- a/config/coreboot/kcma_d8_udimm_2mb/target.cfg +++ b/config/coreboot/kcma_d8_udimm_2mb/target.cfg @@ -5,6 +5,5 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" xlang="c" -grub_timeout=10 grub_scan_disk="nvme ahci" grubtree="nvme" diff --git a/config/coreboot/kfsn4_dre_1mb/target.cfg b/config/coreboot/kfsn4_dre_1mb/target.cfg index 19c57b8..79ca98c 100644 --- a/config/coreboot/kfsn4_dre_1mb/target.cfg +++ b/config/coreboot/kfsn4_dre_1mb/target.cfg @@ -3,4 +3,3 @@ xarch="i386-elf" payload_seabios="y" payload_memtest="y" xlang="c" -grub_timeout=10 diff --git a/config/coreboot/kfsn4_dre_2mb/target.cfg b/config/coreboot/kfsn4_dre_2mb/target.cfg index 9bd20d4..51b50a3 100644 --- a/config/coreboot/kfsn4_dre_2mb/target.cfg +++ b/config/coreboot/kfsn4_dre_2mb/target.cfg @@ -4,4 +4,3 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" xlang="c" -grub_timeout=10 diff --git a/config/coreboot/kgpe_d16_rdimm_16mb/target.cfg b/config/coreboot/kgpe_d16_rdimm_16mb/target.cfg index 80d2018..744b6e1 100644 --- a/config/coreboot/kgpe_d16_rdimm_16mb/target.cfg +++ b/config/coreboot/kgpe_d16_rdimm_16mb/target.cfg @@ -4,6 +4,5 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" xlang="c" -grub_timeout=10 grub_scan_disk="nvme ahci" grubtree="nvme" diff --git a/config/coreboot/kgpe_d16_rdimm_2mb/target.cfg b/config/coreboot/kgpe_d16_rdimm_2mb/target.cfg index 80d2018..744b6e1 100644 --- a/config/coreboot/kgpe_d16_rdimm_2mb/target.cfg +++ b/config/coreboot/kgpe_d16_rdimm_2mb/target.cfg @@ -4,6 +4,5 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" xlang="c" -grub_timeout=10 grub_scan_disk="nvme ahci" grubtree="nvme" diff --git a/config/coreboot/kgpe_d16_udimm_16mb/target.cfg b/config/coreboot/kgpe_d16_udimm_16mb/target.cfg index d4079eb..00e1d51 100644 --- a/config/coreboot/kgpe_d16_udimm_16mb/target.cfg +++ b/config/coreboot/kgpe_d16_udimm_16mb/target.cfg @@ -5,6 +5,5 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" xlang="c" -grub_timeout=10 grub_scan_disk="nvme ahci" grubtree="nvme" diff --git a/config/coreboot/kgpe_d16_udimm_2mb/target.cfg b/config/coreboot/kgpe_d16_udimm_2mb/target.cfg index d4079eb..00e1d51 100644 --- a/config/coreboot/kgpe_d16_udimm_2mb/target.cfg +++ b/config/coreboot/kgpe_d16_udimm_2mb/target.cfg @@ -5,6 +5,5 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" xlang="c" -grub_timeout=10 grub_scan_disk="nvme ahci" grubtree="nvme" diff --git a/config/grub/default/config/payload b/config/grub/default/config/payload index 313290e..cdd6c0f 100644 --- a/config/grub/default/config/payload +++ b/config/grub/default/config/payload @@ -53,7 +53,7 @@ set default="0" if [ -f (cbfsdisk)/timeout.cfg ]; then source (cbfsdisk)/timeout.cfg else - set timeout=5 + set timeout=8 fi set grub_scan_disk="ahci ata" if [ -f (cbfsdisk)/scan.cfg ]; then diff --git a/config/grub/nvme/config/payload b/config/grub/nvme/config/payload index d7a3c57..2f9c711 100644 --- a/config/grub/nvme/config/payload +++ b/config/grub/nvme/config/payload @@ -53,7 +53,7 @@ set default="0" if [ -f (cbfsdisk)/timeout.cfg ]; then source (cbfsdisk)/timeout.cfg else - set timeout=5 + set timeout=8 fi set grub_scan_disk="nvme ahci ata" if [ -f (cbfsdisk)/scan.cfg ]; then diff --git a/config/grub/xhci/config/payload b/config/grub/xhci/config/payload index cd5b49b..923e355 100644 --- a/config/grub/xhci/config/payload +++ b/config/grub/xhci/config/payload @@ -54,7 +54,7 @@ set default="0" if [ -f (cbfsdisk)/timeout.cfg ]; then source (cbfsdisk)/timeout.cfg else - set timeout=5 + set timeout=8 fi set grub_scan_disk="nvme ahci ata" if [ -f (cbfsdisk)/scan.cfg ]; then diff --git a/script/roms b/script/roms index 484cd1b..f0cafc2 100755 --- a/script/roms +++ b/script/roms @@ -17,7 +17,6 @@ rp2040x="$rp2040src/build/pico_serprog.uf2" picosdk="src/pico-sdk" stm32src="src/stm32-vserprog" stm32x="$stm32src/stm32-vserprog.hex" -tmpcfg="$tmpdir/tmpcfg" # Disable all payloads by default. # target.cfg files have to specifically enable [a] payload(s) @@ -217,12 +216,9 @@ build_grub_roms() # we only need insert grub.elf once, for each coreboot config: cbfs "$tmprom" "$grubelf" "$grub_cbfs" - printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" > "$tmpcfg" || \ - $err "set grub_scan_disk, $grub_scan_disk, $tmpcfg" - cbfs "$tmprom" "$tmpcfg" scan.cfg raw - - printf "set timeout=%s\n" "$grub_timeout" > "$tmpcfg" || $err "!time" - [ -z "$grub_timeout" ] || cbfs "$tmprom" "$tmpcfg" timeout.cfg raw + printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" \ + > "$tmpdir/tmpcfg" || $err "set grub_scan_disk, $grub_scan_disk" + cbfs "$tmprom" "$tmpdir/tmpcfg" scan.cfg raw newrom="$romdir/${payload1}_${board}_${initmode}_$displaymode.rom" [ "$initmode" = "normal" ] && newrom="$romdir/${payload1}_" \