summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-01-21 06:26:23 +0000
committerLeah Rowe <leah@libreboot.org>2024-01-21 06:26:23 +0000
commit8f3d3eada9afd9ecc19d180aa2899062435501b6 (patch)
treef157702caa94bcb34c792a92b7d13492b832d581
parent8a9c70f2f6d8035279b8fe183ea6ad92b79392b1 (diff)
re-use crossgcc builds on the coreboot trees
don't build crossgcc twice, especially if two coreboot trees use the same revision! Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--config/coreboot/dell/target.cfg1
-rw-r--r--config/coreboot/fam15h_udimm/target.cfg1
-rwxr-xr-xinclude/git.sh13
3 files changed, 14 insertions, 1 deletions
diff --git a/config/coreboot/dell/target.cfg b/config/coreboot/dell/target.cfg
index f1918b99..32ee7ff1 100644
--- a/config/coreboot/dell/target.cfg
+++ b/config/coreboot/dell/target.cfg
@@ -1,2 +1,3 @@
tree="dell"
+xtree="default"
rev="d862695f5f432b5c78dada5f16c293a4c3f9fce6"
diff --git a/config/coreboot/fam15h_udimm/target.cfg b/config/coreboot/fam15h_udimm/target.cfg
index b9950814..77c6799d 100644
--- a/config/coreboot/fam15h_udimm/target.cfg
+++ b/config/coreboot/fam15h_udimm/target.cfg
@@ -1,4 +1,5 @@
tree="fam15h_udimm"
+xtree="fam15h_rdimm"
rev="1c13f8d85c7306213cd525308ee8973e5663a3f8"
payload_grub="n"
payload_grub_withseabios="n"
diff --git a/include/git.sh b/include/git.sh
index d1e9389b..7840671f 100755
--- a/include/git.sh
+++ b/include/git.sh
@@ -4,7 +4,7 @@
# This file is only used by update/project/trees
-eval "$(setvars "" _target rev _xm loc url bkup_url depend)"
+eval "$(setvars "" _target rev _xm loc url bkup_url depend xtree)"
fetch_project_trees()
{
@@ -97,10 +97,21 @@ git_prep()
if [ "$project" != "coreboot" ] || [ $# -gt 2 ]; then
[ ! -f "$tmpgit/.gitmodules" ] || git -C "$tmpgit" submodule \
update --init --checkout || err "git_prep $_loc: !submod"
+ if [ "$project" = "coreboot" ] && [ -n "$xtree" ] && \
+ [ "$xtree" != "$tree" ]; then
+ (
+ cd "$tmpgit/util" || err "prep $_loc: !cd $tmpgit/util"
+ rm -Rf crossgcc || err "prep $_loc: !rm xgcc"
+ ln -s "../../$xtree/util/crossgcc" crossgcc || \
+ err "prep $_loc: can't create xgcc symlink"
+ ) || err "prep $_loc: can't create xgcc symlink"
+ fi
fi
[ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}"
mv "$tmpgit" "$_loc" || err "git_prep: !mv $tmpgit $_loc"
+ [ -n "$xtree" ] && [ ! -d "src/coreboot/$xtree" ] && \
+ x_ ./update project trees -f coreboot "$xtree"; return 0
}
git_am_patches()