summaryrefslogtreecommitdiff
path: root/resources/scripts/build/payload
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-08-16 21:34:21 +0100
committerLeah Rowe <leah@libreboot.org>2023-08-16 22:40:34 +0100
commit59dba6cfcdc6c154e4d46c14c42e7b6f0b84c7b5 (patch)
tree59147fae1f05a32c954772cd22ffab1405aaad0b /resources/scripts/build/payload
parent2453c303e64b3b3c2480564106ea77d89af624d8 (diff)
merge coreboot/u-boot download logic to one script
they are fundamentally the same, in an lbmk context. they are downloaded in the same way, and compiled in the same way! (Kconfig infrastructure, board-specific code, the way submodules are used in git, etc) ~200 sloc reduction in resources/scripts the audit begins Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'resources/scripts/build/payload')
-rwxr-xr-xresources/scripts/build/payload/u-boot22
1 files changed, 11 insertions, 11 deletions
diff --git a/resources/scripts/build/payload/u-boot b/resources/scripts/build/payload/u-boot
index bff41400..a98d133d 100755
--- a/resources/scripts/build/payload/u-boot
+++ b/resources/scripts/build/payload/u-boot
@@ -26,7 +26,7 @@ RET=0
pdir="payload/u-boot"
ubdir=""
arch=""
-ubtree=""
+tree=""
config_name=""
board_dir=""
@@ -86,21 +86,21 @@ handle_dependencies()
rm -rf "${pdir}/${board}"
mkdir -p "${pdir}/${board}"
- ubtree="undefined"
+ tree="undefined"
arch="undefined"
- if [ ! -f "${board_dir}/board.cfg" ]; then
- printf "build/u-boot %s: Missing board.cfg.\n" \
+ if [ ! -f "${board_dir}/target.cfg" ]; then
+ printf "build/u-boot %s: Missing target.cfg.\n" \
"${board}"
RET=1
return 1
fi
- # Override the above defaults using board.cfg
- . "${board_dir}/board.cfg" # source
+ # Override the above defaults using target.cfg
+ . "${board_dir}/target.cfg" # source
- if [ "${ubtree}" = "undefined" ]; then
- printf "build/u-boot %s: ubtree undefined\n" \
+ if [ "${tree}" = "undefined" ]; then
+ printf "build/u-boot %s: tree undefined\n" \
"${board}"
RET=1
return 1
@@ -113,12 +113,12 @@ handle_dependencies()
fi
ubdir="u-boot/${board}"
- if [ "${board}" != "${ubtree}" ]; then
- ubdir="u-boot/${ubtree}"
+ if [ "${board}" != "${tree}" ]; then
+ ubdir="u-boot/${tree}"
fi
if [ ! -d "${ubdir}" ]; then
- ./download u-boot "$board"
+ ./fetch_trees u-boot "$board"
fi
if [ ! -d "${ubdir}" ]; then