From a7b767a47bdef371ee146afb052d0723736ea662 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 25 Sep 2023 00:40:56 +0100 Subject: [PATCH] update/repos: concatenate multiple revision files With this change, it's still possible to have a single file at config/git/revisions, but this has been scrapped. Instead, multiple files now exist under config/git/ with the same modules declared, but the files are separated logically. List of files under config/git: * bios_extract * biosutilities * coreboot * flashrom * grub (gnulib also defined here) * me_cleaner * memtest86plus * seabios * serprog (multiple projects defined) * u-boot * uefitool The rationale behind this change is simple: in the future, we will stop relying on build systems within imported projects for the import of git submodules. Instead, we will handle them directly in lbmk. Additionally, a Linux payload is planned for Libreboot, made easier by the recent audit (script handle/make/config makes it easy to integrate Linux, and handle cross-compilers for userland utilities); a "linux" file under config/git/ could also define rules for each project besides linux, such as musl libc, busybox and other utilities. Signed-off-by: Leah Rowe --- config/git/bios_extract | 5 ++ config/git/biosutilities | 5 ++ config/git/coreboot | 6 ++ config/git/flashrom | 5 ++ config/git/grub | 13 +++++ config/git/me_cleaner | 5 ++ config/git/memtest86plus | 5 ++ config/git/revisions | 113 ------------------------------------- config/git/seabios | 6 ++ config/git/serprog | 34 +++++++++++ config/git/u-boot | 6 ++ config/git/uefitool | 5 ++ script/update/project/repo | 13 ++++- 13 files changed, 106 insertions(+), 115 deletions(-) create mode 100644 config/git/bios_extract create mode 100644 config/git/biosutilities create mode 100644 config/git/coreboot create mode 100644 config/git/flashrom create mode 100644 config/git/grub create mode 100644 config/git/me_cleaner create mode 100644 config/git/memtest86plus delete mode 100644 config/git/revisions create mode 100644 config/git/seabios create mode 100644 config/git/serprog create mode 100644 config/git/u-boot create mode 100644 config/git/uefitool diff --git a/config/git/bios_extract b/config/git/bios_extract new file mode 100644 index 00000000..9eca273d --- /dev/null +++ b/config/git/bios_extract @@ -0,0 +1,5 @@ +{bios_extract}{ + rev: 0a7bc1d71735ef97b00dfec0fd54a02fcc5d1bb0 + loc: bios_extract + url: https://review.coreboot.org/bios_extract +} diff --git a/config/git/biosutilities b/config/git/biosutilities new file mode 100644 index 00000000..c2c32b07 --- /dev/null +++ b/config/git/biosutilities @@ -0,0 +1,5 @@ +{biosutilities}{ + rev: 03ae0cf0706ede5a2a15da0986c19c776d0e6b26 + loc: biosutilities + url: https://github.com/platomav/BIOSUtilities +} diff --git a/config/git/coreboot b/config/git/coreboot new file mode 100644 index 00000000..4b139e19 --- /dev/null +++ b/config/git/coreboot @@ -0,0 +1,6 @@ +{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/flashrom b/config/git/flashrom new file mode 100644 index 00000000..9d81583c --- /dev/null +++ b/config/git/flashrom @@ -0,0 +1,5 @@ +{flashrom}{ + rev: 11680db4e1251eb842bee11e53b6d1f0ae67767b + loc: flashrom + url: https://review.coreboot.org/flashrom.git +} diff --git a/config/git/grub b/config/git/grub new file mode 100644 index 00000000..e48feca3 --- /dev/null +++ b/config/git/grub @@ -0,0 +1,13 @@ +{grub}{ + rev: db1faedccdce3cf83336155a95c04a8db03744c5 + loc: grub + url: git://git.savannah.gnu.org/grub.git + bkup_url: http://git.savannah.gnu.org/r/grub.git + depend: gnulib +} + +{gnulib}{ + rev: 9f48fb992a3d7e96610c4ce8be969cff2d61a01b + loc: grub/gnulib + url: git://git.sv.gnu.org/gnulib +} diff --git a/config/git/me_cleaner b/config/git/me_cleaner new file mode 100644 index 00000000..fd5197c7 --- /dev/null +++ b/config/git/me_cleaner @@ -0,0 +1,5 @@ +{me_cleaner}{ + rev: 43612a630c79f3bc6f2653bfe90dfe0b7b137e08 + loc: me_cleaner + url: https://github.com/corna/me_cleaner.git +} diff --git a/config/git/memtest86plus b/config/git/memtest86plus new file mode 100644 index 00000000..824e1b71 --- /dev/null +++ b/config/git/memtest86plus @@ -0,0 +1,5 @@ +{memtest86plus}{ + rev: 5dcd424ea7afb857c1171e747ef064d98d26afeb + loc: memtest86plus + url: https://github.com/memtest86plus/memtest86plus.git +} diff --git a/config/git/revisions b/config/git/revisions deleted file mode 100644 index d053c474..00000000 --- a/config/git/revisions +++ /dev/null @@ -1,113 +0,0 @@ -# This file contains information needed for getting the correct versions -# for various git projects used by lbmk. -# Project name is enclosed by curly braces '{}' information about the -# project relevant to lbmk is stored between the subsequent curly -# braces. This file is used by the fetch script. Each entry must include: -# revision 'rev', 'location', 'loc', and the git url 'url'. Optional: 'bkup_url' - -{coreboot}{ - rev: HEAD - loc: coreboot/coreboot - url: https://review.coreboot.org/coreboot - bkup_url: https://github.com/coreboot/coreboot.git -} - -{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 -} - -{grub}{ - rev: db1faedccdce3cf83336155a95c04a8db03744c5 - loc: grub - url: git://git.savannah.gnu.org/grub.git - bkup_url: http://git.savannah.gnu.org/r/grub.git - depend: gnulib -} - -{gnulib}{ - rev: 9f48fb992a3d7e96610c4ce8be969cff2d61a01b - loc: grub/gnulib - url: git://git.sv.gnu.org/gnulib -} - -{me_cleaner}{ - rev: 43612a630c79f3bc6f2653bfe90dfe0b7b137e08 - loc: me_cleaner - url: https://github.com/corna/me_cleaner.git -} - -{memtest86plus}{ - rev: 5dcd424ea7afb857c1171e747ef064d98d26afeb - loc: memtest86plus - url: https://github.com/memtest86plus/memtest86plus.git -} - -{seabios}{ - rev: HEAD - loc: seabios/seabios - url: https://review.coreboot.org/seabios - bkup_url: https://github.com/coreboot/seabios -} - -{flashrom}{ - rev: 11680db4e1251eb842bee11e53b6d1f0ae67767b - loc: flashrom - url: https://review.coreboot.org/flashrom.git -} - -{bios_extract}{ - rev: 0a7bc1d71735ef97b00dfec0fd54a02fcc5d1bb0 - loc: bios_extract - url: https://review.coreboot.org/bios_extract -} - -{biosutilities}{ - rev: 03ae0cf0706ede5a2a15da0986c19c776d0e6b26 - loc: biosutilities - url: https://github.com/platomav/BIOSUtilities -} - -{uefitool}{ - rev: 4a41c33596e9bc3ae812e763965d91ac57553e02 - loc: uefitool - url: https://github.com/LongSoft/UEFITool -} - - -{rpi-pico-sdk}{ - rev: 6a7db34ff63345a7badec79ebea3aaef1712f374 - loc: util-fw/rp2040/pico-sdk - url: https://github.com/raspberrypi/pico-sdk -} - -{rpi-pico-tinyusb}{ - rev: 86c416d4c0fb38432460b3e11b08b9de76941bf5 - loc: util-fw/rp2040/pico-sdk/lib/tinyusb - url: https://github.com/hathach/tinyusb.git -} - -{rpi-pico-serprog}{ - rev: c8c16e9c11fe9e5b7230ff358f79de3f1951e1d9 - loc: util-fw/rp2040/pico-serprog - url: https://codeberg.org/libreboot/pico-serprog - bkup_url: https://notabug.org/libreboot/pico-serprog - depend: rpi-pico-sdk - depend: rpi-pico-tinyusb -} - -{stm32-vserprog}{ - rev: 8fcf0a4d41800631b571fa7bbd1d8b251f0a2111 - loc: util-fw/stm32-vserprog - url: https://codeberg.org/libreboot/stm32-vserprog - bkup_url: https://notabug.org/libreboot/stm32-vserprog - depend: libopencm3 -} - -{libopencm3}{ - rev: 458250dc6147dc807eec9e4d5a6caf38a699ecb1 - loc: util-fw/stm32-vserprog/libopencm3 - url: https://github.com/libopencm3/libopencm3 -} diff --git a/config/git/seabios b/config/git/seabios new file mode 100644 index 00000000..62c90d30 --- /dev/null +++ b/config/git/seabios @@ -0,0 +1,6 @@ +{seabios}{ + rev: HEAD + loc: seabios/seabios + url: https://review.coreboot.org/seabios + bkup_url: https://github.com/coreboot/seabios +} diff --git a/config/git/serprog b/config/git/serprog new file mode 100644 index 00000000..cbfc1b3e --- /dev/null +++ b/config/git/serprog @@ -0,0 +1,34 @@ +{rpi-pico-sdk}{ + rev: 6a7db34ff63345a7badec79ebea3aaef1712f374 + loc: util-fw/rp2040/pico-sdk + url: https://github.com/raspberrypi/pico-sdk +} + +{rpi-pico-tinyusb}{ + rev: 86c416d4c0fb38432460b3e11b08b9de76941bf5 + loc: util-fw/rp2040/pico-sdk/lib/tinyusb + url: https://github.com/hathach/tinyusb.git +} + +{rpi-pico-serprog}{ + rev: c8c16e9c11fe9e5b7230ff358f79de3f1951e1d9 + loc: util-fw/rp2040/pico-serprog + url: https://codeberg.org/libreboot/pico-serprog + bkup_url: https://notabug.org/libreboot/pico-serprog + depend: rpi-pico-sdk + depend: rpi-pico-tinyusb +} + +{stm32-vserprog}{ + rev: 8fcf0a4d41800631b571fa7bbd1d8b251f0a2111 + loc: util-fw/stm32-vserprog + url: https://codeberg.org/libreboot/stm32-vserprog + bkup_url: https://notabug.org/libreboot/stm32-vserprog + depend: libopencm3 +} + +{libopencm3}{ + rev: 458250dc6147dc807eec9e4d5a6caf38a699ecb1 + loc: util-fw/stm32-vserprog/libopencm3 + url: https://github.com/libopencm3/libopencm3 +} diff --git a/config/git/u-boot b/config/git/u-boot new file mode 100644 index 00000000..4057c089 --- /dev/null +++ b/config/git/u-boot @@ -0,0 +1,6 @@ +{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/uefitool b/config/git/uefitool new file mode 100644 index 00000000..735d67da --- /dev/null +++ b/config/git/uefitool @@ -0,0 +1,5 @@ +{uefitool}{ + rev: 4a41c33596e9bc3ae812e763965d91ac57553e02 + loc: uefitool + url: https://github.com/LongSoft/UEFITool +} diff --git a/script/update/project/repo b/script/update/project/repo index 9f0a9180..d951fb3b 100755 --- a/script/update/project/repo +++ b/script/update/project/repo @@ -36,6 +36,12 @@ main() read_config() { + revfile="$(mktemp -t gitrevisions.XXXXXXXXXX)" || \ + fail "read_config: Cannot initialise tmpfile" + + cat config/git/* > "${revfile}" || \ + fail "read_config: Cannot concatenate revision files" + awkstr=" /\{.*${name}.*}{/ {flag=1;next} /\}/{flag=0} flag { print }" while read -r line ; do set ${line} || fail "read_config: set line" @@ -52,8 +58,11 @@ read_config() depend="${depend} ${2} " ;; esac done << EOF - $(eval "awk '${awkstr}' config/git/revisions") + $(eval "awk \"${awkstr}\" \"${revfile}\"") EOF + + rm -f "${revfile}" || \ + fail "read_config: can't remove tmp revfile" } verify_config() @@ -115,7 +124,7 @@ usage() Usage: ./update project repo [name] Options: - name: Module name as specified in config/git/revisions + name: Module name as specified in files under config/git/ EOF }