diff options
author | Leah Rowe <leah@libreboot.org> | 2025-07-08 13:20:28 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-07-08 13:38:59 +0100 |
commit | cc82b733d3dbf5f91badede6daf88ba724a0d9d8 (patch) | |
tree | f079cc6bb0dd24ef8ce92823bbe365000d065144 | |
parent | 9541dfcefae0e5f4262dc965e4f109d73c505a78 (diff) |
tree.sh: Place target builds under tree/target/
as opposed to target/
for example:
image the command:
./mk -b u-boot amd64coreboot
This would put the U-Boot binaries here:
elf/u-boot/amd64coreboot/default/
With this change, they now go here:
elf/u-boot/x86_64/amd64coreboot/default/
This solves a problem that existed previously, where
you could modify a given tree in a multi-tree project,
but cached builds for targets branching separately off
of each tree would not be deleted, and thus not re-built.
This accomplishes such a result, without needing to
further check hashes of individual targets.
The latter will still be done, in a future change, because
this change doesn't fix another problem:
If you change a given config, e.g. targetname "foo" which
uses tree "bar", elf/foo/ would not be removed automatically
for re-build.
So this change only deletes individual target builds when
their master tree changes.
Where the target and tree are the same, this also means
elf/tree/target/
for example: seabios/default would create binaries in:
elf/seabios/default/default/
not:
elf/seabios/default/
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | config/data/coreboot/mkhelper.cfg | 2 | ||||
-rw-r--r-- | include/rom.sh | 9 | ||||
-rw-r--r-- | include/tree.sh | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/config/data/coreboot/mkhelper.cfg b/config/data/coreboot/mkhelper.cfg index da9015f1..743d7c5b 100644 --- a/config/data/coreboot/mkhelper.cfg +++ b/config/data/coreboot/mkhelper.cfg @@ -3,7 +3,7 @@ makeargs="UPDATED_SUBMODULES=1 CPUS=$XBMK_THREADS" build_depend="seabios/default grub/default memtest86plus u-boot/amd64coreboot" -seavgabiosrom="elf/seabios/default/libgfxinit/vgabios.bin" +seavgabiosrom="elf/seabios/default/default/libgfxinit/vgabios.bin" pv="payload_seabios payload_memtest payload_grub payload_grubsea" v="initmode ubootelf grub_scan_disk uboot_config grubtree grubelf pname" diff --git a/include/rom.sh b/include/rom.sh index e7948ed8..c88d0c69 100644 --- a/include/rom.sh +++ b/include/rom.sh @@ -102,7 +102,7 @@ mkcorebootbin() [ -z "$grub_scan_disk" ] && grub_scan_disk="nvme ahci ata" [ -n "$grubtree" ] || grubtree="default" - grubelf="elf/grub/$grubtree/payload/grub.elf" + grubelf="elf/grub/$grubtree/$grubtree/payload/grub.elf" [ "$payload_memtest" = "y" ] || payload_memtest="n" [ "$(uname -m)" = "x86_64" ] || payload_memtest="n" @@ -127,7 +127,7 @@ add_seabios() [ -z "$payload_uboot" ] || [ "$payload_uboot" = "arm64" ] || \ $dry add_uboot - _seabioself="elf/seabios/default/$initmode/bios.bin.elf" + _seabioself="elf/seabios/default/default/$initmode/bios.bin.elf" _seaname="fallback/payload" && [ "$payload_grubsea" = "y" ] && \ _seaname="seabios.elf" @@ -191,18 +191,21 @@ add_uboot() # aarch64 targets: ubcbfsargs="" ubpath="fallback/payload" + ubtree="default" ubtarget="$target" # override for x86/x86_64 targets: if [ -n "$payload_uboot" ] && [ "$payload_uboot" != "arm64" ]; then ubcbfsargs="-l 0x1110000 -e 0x1110000" # 64-bit and 32-bit # on 64-bit, 0x1120000 is the SPL, and stub before that ubpath="img/u-boot" # 64-bit + ubtree="x86_64" ubtarget="amd64coreboot" [ "$payload_uboot" = "i386" ] && ubpath="u-boot" # 32-bit + [ "$payload_uboot" = "i386" ] && ubtree="x86" [ "$payload_uboot" = "i386" ] && ubtarget="i386coreboot"; : fi - ubdir="elf/u-boot/$ubtarget/$uboot_config" + ubdir="elf/u-boot/$ubtree/$ubtarget/$uboot_config" # aarch64 targets: ubootelf="$ubdir/u-boot.elf" && [ ! -f "$ubootelf" ] && \ diff --git a/include/tree.sh b/include/tree.sh index 85f97101..59dd765c 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -264,7 +264,7 @@ gnu_setver() check_defconfig() { [ -f "$defconfig" ] || $dry err "$project/$target: missing defconfig" - dest_dir="$elfdir/$target/${defconfig#"$target_dir/config/"}" + dest_dir="$elfdir/$tree/$target/${defconfig#"$target_dir/config/"}" $dry elfcheck || return 1; : # skip build if a previous one exists } |