diff options
author | Leah Rowe <leah@libreboot.org> | 2024-06-22 02:35:25 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-06-22 13:44:27 +0100 |
commit | fc7ae3e5903c176584cfefd6d3cf4c1549c4eaaa (patch) | |
tree | d13789beaaa3c1215607dda17fada1b322b5db49 /config/coreboot | |
parent | ad1602569ebf1404c47fb8ea4b39d0f8e844b840 (diff) |
lib.sh: more unified config handling
replace it with logic that simply uses "." to load
files directly. for this, "vcfg" is added as a variable
in coreboot target.cfg files, referring to a directory
in config/vendor/ containing a file named pkg.cfg, and
this file then contains the same variables as the
erstwhile config/vendor/sources
config/git files are now directories, also containing
pkg.cfg files each with the same variables as before,
such as repository link and commit hash
this change results in a noticeable reduction in code
complexity within the build system.
unified reading of config files: new function setcfg()
added to lib.sh
setcfg checks if a config exists. if a 2nd argument is
passed, it is used as a return value for eval, otherwise
a string calling err is passed. setcfg output is passed
through eval, to set strings based on config; eval must
be used, so that the variables are set within the same
scope, otherwise they'd be set within setcfg which could
lead to some whacky results.
there's still a bit more more to do, but this single change
results in a substantial reduction in code complexity.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/coreboot')
37 files changed, 37 insertions, 0 deletions
diff --git a/config/coreboot/dell9020mt_nri_12mb/target.cfg b/config/coreboot/dell9020mt_nri_12mb/target.cfg index b513e2b5..e32d25c1 100644 --- a/config/coreboot/dell9020mt_nri_12mb/target.cfg +++ b/config/coreboot/dell9020mt_nri_12mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="nvme ahci" grubtree="xhci" +vcfg="haswell" diff --git a/config/coreboot/dell9020sff_nri_12mb/target.cfg b/config/coreboot/dell9020sff_nri_12mb/target.cfg index b513e2b5..e32d25c1 100644 --- a/config/coreboot/dell9020sff_nri_12mb/target.cfg +++ b/config/coreboot/dell9020sff_nri_12mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="nvme ahci" grubtree="xhci" +vcfg="haswell" diff --git a/config/coreboot/e5420_6mb/target.cfg b/config/coreboot/e5420_6mb/target.cfg index 341e655e..f94ac308 100644 --- a/config/coreboot/e5420_6mb/target.cfg +++ b/config/coreboot/e5420_6mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="sandybridge" diff --git a/config/coreboot/e5520_6mb/target.cfg b/config/coreboot/e5520_6mb/target.cfg index 341e655e..f94ac308 100644 --- a/config/coreboot/e5520_6mb/target.cfg +++ b/config/coreboot/e5520_6mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="sandybridge" diff --git a/config/coreboot/e5530_12mb/target.cfg b/config/coreboot/e5530_12mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/e5530_12mb/target.cfg +++ b/config/coreboot/e5530_12mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/e6400_4mb/target.cfg b/config/coreboot/e6400_4mb/target.cfg index 8eeb3443..3aba9054 100644 --- a/config/coreboot/e6400_4mb/target.cfg +++ b/config/coreboot/e6400_4mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="e6400" diff --git a/config/coreboot/e6400nvidia_4mb/target.cfg b/config/coreboot/e6400nvidia_4mb/target.cfg index 8eeb3443..3aba9054 100644 --- a/config/coreboot/e6400nvidia_4mb/target.cfg +++ b/config/coreboot/e6400nvidia_4mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="e6400" diff --git a/config/coreboot/e6420_10mb/target.cfg b/config/coreboot/e6420_10mb/target.cfg index 341e655e..f94ac308 100644 --- a/config/coreboot/e6420_10mb/target.cfg +++ b/config/coreboot/e6420_10mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="sandybridge" diff --git a/config/coreboot/e6430_12mb/target.cfg b/config/coreboot/e6430_12mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/e6430_12mb/target.cfg +++ b/config/coreboot/e6430_12mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/e6520_10mb/target.cfg b/config/coreboot/e6520_10mb/target.cfg index 341e655e..f94ac308 100644 --- a/config/coreboot/e6520_10mb/target.cfg +++ b/config/coreboot/e6520_10mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="sandybridge" diff --git a/config/coreboot/e6530_12mb/target.cfg b/config/coreboot/e6530_12mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/e6530_12mb/target.cfg +++ b/config/coreboot/e6530_12mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/hp2170p_16mb/target.cfg b/config/coreboot/hp2170p_16mb/target.cfg index 341e655e..47c00abd 100644 --- a/config/coreboot/hp2170p_16mb/target.cfg +++ b/config/coreboot/hp2170p_16mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="hp2170p" diff --git a/config/coreboot/hp2560p_8mb/target.cfg b/config/coreboot/hp2560p_8mb/target.cfg index 341e655e..7152a2a4 100644 --- a/config/coreboot/hp2560p_8mb/target.cfg +++ b/config/coreboot/hp2560p_8mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="hp2560p" diff --git a/config/coreboot/hp2570p_16mb/target.cfg b/config/coreboot/hp2570p_16mb/target.cfg index 341e655e..84e6f6e7 100644 --- a/config/coreboot/hp2570p_16mb/target.cfg +++ b/config/coreboot/hp2570p_16mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="hp2570p" diff --git a/config/coreboot/hp8200sff_4mb/target.cfg b/config/coreboot/hp8200sff_4mb/target.cfg index a2b3d31f..6f1d4c4f 100644 --- a/config/coreboot/hp8200sff_4mb/target.cfg +++ b/config/coreboot/hp8200sff_4mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="nvme ahci" grubtree="nvme" +vcfg="hp8200sff" diff --git a/config/coreboot/hp8200sff_8mb/target.cfg b/config/coreboot/hp8200sff_8mb/target.cfg index a2b3d31f..6f1d4c4f 100644 --- a/config/coreboot/hp8200sff_8mb/target.cfg +++ b/config/coreboot/hp8200sff_8mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="nvme ahci" grubtree="nvme" +vcfg="hp8200sff" diff --git a/config/coreboot/hp820g2_12mb/target.cfg b/config/coreboot/hp820g2_12mb/target.cfg index ada696cf..6b25ebbb 100644 --- a/config/coreboot/hp820g2_12mb/target.cfg +++ b/config/coreboot/hp820g2_12mb/target.cfg @@ -6,3 +6,4 @@ payload_memtest="y" release="n" grub_scan_disk="nvme ahci" grubtree="xhci" +vcfg="hp820g2" diff --git a/config/coreboot/hp8300cmt_16mb/target.cfg b/config/coreboot/hp8300cmt_16mb/target.cfg index a2b3d31f..dddffd7b 100644 --- a/config/coreboot/hp8300cmt_16mb/target.cfg +++ b/config/coreboot/hp8300cmt_16mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="nvme ahci" grubtree="nvme" +vcfg="ivybridge" diff --git a/config/coreboot/hp8300usdt_16mb/target.cfg b/config/coreboot/hp8300usdt_16mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/hp8300usdt_16mb/target.cfg +++ b/config/coreboot/hp8300usdt_16mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/hp8460pintel_8mb/target.cfg b/config/coreboot/hp8460pintel_8mb/target.cfg index 341e655e..32223f55 100644 --- a/config/coreboot/hp8460pintel_8mb/target.cfg +++ b/config/coreboot/hp8460pintel_8mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="hp8460pintel" diff --git a/config/coreboot/hp8470pintel_16mb/target.cfg b/config/coreboot/hp8470pintel_16mb/target.cfg index 341e655e..6e6288b3 100644 --- a/config/coreboot/hp8470pintel_16mb/target.cfg +++ b/config/coreboot/hp8470pintel_16mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="hp8470pintel" diff --git a/config/coreboot/hp8560w_8mb/target.cfg b/config/coreboot/hp8560w_8mb/target.cfg index 341e655e..9dcf2f82 100644 --- a/config/coreboot/hp8560w_8mb/target.cfg +++ b/config/coreboot/hp8560w_8mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="hp8560w" diff --git a/config/coreboot/hp9470m_16mb/target.cfg b/config/coreboot/hp9470m_16mb/target.cfg index 341e655e..a339e04c 100644 --- a/config/coreboot/hp9470m_16mb/target.cfg +++ b/config/coreboot/hp9470m_16mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="hp9470m" diff --git a/config/coreboot/t1650_12mb/target.cfg b/config/coreboot/t1650_12mb/target.cfg index a2b3d31f..b8212ffe 100644 --- a/config/coreboot/t1650_12mb/target.cfg +++ b/config/coreboot/t1650_12mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="nvme ahci" grubtree="nvme" +vcfg="t1650" diff --git a/config/coreboot/t420_8mb/target.cfg b/config/coreboot/t420_8mb/target.cfg index 341e655e..f94ac308 100644 --- a/config/coreboot/t420_8mb/target.cfg +++ b/config/coreboot/t420_8mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="sandybridge" diff --git a/config/coreboot/t420s_8mb/target.cfg b/config/coreboot/t420s_8mb/target.cfg index 341e655e..f94ac308 100644 --- a/config/coreboot/t420s_8mb/target.cfg +++ b/config/coreboot/t420s_8mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="sandybridge" diff --git a/config/coreboot/t430_12mb/target.cfg b/config/coreboot/t430_12mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/t430_12mb/target.cfg +++ b/config/coreboot/t430_12mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/t440plibremrc_12mb/target.cfg b/config/coreboot/t440plibremrc_12mb/target.cfg index b513e2b5..e32d25c1 100644 --- a/config/coreboot/t440plibremrc_12mb/target.cfg +++ b/config/coreboot/t440plibremrc_12mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="nvme ahci" grubtree="xhci" +vcfg="haswell" diff --git a/config/coreboot/t520_8mb/target.cfg b/config/coreboot/t520_8mb/target.cfg index 341e655e..f94ac308 100644 --- a/config/coreboot/t520_8mb/target.cfg +++ b/config/coreboot/t520_8mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="sandybridge" diff --git a/config/coreboot/t530_12mb/target.cfg b/config/coreboot/t530_12mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/t530_12mb/target.cfg +++ b/config/coreboot/t530_12mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/w530_12mb/target.cfg b/config/coreboot/w530_12mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/w530_12mb/target.cfg +++ b/config/coreboot/w530_12mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/w541_12mb/target.cfg b/config/coreboot/w541_12mb/target.cfg index b513e2b5..e32d25c1 100644 --- a/config/coreboot/w541_12mb/target.cfg +++ b/config/coreboot/w541_12mb/target.cfg @@ -5,3 +5,4 @@ payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="nvme ahci" grubtree="xhci" +vcfg="haswell" diff --git a/config/coreboot/x220_8mb/target.cfg b/config/coreboot/x220_8mb/target.cfg index 341e655e..f94ac308 100644 --- a/config/coreboot/x220_8mb/target.cfg +++ b/config/coreboot/x220_8mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="sandybridge" diff --git a/config/coreboot/x230_12mb/target.cfg b/config/coreboot/x230_12mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/x230_12mb/target.cfg +++ b/config/coreboot/x230_12mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/x230_16mb/target.cfg b/config/coreboot/x230_16mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/x230_16mb/target.cfg +++ b/config/coreboot/x230_16mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/x230t_12mb/target.cfg b/config/coreboot/x230t_12mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/x230t_12mb/target.cfg +++ b/config/coreboot/x230t_12mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" diff --git a/config/coreboot/x230t_16mb/target.cfg b/config/coreboot/x230t_16mb/target.cfg index 341e655e..cbe91cbd 100644 --- a/config/coreboot/x230t_16mb/target.cfg +++ b/config/coreboot/x230t_16mb/target.cfg @@ -4,3 +4,4 @@ payload_seabios="y" payload_seabios_withgrub="y" payload_memtest="y" grub_scan_disk="ahci" +vcfg="ivybridge" |