From 459db1cc2eaa1d40543f7f63345ea4ca27daad9a Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 10 Jul 2024 13:06:32 +0100 Subject: trees: remove project-specific hacks move the coreboot-specific includes into mkhelper.cfg for that project. on some projects, we need variables from mkhelper.cfg to be global, so I was including serprog and coreboot mkhelper.cfg files in this script. instead, set a new variable "mkhelpercfg" pointing to the config file. if it doesn't exist, create and then point to a temporary (empty) mkhelper.cfg file. the rom.sh include has been moved to coreboot mkhelper.cfg The only remaining project-specific logic, in this trees script, is now the coreboot crossgcc handling, but this needs to be there as it's also used to build U-Boot. The way this now works, certain includes are done twice. For example, include/rom.sh will be included once globally, outside of main(), and then again in configure_project(). This means that certain functions will be defined twice. I'm uncertain if shell has anything equivalent to an ifdef guard as in C, but we actually want this here anyway, and it shouldn't cause any problems. It's a bit of a hack, but otherwise results in much cleaner code. Signed-off-by: Leah Rowe --- config/data/coreboot/mkhelper.cfg | 2 ++ config/data/grub/mkhelper.cfg | 2 ++ config/data/pico-serprog/mkhelper.cfg | 2 ++ config/data/seabios/mkhelper.cfg | 0 config/data/stm32-vserprog/mkhelper.cfg | 2 ++ 5 files changed, 8 insertions(+) create mode 100644 config/data/seabios/mkhelper.cfg (limited to 'config') diff --git a/config/data/coreboot/mkhelper.cfg b/config/data/coreboot/mkhelper.cfg index a1c48e63..de07b4c1 100644 --- a/config/data/coreboot/mkhelper.cfg +++ b/config/data/coreboot/mkhelper.cfg @@ -1,3 +1,5 @@ +. "include/rom.sh" + makeargs="UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS" build_depend="seabios/default grub/default memtest86plus" diff --git a/config/data/grub/mkhelper.cfg b/config/data/grub/mkhelper.cfg index ff93a27c..b75cf9d7 100644 --- a/config/data/grub/mkhelper.cfg +++ b/config/data/grub/mkhelper.cfg @@ -1,3 +1,5 @@ +. "include/rom.sh" + bootstrapargs="--gnulib-srcdir=gnulib/ --no-git" autoconfargs="--with-platform=coreboot --disable-werror" makeargs="FS_PAYLOAD_MODULES=\"\"" diff --git a/config/data/pico-serprog/mkhelper.cfg b/config/data/pico-serprog/mkhelper.cfg index 9f6e54cc..e424e2f4 100644 --- a/config/data/pico-serprog/mkhelper.cfg +++ b/config/data/pico-serprog/mkhelper.cfg @@ -1,3 +1,5 @@ +. "include/rom.sh" + sersrc="src/pico-serprog" serx="$sersrc/build/pico_serprog.uf2" picosdk="src/pico-sdk" diff --git a/config/data/seabios/mkhelper.cfg b/config/data/seabios/mkhelper.cfg new file mode 100644 index 00000000..e69de29b diff --git a/config/data/stm32-vserprog/mkhelper.cfg b/config/data/stm32-vserprog/mkhelper.cfg index 9d02f799..8f45d7fd 100644 --- a/config/data/stm32-vserprog/mkhelper.cfg +++ b/config/data/stm32-vserprog/mkhelper.cfg @@ -1,3 +1,5 @@ +. "include/rom.sh" + sersrc="src/stm32-vserprog" serx="$sersrc/stm32-vserprog.hex" serdir="$sersrc/boards" -- cgit v1.2.1