summaryrefslogtreecommitdiff
path: root/script/roms
diff options
context:
space:
mode:
Diffstat (limited to 'script/roms')
-rwxr-xr-xscript/roms27
1 files changed, 14 insertions, 13 deletions
diff --git a/script/roms b/script/roms
index d5eedd6a..8a2cc796 100755
--- a/script/roms
+++ b/script/roms
@@ -10,7 +10,7 @@ set -u -e
. "include/lib.sh"
-tmprom="$tmpdir/rom"
+tmprom="$TMPDIR/rom"
seavgabiosrom="elf/seabios/default/libgfxinit/vgabios.bin"
cfgsdir="config/coreboot"
@@ -40,8 +40,8 @@ main()
eval "x_ ./update trees -f \"\${${2}src##*/}\""
ser="$2" && shift 2 && continue
fi
- [ "$1$ser" = "list" ] && x_ ls -1 config/coreboot && return
- [ "$1" = "all" ] && shift && continue
+ [ "$1$ser" = "list" ] && x_ ls -1 config/coreboot && return 0
+ [ "$1" = "all" ] && shift 1 && continue
boards="$1 $boards"; shift 1
done
@@ -49,14 +49,15 @@ main()
config/coreboot)" || $err "can't list coreboot boards"
[ -n "$ser" ] && \
- eval "serlist \"\$${ser}dir\" > \"\$tmpdir/ser\" || $err \"!ser\""
- [ -n "$ser" ] && [ -z "$boards" ] && boards="$(cat "$tmpdir/ser")"
+ eval "serlist \"\$${ser}dir\" > \"\$TMPDIR/ser\" || $err \"!ser\""
+ [ -n "$ser" ] && [ -z "$boards" ] && boards="$(cat "$TMPDIR/ser")"
for x in $boards; do
[ -n "$ser" ] && mkserprogfw "$ser" "$x"
[ -z "$ser" ] && [ -d "config/coreboot/$x/config" ] && \
configure_target "$x" && build_roms && \
- [ -d "bin/$board" ] && targets="$targets, $x"; continue
+ [ -d "bin/$board" ] && targets="$targets, $x" && \
+ [ "$XBMK_RELEASE" = "y" ] && mkrom_tarball "bin/$x"
done
[ -n "$ser" ] && [ "$XBMK_RELEASE" = "y" ] && \
@@ -93,20 +94,20 @@ configure_target()
# Override the above defaults using target.cfg
eval `setcfg "$targetdir/target.cfg"`
- x_ ./update trees -b coreboot $board
[ -z "$tree" ] && $err "$board: tree not defined"
[ "$XBMK_RELEASE" = "y" ] && [ "$release" = "n" ] && return 1
[ "$board" = "$tree" ] && return 1
- cbdir="src/coreboot/$tree"
+ x_ ./update trees -b coreboot $board
+
cbfstool="elf/cbfstool/$tree/cbfstool"
- [ -f "$cbfstool" ] || x_ ./update trees -b coreboot utils $tree
+ x_ ./update trees -b coreboot utils $tree
[ -n "$uboot_config" ] || uboot_config="default"
[ "$payload_uboot" = "y" ] || payload_seabios="y"
[ "$payload_grub" = "y" ] && payload_seabios="y"
- [ "$payload_seabios" = "y" ] && [ -n "$payload_uboot" = "y" ] && \
+ [ "$payload_seabios" = "y" ] && [ "$payload_uboot" = "y" ] && \
$err "$board: U-Boot and SeaBIOS/GRUB are both enabled."
[ -z "$grub_scan_disk" ] && grub_scan_disk="nvme ahci ata"
@@ -140,9 +141,9 @@ add_payloads()
[ "$payload_uboot" = "y" ] || return 0
# add u-boot payload
+ x_ ./update trees -b u-boot $board
ubdir="elf/u-boot/$board/$uboot_config"; ubootelf="$ubdir/u-boot.elf" \
&& [ ! -f "$ubootelf" ] && ubootelf="$ubdir/u-boot"
- [ -f "$ubootelf" ] || x_ ./update trees -b u-boot $board
[ -f "$ubootelf" ] || $err "$board: Can't find u-boot"
cbfs "$tmprom" "$ubootelf" "fallback/payload"
@@ -171,8 +172,8 @@ add_seabios_payload()
x_ ./update trees -b grub $grubtree
cbfs "$tmprom" "$grubelf" "img/grub2"
printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" \
- > "$tmpdir/tmpcfg" || $err "$board: !insert scandisk"
- cbfs "$tmprom" "$tmpdir/tmpcfg" scan.cfg raw
+ > "$TMPDIR/tmpcfg" || $err "$board: !insert scandisk"
+ cbfs "$tmprom" "$TMPDIR/tmpcfg" scan.cfg raw
fi
[ "$payload_memtest" = "y" ] && x_ ./update trees -b memtest86plus && \