summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-06 03:08:24 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-06 03:13:52 +0100
commit315fed5f48ceed270e29b313f383923cb6344002 (patch)
tree9bf21d86d5b2893f467f2b1543cb22bf808410dd /script
parentb8112af953e96e6f62f7d2e1cdce8a20f976fda2 (diff)
trees: handle build-test on multi-tree projects
for example, now flashprog binaries could be placed in the elf/ directory, under elf/flashprog/ Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-xscript/trees11
1 files changed, 9 insertions, 2 deletions
diff --git a/script/trees b/script/trees
index 9fdb568f..212bb665 100755
--- a/script/trees
+++ b/script/trees
@@ -36,6 +36,7 @@ main()
elfdir="elf/$project"
datadir="config/data/$project"
cfgsdir="config/$project"
+ listfile="$datadir/build.list" # needed on multi, optional on single
remkdir "${tmpgit%/*}"
@@ -52,12 +53,18 @@ build_projects()
eval "fetch_project_repo; return 0;"
load_project_config "$cfgsdir"
+ [ -f "$listfile" ] || listfile="" # optional on single-tree
+
+ dest_dir="$elfdir"
cdir="src/${project}"
[ -d "$cdir" ] || x_ ./update trees -f "$project"
[ "$mode" = "distclean" ] && mode="clean"
run_make_command || return 0
+
+ [ -n "$mode" ] || x_ mkdir -p "$elfdir"
+ [ -n "$mode" ] || copy_elf; return 0
}
build_targets()
@@ -66,8 +73,6 @@ build_targets()
elfdir="elf/coreboot_nopayload_DO_NOT_FLASH"
[ -d "$cfgsdir" ] || $err "directory, $cfgsdir, does not exist"
-
- listfile="$datadir/build.list"
[ -f "$listfile" ] || $err "list file, $listfile, does not exist"
# Build for all targets if no argument is given
@@ -259,6 +264,8 @@ mkpayload_grub()
copy_elf()
{
+ [ -z "$listfile" ] && return 0
+
while read -r f; do
[ -f "$cdir/$f" ] && x_ cp "$cdir/$f" "$dest_dir"
done < "$listfile"