From 59dba6cfcdc6c154e4d46c14c42e7b6f0b84c7b5 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 16 Aug 2023 21:34:21 +0100 Subject: 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 --- resources/scripts/update/u-boot/configs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'resources/scripts/update/u-boot') 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 } -- cgit v1.2.1