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/build/payload/u-boot | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'resources/scripts/build/payload') 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 -- cgit v1.2.1