roms: simplify the loop for building serprog roms

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit6
Leah Rowe 2024-06-18 02:09:26 +01:00
parent 6df17860e2
commit b61dd4c258
1 changed files with 8 additions and 10 deletions

View File

@ -26,7 +26,7 @@ pv="$pv payload_seabios_withgrub payload_seabios_grubonly payload_grub mt86bin"
v="romdir cbrom initmode displaymode cbcfg targetdir tree release ubootelf" v="romdir cbrom initmode displaymode cbcfg targetdir tree release ubootelf"
v="$v grub_timeout board grub_scan_disk uboot_config grubtree grubelf tmpmv" v="$v grub_timeout board grub_scan_disk uboot_config grubtree grubelf tmpmv"
eval "$(setvars "n" $pv)" eval "$(setvars "n" $pv)"
eval "$(setvars "" $v boards targets serprogdir)" eval "$(setvars "" $v boards targets serprogdir ser)"
main() main()
{ {
@ -64,15 +64,13 @@ mkserprog()
fi fi
x_ mkdir -p "bin/serprog_$1" x_ mkdir -p "bin/serprog_$1"
if [ $# -gt 1 ]; then [ $# -gt 1 ] && [ "$2" = "list" ] && serlist "$serprogdir" && return 0
[ "$2" = "list" ] && serlist "$serprogdir" && return 0 ser="$1" && shift
[ "$2" = "list" ] || mkserprogfw "$1" "$2"
else targets="$@" && [ -z "$targets" ] && targets="$(serlist "$serprogdir")"
serlist "$serprogdir" | \ for board in $targets; do
while read -r board; do mkserprogfw "$ser" "$board"
mkserprogfw "$1" "$board"
done done
fi
[ "$xbmk_release" = "y" ] && mkrom_tarball "bin/serprog_$1"; return 0 [ "$xbmk_release" = "y" ] && mkrom_tarball "bin/serprog_$1"; return 0
} }