From 0ed2ec294bf31d8218e16bcf582031e6b319348f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 7 Oct 2023 05:03:57 +0100 Subject: build/coreboot/util: merge to update/project/build The benefit now is that it can be cleaned. E.g. ./update project build -b coreboot utils ./update project build -b coreboot utils default ./update project build -c coreboot utils ./update project build -c coreboot utils default the update/project/build script checks when arguments are provided after the project name. if the first one is "utils", then it acts in the same way as the old build/coreboot/util script Signed-off-by: Leah Rowe --- script/build/coreboot/utils | 46 --------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100755 script/build/coreboot/utils (limited to 'script/build/coreboot/utils') diff --git a/script/build/coreboot/utils b/script/build/coreboot/utils deleted file mode 100755 index 65c565bb..00000000 --- a/script/build/coreboot/utils +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env sh -# SPDX-License-Identifier: GPL-3.0-or-later -# SPDX-FileCopyrightText: 2014-2016,2020,2021,2023 Leah Rowe - -[ "x${DEBUG+set}" = 'xset' ] && set -v -set -u -e - -. "include/err.sh" -. "include/option.sh" - -main() -{ - printf "Building coreboot utils\n" - target="${@}" - [ $# -gt 0 ] || target=$(listitems config/coreboot) || err "!targets" - for x in ${target}; do - x_ build_for_mainboard ${x} - done -} - -build_for_mainboard() { - [ -f "config/coreboot/${1}/target.cfg" ] || \ - err "build_for_mainboard ${1}: target.cfg does not exist" - tree="" - . "config/coreboot/${1}/target.cfg" # source - [ -z ${tree} ] && \ - err "build_for_mainboard ${1}: improper tree definition" - buildutils "${tree}" -} - -buildutils() { - [ -d "src/coreboot/${1}/" ] || \ - x_ ./update project trees coreboot ${1} - for util in cbfstool ifdtool; do - [ -f "cbutils/${1}/${util}" ] && continue - [ -d "cbutils/${1}" ] || x_ mkdir -p "cbutils/${1}" - - utildir="src/coreboot/${1}/util/${util}" - x_ make distclean -C "${utildir}" - x_ make -j$(nproc) -C "${utildir}" - x_ cp "${utildir}/${util}" "cbutils/${1}" - x_ make distclean -C "${utildir}" - done -} - -main $@ -- cgit v1.2.1