summaryrefslogtreecommitdiff
path: root/resources/scripts/update/u-boot
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/update/u-boot
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/update/u-boot')
-rwxr-xr-xresources/scripts/update/u-boot/configs26
1 files changed, 13 insertions, 13 deletions
diff --git a/resources/scripts/update/u-boot/configs b/resources/scripts/update/u-boot/configs
index b01ef0db..4dbb05bc 100755
--- a/resources/scripts/update/u-boot/configs
+++ b/resources/scripts/update/u-boot/configs
@@ -31,38 +31,38 @@ printf "Updating U-Boot configs\n"
# Build ROM images for supported boards
updateconf() {
board="$1"
- if [ -f "resources/u-boot/${board}/board.cfg" ]; then
- ubtree="undefined"
- . "resources/u-boot/${board}/board.cfg" # source
- if [ "${ubtree}" = "undefined" ]; then
+ if [ -f "resources/u-boot/${board}/target.cfg" ]; then
+ tree="undefined"
+ . "resources/u-boot/${board}/target.cfg" # source
+ if [ "${tree}" = "undefined" ]; then
return 0
fi
- if [ ! -d "u-boot/${ubtree}" ]; then
- ./download u-boot ${ubtree}
+ if [ ! -d "u-boot/${tree}" ]; then
+ ./fetch_trees u-boot ${tree}
fi
for ubcfg in resources/u-boot/${board}/config/*; do
if [ ! -f ${ubcfg} ]; then
continue
fi
(
- cd u-boot/${ubtree}/
+ cd u-boot/${tree}/
rm -f .config*
make distclean
)
- mv $ubcfg u-boot/${ubtree}/.config
+ mv $ubcfg u-boot/${tree}/.config
(
- cd u-boot/${ubtree}/
+ cd u-boot/${tree}/
make oldconfig
)
- mv u-boot/${ubtree}/.config $ubcfg
- rm -f u-boot/${ubtree}/.config*
+ mv u-boot/${tree}/.config $ubcfg
+ rm -f u-boot/${tree}/.config*
(
- cd u-boot/${ubtree}/
+ cd u-boot/${tree}/
make distclean
)
done
else
- printf "\nupdate/config/u-boot: no board.cfg for: %s\n" "${board}"
+ printf "\nupdate/config/u-boot: no target.cfg for: %s\n" "${board}"
fi
}