summaryrefslogtreecommitdiff
path: root/script/roms
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-15 23:58:27 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-15 23:58:27 +0100
commit0dfe3aed91d51e1eacd8ecc24d5e4167ff5fbca7 (patch)
tree6b4ee617ca1ea7307f69b939ad80a51483617e00 /script/roms
parenta9166898d29eae2a190687b96774178127411cfd (diff)
roms: simplified ubootelf check
we check it twice, which we don't need to do. we only need to check it once! Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/roms')
-rwxr-xr-xscript/roms16
1 files changed, 5 insertions, 11 deletions
diff --git a/script/roms b/script/roms
index 1f294a53..d274eb63 100755
--- a/script/roms
+++ b/script/roms
@@ -20,8 +20,8 @@ stm32src="src/stm32-vserprog"
# target.cfg files have to specifically enable [a] payload(s)
pv="payload_uboot payload_grub_withseabios payload_seabios payload_memtest t"
pv="$pv payload_seabios_withgrub payload_seabios_grubonly payload_grub mt86bin"
-v="romdir cbrom initmode displaymode cbcfg targetdir tree release"
-v="$v grub_timeout ubdir board grub_scan_disk uboot_config grubtree grubelf"
+v="romdir cbrom initmode displaymode cbcfg targetdir tree release ubootelf"
+v="$v grub_timeout board grub_scan_disk uboot_config grubtree grubelf"
eval "$(setvars "n" $pv)"
eval "$(setvars "" $v boards targets serprog_boards_dir)"
@@ -170,9 +170,8 @@ build_uboot_payload()
{
x_ ./update trees -b u-boot $board
ubdir="elf/u-boot/$board/$uboot_config"
- ubootelf="$ubdir/u-boot.elf"
- [ ! -f "$ubootelf" ] && [ -f "$ubdir/u-boot" ] && \
- ubootelf="$ubdir/u-boot"
+ ubootelf="$ubdir/u-boot.elf" && [ ! -f "$ubootelf" ] && \
+ ubootelf="$ubdir/u-boot"
[ -f "$ubootelf" ] || $err "$board: Can't find u-boot"; return 0
}
@@ -318,15 +317,10 @@ mkUbootRom() {
_cbrom="$1"
_uboot_cbfs_path="$2"
- _ubdir="elf/u-boot/$board/$uboot_config"
- _ubootelf="$_ubdir/u-boot.elf"
- [ -f "$_ubootelf" ] || _ubootelf="$_ubdir/u-boot"
- [ -f "$_ubootelf" ] || $err "mkUbootRom: $board: cant find u-boot"
-
tmprom="$(mktemp -t coreboot_rom.XXXXXXXXXX)"
x_ cp "$_cbrom" "$tmprom"
- cbfs "$tmprom" "$_ubootelf" "$_uboot_cbfs_path"
+ cbfs "$tmprom" "$ubootelf" "$_uboot_cbfs_path"
printf "%s\n" "$tmprom"
}