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 <leah@libreboot.org>
20240612_branch
Leah Rowe 2024-06-06 21:45:53 +01:00
parent d1ba085153
commit c0822ac458
4 changed files with 17 additions and 13 deletions

1
.gitignore vendored
View File

@ -2,7 +2,6 @@
*.o *.o
/lbmk.err.log /lbmk.err.log
/docs/ /docs/
/cbutils/
/pciroms/ /pciroms/
/util/dell-flash-unlock/dell_flash_unlock /util/dell-flash-unlock/dell_flash_unlock
/TODO /TODO

View File

@ -8,8 +8,8 @@ export LC_ALL=C
tmpdir_was_set="y" tmpdir_was_set="y"
cbdir="src/coreboot/default" cbdir="src/coreboot/default"
ifdtool="cbutils/default/ifdtool" ifdtool="elf/ifdtool/default/ifdtool"
cbfstool="cbutils/default/cbfstool" cbfstool="elf/cbfstool/default/cbfstool"
tmpgit="$PWD/tmp/gitclone" tmpgit="$PWD/tmp/gitclone"
grubdata="config/data/grub" grubdata="config/data/grub"
err="err_" err="err_"
@ -157,11 +157,16 @@ check_defconfig()
handle_coreboot_utils() handle_coreboot_utils()
{ {
for util in cbfstool ifdtool; do for util in cbfstool ifdtool; do
x_ make -C "src/coreboot/$1/util/$util" utilelfdir="elf/$util/$1"
[ -z "$mode" ] && [ ! -f "cbutils/$1/$util" ] && \ utilsrcdir="src/coreboot/$1/util/$util"
x_ mkdir -p "cbutils/$1" && \
x_ cp "src/coreboot/$1/util/$util/$util" "cbutils/$1" utilmode=""
[ -z "$mode" ] || x_ rm -Rf "cbutils/$1" [ -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 done
} }

View File

@ -56,7 +56,7 @@ detect_firmware()
[ -z "$tree" ] && $err "detect_firmware $boarddir: tree undefined" [ -z "$tree" ] && $err "detect_firmware $boarddir: tree undefined"
cbdir="src/coreboot/$tree" cbdir="src/coreboot/$tree"
cbfstool="cbutils/$tree/cbfstool" cbfstool="elf/cbfstool/$tree/cbfstool"
mecleaner="$PWD/$cbdir/util/me_cleaner/me_cleaner.py" mecleaner="$PWD/$cbdir/util/me_cleaner/me_cleaner.py"
kbc1126_ec_dump="$PWD/$cbdir/util/kbc1126/kbc1126_ec_dump" kbc1126_ec_dump="$PWD/$cbdir/util/kbc1126/kbc1126_ec_dump"
@ -80,7 +80,7 @@ build_dependencies_download()
[ ! -d "${kbc1126_ec_dump%/*}" ] || [ -f "$kbc1126_ec_dump" ] || x_ \ [ ! -d "${kbc1126_ec_dump%/*}" ] || [ -f "$kbc1126_ec_dump" ] || x_ \
make -C "$cbdir/util/kbc1126" make -C "$cbdir/util/kbc1126"
[ -n "$MRC_refcode_cbtree" ] && \ [ -n "$MRC_refcode_cbtree" ] && \
cbfstoolref="cbutils/$MRC_refcode_cbtree/cbfstool" cbfstoolref="elf/cbfstool/$MRC_refcode_cbtree/cbfstool"
[ -z "$cbfstoolref" ] || [ -f "$cbfstoolref" ] || \ [ -z "$cbfstoolref" ] || [ -f "$cbfstoolref" ] || \
x_ ./update trees -b coreboot utils $MRC_refcode_cbtree x_ ./update trees -b coreboot utils $MRC_refcode_cbtree
[ -f "$cbfstool" ] && [ -f "$ifdtool" ] && return 0 [ -f "$cbfstool" ] && [ -f "$ifdtool" ] && return 0
@ -337,8 +337,8 @@ detect_board()
build_dependencies_inject() build_dependencies_inject()
{ {
cbdir="src/coreboot/$tree" cbdir="src/coreboot/$tree"
cbfstool="cbutils/$tree/cbfstool" cbfstool="elf/cbfstool/$tree/cbfstool"
ifdtool="cbutils/$tree/ifdtool" ifdtool="elf/ifdtool/$tree/ifdtool"
[ -d "$cbdir" ] || x_ ./update trees -f coreboot $tree [ -d "$cbdir" ] || x_ ./update trees -f coreboot $tree
if [ ! -f "$cbfstool" ] || [ ! -f "$ifdtool" ]; then if [ ! -f "$cbfstool" ] || [ ! -f "$ifdtool" ]; then
x_ ./update trees -b coreboot utils $tree x_ ./update trees -b coreboot utils $tree

View File

@ -209,7 +209,7 @@ build_payloads()
romdir="bin/$board" romdir="bin/$board"
cbdir="src/coreboot/$board" cbdir="src/coreboot/$board"
[ "$board" = "$tree" ] || cbdir="src/coreboot/$tree" [ "$board" = "$tree" ] || cbdir="src/coreboot/$tree"
cbfstool="cbutils/$tree/cbfstool" cbfstool="elf/cbfstool/$tree/cbfstool"
cbrom="$cbdir/build/coreboot.rom" cbrom="$cbdir/build/coreboot.rom"
[ -f "$cbfstool" ] || x_ ./update trees -b coreboot utils $tree [ -f "$cbfstool" ] || x_ ./update trees -b coreboot utils $tree