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/git | |
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/git')
-rw-r--r-- | config/git/bios_extract | 6 | ||||
-rw-r--r-- | config/git/bios_extract/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/biosutilities | 6 | ||||
-rw-r--r-- | config/git/biosutilities/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/coreboot | 6 | ||||
-rw-r--r-- | config/git/coreboot/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/docs | 6 | ||||
-rw-r--r-- | config/git/docs/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/flashprog | 6 | ||||
-rw-r--r-- | config/git/flashprog/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/grub | 6 | ||||
-rw-r--r-- | config/git/grub/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/memtest86plus | 6 | ||||
-rw-r--r-- | config/git/memtest86plus/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/pico-sdk | 6 | ||||
-rw-r--r-- | config/git/pico-sdk/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/pico-serprog | 7 | ||||
-rw-r--r-- | config/git/pico-serprog/pkg.cfg | 4 | ||||
-rw-r--r-- | config/git/seabios | 6 | ||||
-rw-r--r-- | config/git/seabios/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/stm32-vserprog | 6 | ||||
-rw-r--r-- | config/git/stm32-vserprog/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/u-boot | 6 | ||||
-rw-r--r-- | config/git/u-boot/pkg.cfg | 3 | ||||
-rw-r--r-- | config/git/uefitool | 6 | ||||
-rw-r--r-- | config/git/uefitool/pkg.cfg | 3 |
26 files changed, 40 insertions, 79 deletions
diff --git a/config/git/bios_extract b/config/git/bios_extract deleted file mode 100644 index 2b313e83..00000000 --- a/config/git/bios_extract +++ /dev/null @@ -1,6 +0,0 @@ -{bios_extract}{ - rev: 0a7bc1d71735ef97b00dfec0fd54a02fcc5d1bb0 - loc: bios_extract - url: https://review.coreboot.org/bios_extract - bkup_url: https://github.com/coreboot/bios_extract/ -} diff --git a/config/git/bios_extract/pkg.cfg b/config/git/bios_extract/pkg.cfg new file mode 100644 index 00000000..4b203544 --- /dev/null +++ b/config/git/bios_extract/pkg.cfg @@ -0,0 +1,3 @@ +rev="0a7bc1d71735ef97b00dfec0fd54a02fcc5d1bb0" +url="https://review.coreboot.org/bios_extract" +bkup_url="https://github.com/coreboot/bios_extract/" diff --git a/config/git/biosutilities b/config/git/biosutilities deleted file mode 100644 index bd11c88a..00000000 --- a/config/git/biosutilities +++ /dev/null @@ -1,6 +0,0 @@ -{biosutilities}{ - rev: 03ae0cf0706ede5a2a15da0986c19c776d0e6b26 - loc: biosutilities - url: https://codeberg.org/libreboot/BIOSUtilities - bkup_url: https://github.com/platomav/BIOSUtilities -} diff --git a/config/git/biosutilities/pkg.cfg b/config/git/biosutilities/pkg.cfg new file mode 100644 index 00000000..a1c02015 --- /dev/null +++ b/config/git/biosutilities/pkg.cfg @@ -0,0 +1,3 @@ +rev="03ae0cf0706ede5a2a15da0986c19c776d0e6b26" +url="https://codeberg.org/libreboot/BIOSUtilities" +bkup_url="https://github.com/platomav/BIOSUtilities" diff --git a/config/git/coreboot b/config/git/coreboot deleted file mode 100644 index 4b139e19..00000000 --- a/config/git/coreboot +++ /dev/null @@ -1,6 +0,0 @@ -{coreboot}{ - rev: HEAD - loc: coreboot/coreboot - url: https://review.coreboot.org/coreboot - bkup_url: https://github.com/coreboot/coreboot.git -} diff --git a/config/git/coreboot/pkg.cfg b/config/git/coreboot/pkg.cfg new file mode 100644 index 00000000..f4ed31e8 --- /dev/null +++ b/config/git/coreboot/pkg.cfg @@ -0,0 +1,3 @@ +rev="HEAD" +url="https://review.coreboot.org/coreboot" +bkup_url="https://github.com/coreboot/coreboot.git" diff --git a/config/git/docs b/config/git/docs deleted file mode 100644 index 22892a21..00000000 --- a/config/git/docs +++ /dev/null @@ -1,6 +0,0 @@ -{docs}{ - rev: e72d055915c3a9ffe739982946e101b146b2483c - loc: docs - url: https://codeberg.org/vimuser/untitled - bkup_url: https://notabug.org/untitled/untitled -} diff --git a/config/git/docs/pkg.cfg b/config/git/docs/pkg.cfg new file mode 100644 index 00000000..9913ee5f --- /dev/null +++ b/config/git/docs/pkg.cfg @@ -0,0 +1,3 @@ +rev="e72d055915c3a9ffe739982946e101b146b2483c" +url="https://codeberg.org/vimuser/untitled" +bkup_url="https://notabug.org/untitled/untitled" diff --git a/config/git/flashprog b/config/git/flashprog deleted file mode 100644 index 98a0539b..00000000 --- a/config/git/flashprog +++ /dev/null @@ -1,6 +0,0 @@ -{flashprog}{ - rev: 5b4fdd11dd74c7f018cb04f7a27a2badc02fe182 - loc: flashprog - url: https://review.sourcearcade.org/flashprog - bkup_url: https://github.com/SourceArcade/flashprog.git -} diff --git a/config/git/flashprog/pkg.cfg b/config/git/flashprog/pkg.cfg new file mode 100644 index 00000000..ddbd60a2 --- /dev/null +++ b/config/git/flashprog/pkg.cfg @@ -0,0 +1,3 @@ +rev="5b4fdd11dd74c7f018cb04f7a27a2badc02fe182" +url="https://review.sourcearcade.org/flashprog" +bkup_url="https://github.com/SourceArcade/flashprog.git" diff --git a/config/git/grub b/config/git/grub deleted file mode 100644 index 21634cd6..00000000 --- a/config/git/grub +++ /dev/null @@ -1,6 +0,0 @@ -{grub}{ - rev: HEAD - loc: grub/grub - url: git://git.savannah.gnu.org/grub.git - bkup_url: https://codeberg.org/libreboot/grub -} diff --git a/config/git/grub/pkg.cfg b/config/git/grub/pkg.cfg new file mode 100644 index 00000000..ed26a766 --- /dev/null +++ b/config/git/grub/pkg.cfg @@ -0,0 +1,3 @@ +rev="HEAD" +url="git://git.savannah.gnu.org/grub.git" +bkup_url="https://codeberg.org/libreboot/grub" diff --git a/config/git/memtest86plus b/config/git/memtest86plus deleted file mode 100644 index c1f56623..00000000 --- a/config/git/memtest86plus +++ /dev/null @@ -1,6 +0,0 @@ -{memtest86plus}{ - rev: 5dcd424ea7afb857c1171e747ef064d98d26afeb - loc: memtest86plus - url: https://codeberg.org/libreboot/memtest86plus - bkup_url: https://github.com/memtest86plus/memtest86plus.git -} diff --git a/config/git/memtest86plus/pkg.cfg b/config/git/memtest86plus/pkg.cfg new file mode 100644 index 00000000..4bf44294 --- /dev/null +++ b/config/git/memtest86plus/pkg.cfg @@ -0,0 +1,3 @@ +rev="5dcd424ea7afb857c1171e747ef064d98d26afeb" +url="https://codeberg.org/libreboot/memtest86plus" +bkup_url="https://github.com/memtest86plus/memtest86plus.git" diff --git a/config/git/pico-sdk b/config/git/pico-sdk deleted file mode 100644 index 076a8e01..00000000 --- a/config/git/pico-sdk +++ /dev/null @@ -1,6 +0,0 @@ -{pico-sdk}{ - rev: 6a7db34ff63345a7badec79ebea3aaef1712f374 - loc: pico-sdk - url: https://codeberg.org/libreboot/pico-sdk - bkup_url: https://github.com/raspberrypi/pico-sdk -} diff --git a/config/git/pico-sdk/pkg.cfg b/config/git/pico-sdk/pkg.cfg new file mode 100644 index 00000000..68b5bca6 --- /dev/null +++ b/config/git/pico-sdk/pkg.cfg @@ -0,0 +1,3 @@ +rev="6a7db34ff63345a7badec79ebea3aaef1712f374" +url="https://codeberg.org/libreboot/pico-sdk" +bkup_url="https://github.com/raspberrypi/pico-sdk" diff --git a/config/git/pico-serprog b/config/git/pico-serprog deleted file mode 100644 index 6d46566b..00000000 --- a/config/git/pico-serprog +++ /dev/null @@ -1,7 +0,0 @@ -{pico-serprog}{ - rev: e75e3a20e63269a5e3189bc2e49a6a81d45a636a - loc: pico-serprog - url: https://codeberg.org/libreboot/pico-serprog - bkup_url: https://git.disroot.org/libreboot/pico-serprog - depend: pico-sdk -} diff --git a/config/git/pico-serprog/pkg.cfg b/config/git/pico-serprog/pkg.cfg new file mode 100644 index 00000000..54c5fa44 --- /dev/null +++ b/config/git/pico-serprog/pkg.cfg @@ -0,0 +1,4 @@ +rev="e75e3a20e63269a5e3189bc2e49a6a81d45a636a" +url="https://codeberg.org/libreboot/pico-serprog" +bkup_url="https://git.disroot.org/libreboot/pico-serprog" +depend="pico-sdk" diff --git a/config/git/seabios b/config/git/seabios deleted file mode 100644 index 62c90d30..00000000 --- a/config/git/seabios +++ /dev/null @@ -1,6 +0,0 @@ -{seabios}{ - rev: HEAD - loc: seabios/seabios - url: https://review.coreboot.org/seabios - bkup_url: https://github.com/coreboot/seabios -} diff --git a/config/git/seabios/pkg.cfg b/config/git/seabios/pkg.cfg new file mode 100644 index 00000000..d8c6932b --- /dev/null +++ b/config/git/seabios/pkg.cfg @@ -0,0 +1,3 @@ +rev="HEAD" +url="https://review.coreboot.org/seabios" +bkup_url="https://github.com/coreboot/seabios" diff --git a/config/git/stm32-vserprog b/config/git/stm32-vserprog deleted file mode 100644 index 37e901fc..00000000 --- a/config/git/stm32-vserprog +++ /dev/null @@ -1,6 +0,0 @@ -{stm32-vserprog}{ - rev: 8fcf0a4d41800631b571fa7bbd1d8b251f0a2111 - loc: stm32-vserprog - url: https://codeberg.org/libreboot/stm32-vserprog - bkup_url: https://git.disroot.org/libreboot/stm32-vserprog -} diff --git a/config/git/stm32-vserprog/pkg.cfg b/config/git/stm32-vserprog/pkg.cfg new file mode 100644 index 00000000..9fb12c63 --- /dev/null +++ b/config/git/stm32-vserprog/pkg.cfg @@ -0,0 +1,3 @@ +rev="8fcf0a4d41800631b571fa7bbd1d8b251f0a2111" +url="https://codeberg.org/libreboot/stm32-vserprog" +bkup_url="https://git.disroot.org/libreboot/stm32-vserprog" diff --git a/config/git/u-boot b/config/git/u-boot deleted file mode 100644 index 4057c089..00000000 --- a/config/git/u-boot +++ /dev/null @@ -1,6 +0,0 @@ -{u-boot}{ - rev: HEAD - loc: u-boot/u-boot - url: https://source.denx.de/u-boot/u-boot.git - bkup_url: https://github.com/u-boot/u-boot.git -} diff --git a/config/git/u-boot/pkg.cfg b/config/git/u-boot/pkg.cfg new file mode 100644 index 00000000..e65ad63a --- /dev/null +++ b/config/git/u-boot/pkg.cfg @@ -0,0 +1,3 @@ +rev="HEAD" +url="https://source.denx.de/u-boot/u-boot.git" +bkup_url="https://github.com/u-boot/u-boot.git" diff --git a/config/git/uefitool b/config/git/uefitool deleted file mode 100644 index e3ced920..00000000 --- a/config/git/uefitool +++ /dev/null @@ -1,6 +0,0 @@ -{uefitool}{ - rev: 4a41c33596e9bc3ae812e763965d91ac57553e02 - loc: uefitool - url: https://codeberg.org/libreboot/UEFITool - bkup_url: https://github.com/LongSoft/UEFITool -} diff --git a/config/git/uefitool/pkg.cfg b/config/git/uefitool/pkg.cfg new file mode 100644 index 00000000..1602e6be --- /dev/null +++ b/config/git/uefitool/pkg.cfg @@ -0,0 +1,3 @@ +rev="4a41c33596e9bc3ae812e763965d91ac57553e02" +url="https://codeberg.org/libreboot/UEFITool" +bkup_url="https://github.com/LongSoft/UEFITool" |