From ff16d2799158761f478970ee6b9146b3e257c765 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 6 Jun 2024 21:45:53 +0100 Subject: [PATCH] put coreboot utils in elf/, not cbutils/ one directory per util, under elf/ e.g. elf/cbfstool/ further split by tree name, e.g.: elf/cbfstool/default/ elf/cbfstool/foo/ Signed-off-by: Leah Rowe --- .gitignore | 1 - include/lib.sh | 19 ++++++++++++------- script/roms | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 8b85816..c15f1d1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ *.o /cbmk.err.log /docs/ -/cbutils/ /util/dell-flash-unlock/dell_flash_unlock /TODO /tmp/ diff --git a/include/lib.sh b/include/lib.sh index f4214e2..eed75e2 100755 --- a/include/lib.sh +++ b/include/lib.sh @@ -8,8 +8,8 @@ export LC_ALL=C tmpdir_was_set="y" cbdir="src/coreboot/default" -ifdtool="cbutils/default/ifdtool" -cbfstool="cbutils/default/cbfstool" +ifdtool="elf/ifdtool/default/ifdtool" +cbfstool="elf/cbfstool/default/cbfstool" tmpgit="$PWD/tmp/gitclone" grubdata="config/data/grub" err="err_" @@ -157,11 +157,16 @@ check_defconfig() handle_coreboot_utils() { for util in cbfstool ifdtool; do - x_ make -C "src/coreboot/$1/util/$util" - [ -z "$mode" ] && [ ! -f "cbutils/$1/$util" ] && \ - x_ mkdir -p "cbutils/$1" && \ - x_ cp "src/coreboot/$1/util/$util/$util" "cbutils/$1" - [ -z "$mode" ] || x_ rm -Rf "cbutils/$1" + utilelfdir="elf/$util/$1" + utilsrcdir="src/coreboot/$1/util/$util" + + utilmode="" + [ -z "$mode" ] || utilmode="clean" + x_ make -C "$utilsrcdir" $utilmode + [ -z "$mode" ] && [ ! -f "$utilelfdir/$util" ] && \ + x_ mkdir -p "$utilelfdir" && \ + x_ cp "$utilsrcdir/$util" "elf/$util/$1" + [ -z "$mode" ] || x_ rm -Rf "$utilelfdir" done } diff --git a/script/roms b/script/roms index a465eb0..6466c0e 100755 --- a/script/roms +++ b/script/roms @@ -209,7 +209,7 @@ build_payloads() romdir="bin/$board" cbdir="src/coreboot/$board" [ "$board" = "$tree" ] || cbdir="src/coreboot/$tree" - cbfstool="cbutils/$tree/cbfstool" + cbfstool="elf/cbfstool/$tree/cbfstool" cbrom="$cbdir/build/coreboot.rom" [ -f "$cbfstool" ] || x_ ./update trees -b coreboot utils $tree