roms cproms(): allow other commands besides cp

e.g. the operator might specify mv instead

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2-merge1
Leah Rowe 2024-06-16 17:49:44 +01:00 committed by Leah Rowe
parent a8f44ab80a
commit dd2854b3e8
1 changed files with 8 additions and 8 deletions

View File

@ -219,7 +219,7 @@ build_seabios_roms()
newrom="$romdir/seabios_${board}_${initmode}_$displaymode"
[ "$initmode" = "normal" ] && newrom="$romdir/seabios" \
&& newrom="${newrom}_${board}_$initmode"
x_ cprom "$t" "$newrom.rom"
x_ cprom cp "$t" "$newrom.rom"
fi
x_ rm -f "$t"
}
@ -256,15 +256,15 @@ build_grub_roms()
newrom="$romdir/${payload1}_${board}_${initmode}_$displaymode.rom"
[ "$initmode" = "normal" ] && newrom="$romdir/${payload1}_" \
&& newrom="$newrom${board}_$initmode.rom"
x_ cprom "$tmprom" "$newrom"
x_ cprom cp "$tmprom" "$newrom"
if [ "$payload_seabios_withgrub" = "y" ] && \
[ "$payload1" != "grub" ]; then
cbfs "$tmprom" "$grubdata/bootorder" bootorder raw
x_ cprom "$tmprom" "${newrom%.rom}_grubfirst.rom"
x_ cprom cp "$tmprom" "${newrom%.rom}_grubfirst.rom"
if [ "$payload_seabios_grubonly" = "y" ]; then
x_ "$cbfstool" "$tmprom" add-int -i 0 \
-n etc/show-boot-menu
x_ cprom "$tmprom" "${newrom%.rom}_grubonly.rom"
x_ cprom cp "$tmprom" "${newrom%.rom}_grubonly.rom"
fi
fi
}
@ -293,16 +293,16 @@ build_uboot_roms()
newrom="$romdir/uboot_payload_${board}_${initmode}_$displaymode.rom"
x_ cp "$cbrom" "$tmprom"
cbfs "$tmprom" "$ubootelf" "fallback/payload"
x_ cprom "$tmprom" "$newrom"
x_ cprom cp "$tmprom" "$newrom"
x_ rm -f "$tmprom"
}
cprom()
{
printf "Creating target image: %s\n" "$2"
printf "Creating target image: %s\n" "$3"
x_ mkdir -p "${2%/*}"
x_ cp "$1" "$2"
x_ mkdir -p "${3%/*}"
x_ $1 "$2" "$3"
}
main $@