summaryrefslogtreecommitdiff
path: root/include/rom.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-07-10 10:55:47 +0100
committerLeah Rowe <leah@libreboot.org>2025-07-10 10:58:39 +0100
commite3a8452a7d256c25b8a7458ba4eb083639a66084 (patch)
tree03f243494014dcd06ba11d6acddf0559d885a1ad /include/rom.sh
parentdac3d6d06aa00cbf764a60494761f74dd043a310 (diff)
xbmk: cache builds in XBMK_CACHE/elf/
not elf/ this way, release builds will go faster because we re-use cached builds which are, due to recent design improvements, always reliably re-built and we can be sure that what's cached matches what's currently in config/ if ./mk release is done with uncommitted changes, that's OK because the hash checking is still done in the release directory, which would still make builds be re-done, and this would then update the hashes so the master tree would then re-build them later on, when doing a non-release build. this change enables more rapid release build testing, because we don't needlessly repeat certain builds. we still generate the source archive from a clean slate. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/rom.sh')
-rw-r--r--include/rom.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/rom.sh b/include/rom.sh
index 57948ec4..e85ff887 100644
--- a/include/rom.sh
+++ b/include/rom.sh
@@ -56,10 +56,10 @@ corebootpremake()
check_coreboot_util()
{
- [ "$badhash" = "y" ] && x_ rm -f "elf/coreboot/$tree/$1"
- e "elf/coreboot/$tree/$1" f && return 0
+ [ "$badhash" = "y" ] && x_ rm -f "$XBMK_CACHE/elf/coreboot/$tree/$1"
+ e "$XBMK_CACHE/elf/coreboot/$tree/$1" f && return 0
- utilelfdir="elf/coreboot/$tree"
+ utilelfdir="$XBMK_CACHE/elf/coreboot/$tree"
utilsrcdir="src/coreboot/$tree/util/$1"
utilmode="" && [ -n "$mode" ] && utilmode="clean"
@@ -101,9 +101,9 @@ mkcorebootbin_real()
displaymode="${initmode##*_}"
[ "$displaymode" = "$initmode" ] && displaymode="" # "normal" config
initmode="${initmode%%_*}"
- cbfstool="elf/coreboot/$tree/cbfstool"
+ cbfstool="$XBMK_CACHE/elf/coreboot/$tree/cbfstool"
- elfrom="elf/coreboot/$tree/$target/$initmode"
+ elfrom="$XBMK_CACHE/elf/coreboot/$tree/$target/$initmode"
[ -n "$displaymode" ] && elfrom="${elfrom}_$displaymode"
elfrom="$elfrom/coreboot.rom"
@@ -125,7 +125,7 @@ mkcorebootbin_real()
[ -z "$grub_scan_disk" ] && grub_scan_disk="nvme ahci ata"
[ -n "$grubtree" ] || grubtree="default"
- grubelf="elf/grub/$grubtree/$grubtree/payload/grub.elf"
+ grubelf="$XBMK_CACHE/elf/grub/$grubtree/$grubtree/payload/grub.elf"
[ "$payload_memtest" = "y" ] || payload_memtest="n"
[ "$(uname -m)" = "x86_64" ] || payload_memtest="n"
@@ -150,7 +150,8 @@ add_seabios()
[ -z "$payload_uboot" ] || [ "$payload_uboot" = "arm64" ] || \
$dry add_uboot
- _seabioself="elf/seabios/default/default/$initmode/bios.bin.elf"
+ _seabioself="$XBMK_CACHE/elf/seabios/default/default/$initmode"
+ _seabioself="$_seabioself/bios.bin.elf"
_seaname="fallback/payload" && [ "$payload_grubsea" = "y" ] && \
_seaname="seabios.elf"
@@ -164,7 +165,7 @@ add_seabios()
cbfs "$tmprom" "$seavgabiosrom" vgaroms/seavgabios.bin raw
[ "$payload_memtest" = "y" ] && cbfs "$tmprom" \
- "elf/memtest86plus/memtest.bin" img/memtest
+ "$XBMK_CACHE/elf/memtest86plus/memtest.bin" img/memtest
[ "$payload_grub" = "y" ] && add_grub
@@ -228,7 +229,7 @@ add_uboot()
[ "$payload_uboot" = "i386" ] && ubtarget="i386coreboot"; :
fi
- ubdir="elf/u-boot/$ubtree/$ubtarget/$uboot_config"
+ ubdir="$XBMK_CACHE/elf/u-boot/$ubtree/$ubtarget/$uboot_config"
# aarch64 targets:
ubootelf="$ubdir/u-boot.elf" && [ ! -f "$ubootelf" ] && \