update/project/*: merge to update/project/trees

Just one script.

Just one!

Well, two, but the 2nd one already existed:
logic in update/project/trees and
update/project/repo was merged into
include/git.sh and update/project/build
was renamed to update/project/trees; an -f
option was added, which calls the functions
under git.sh

so git clones are now handled by the main build
script (for handling makefiles and defconfigs)
but the logic there is a stub, where git.sh
does all the actual heavy lifting

this cuts the file count down by two, and reduces
sloccount a reasonable amount because much of
the logic already exists in the build script, when
it comes to handling targets. git.sh was adjusted
to integrate with this, rather than act standalone

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2023-10-07 06:55:10 +01:00
parent a413c01a3e
commit 1e89264ce3
12 changed files with 408 additions and 478 deletions
+5 -5
View File
@@ -125,13 +125,13 @@ prepare_target()
cbfstool="cbutils/${tree}/cbfstool"
cbrom="${cbdir}/build/coreboot.rom"
x_ ./update project build -b coreboot utils ${tree}
x_ ./update project trees -b coreboot utils ${tree}
build_dependency_seabios
memtest_bin="memtest86plus/build${arch#*_}/memtest.bin"
[ "${payload_memtest}" != "y" ] || [ -f "src/${memtest_bin}" ] || \
x_ ./update project build -b memtest86plus
x_ ./update project trees -b memtest86plus
x_ rm -f "${romdir}/"*
@@ -148,7 +148,7 @@ build_dependency_seabios()
|| [ ! -f elf/seabios/default/libgfxinit/bios.bin.elf ] \
|| [ ! -f elf/seabios/default/vgarom/bios.bin.elf ] \
|| [ ! -f elf/seabios/default/normal/bios.bin.elf ]; then
x_ ./update project build -b seabios
x_ ./update project trees -b seabios
fi
}
@@ -176,7 +176,7 @@ build_dependency_uboot()
{
[ "${payload_uboot}" = "y" ] || return 0
x_ ./update project build -b u-boot ${board}
x_ ./update project trees -b u-boot ${board}
ubdir="elf/u-boot/${board}/${uboot_config}"
ubootelf="${ubdir}/u-boot.elf"
[ ! -f "${ubootelf}" ] && [ -f "${ubdir}/u-boot.bin" ] && \
@@ -213,7 +213,7 @@ build_roms()
"${cbcfg}" "${board}" "${displaymode}" "${initmode}" \
1>&2 && return 0
x_ ./update project build -b coreboot ${board}
x_ ./update project trees -b coreboot ${board}
_cbrom="elf/coreboot/${board}/${initmode}_${displaymode}"
[ "${initmode}" = "normal" ] && \
+1 -1
View File
@@ -23,7 +23,7 @@ main()
handle_dependencies()
{
[ -d "src/grub" ] || x_ ./update project repo grub
[ -d "src/grub" ] || x_ ./update project trees -f grub
[ -f "src/grub/grub-mkstandalone" ] || build_grub_utils
x_ mkdir -p "${elfdir}"
x_ rm -f "${elfdir}/"*
+2 -2
View File
@@ -23,12 +23,12 @@ main()
platform="rp2040"
boards_dir=${pico_sdk_dir}/src/boards/include/boards
[ -d "${pico_src_dir}/" ] || \
x_ ./update project repo "rpi-pico-serprog"
x_ ./update project trees -f "rpi-pico-serprog"
elif [ "${1}" = "stm32" ]; then
platform="stm32"
boards_dir=${stm32_src_dir}/boards
[ -d "${stm32_src_dir}/" ] || \
x_ ./update project repo "stm32-vserprog"
x_ ./update project trees -f "stm32-vserprog"
else
err "${usage}"
fi