summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/data/coreboot/mkhelper.cfg2
-rw-r--r--config/data/grub/mkhelper.cfg2
-rw-r--r--config/data/pico-serprog/mkhelper.cfg2
-rw-r--r--config/data/seabios/mkhelper.cfg0
-rw-r--r--config/data/stm32-vserprog/mkhelper.cfg2
-rwxr-xr-xscript/trees25
6 files changed, 23 insertions, 10 deletions
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
--- /dev/null
+++ b/config/data/seabios/mkhelper.cfg
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"
diff --git a/script/trees b/script/trees
index 1d8c755f..e8f8756f 100755
--- a/script/trees
+++ b/script/trees
@@ -8,15 +8,11 @@ set -u -e
. "include/lib.sh"
. "include/git.sh"
-. "include/rom.sh"
-
-. "config/data/pico-serprog/mkhelper.cfg"
-. "config/data/coreboot/mkhelper.cfg"
eval `setvars "" xarch cdir defconfig cmakedir xlang mode makeargs elfdir cmd \
project target target_dir targets xtree _f release bootstrapargs mkhelper \
autoconfargs listfile autogenargs btype tree rev tree_depend build_depend \
- premake postmake`
+ premake postmake mkhelpercfg`
main()
{
@@ -54,10 +50,16 @@ main()
listfile="$datadir/build.list" # needed on multi, optional on single
[ -f "$listfile" ] || listfile="" # optional on all projects
+ mkhelpercfg="$datadir/mkhelper.cfg"
+
+ targets="$@"
remkdir "${tmpgit%/*}"
+}
- cmd="build_targets" && singletree "$project" && cmd="build_project"
- $cmd $@
+handle_project()
+{
+ cmd="build_targets $targets" && singletree "$project" && \
+ cmd="build_project"; $cmd
[ -f "$listfile" ] || return 0
[ -z "$mode" ] && [ "$_f" = "-b" ] && \
@@ -84,9 +86,8 @@ build_targets()
{
[ -d "$cfgsdir" ] || $err "directory, $cfgsdir, does not exist"
- # Build for all targets if no argument is given
- targets="$(ls -1 "$cfgsdir")" || $err "Can't get options for $cfgsdir"
- [ $# -gt 0 ] && targets=$@
+ [ $# -gt 0 ] || \
+ targets="$(ls -1 "$cfgsdir")" || $err "$cfgsdir: Canot get options"
handle_targets
}
@@ -288,3 +289,7 @@ copy_elf()
}
main $@
+e "$mkhelpercfg" f missing && mkhelpercfg="$TMPDIR/mkhelper.cfg" && x_ \
+ touch "$mkhelpercfg"
+. "$mkhelpercfg"
+handle_project