summaryrefslogtreecommitdiff
path: root/script/build/roms
diff options
context:
space:
mode:
Diffstat (limited to 'script/build/roms')
-rwxr-xr-xscript/build/roms36
1 files changed, 18 insertions, 18 deletions
diff --git a/script/build/roms b/script/build/roms
index 9e7c69ee..a90e1daa 100755
--- a/script/build/roms
+++ b/script/build/roms
@@ -49,7 +49,7 @@ main()
done
[ "${all}" != "y" ] || boards=$(items config/coreboot) || \
- err "Cannot generate list of boards for building"
+ $err "Cannot generate list of boards for building"
for x in ${boards}; do
eval "$(setvars "n" ${pv}) $(setvars "" ${v})"
@@ -62,7 +62,7 @@ main()
targets="* bin/${board}\n${targets}"
done
- [ -z "${targets}" ] && err "No ROM images were compiled"
+ [ -z "${targets}" ] && $err "No ROM images were compiled"
printf "\nROM images available in these directories:\n"
eval "printf \"${targets}\""
printf "^^ ROM images available in these directories.\n\n"
@@ -74,7 +74,7 @@ configure_target()
{
targetdir="${cfgsdir}/${board}"
[ -f "${targetdir}/target.cfg" ] || \
- err "Missing target.cfg for target: ${board}"
+ $err "Missing target.cfg for target: ${board}"
# Override the above defaults using target.cfg
. "${targetdir}/target.cfg"
@@ -84,7 +84,7 @@ configure_target()
&& [ "${grub_scan_disk}" != "ahci" ] && \
grub_scan_disk="both"
- [ -z "$tree" ] && err "$board: tree not defined"
+ [ -z "$tree" ] && $err "$board: tree not defined"
[ "${payload_memtest}" != "y" ] && payload_memtest="n"
[ "${payload_grub_withseabios}" = "y" ] && payload_grub="y"
@@ -101,7 +101,7 @@ configure_target()
[ "${payload_uboot}" != "y" ] && \
for configfile in "${targetdir}/config/"*; do
[ -e "${configfile}" ] || continue
- err "target '${board}' defines no payload"
+ $err "target '${board}' defines no payload"
done
[ "$payload_uboot" != "n" ] && [ "$payload_uboot" != "y" ] && \
@@ -149,7 +149,7 @@ build_grub_payload()
keymaps="${keymaps} ${keymapfile}"
done
[ -z "$_keyboard" ] || [ -f "$grubcfgsdir/keymap/$_keyboard.gkb" ] || \
- err "build_grub_payload: $_keyboard layout not defined"
+ $err "build_grub_payload: $_keyboard layout not defined"
[ -n "$_keyboard" ] && keymaps="${grubcfgsdir}/keymap/${_keyboard}.gkb"
[ -f "$grubelf" ] && return 0
[ -f "src/grub/grub-mkstandalone" ] || x_ ./update trees -b grub
@@ -164,7 +164,7 @@ build_grub_payload()
--install-modules="${grub_install_modules}" \
"/boot/grub/grub.cfg=${grubcfgsdir}/config/grub_memdisk.cfg" \
"/boot/grub/grub_default.cfg=${grubcfgsdir}/config/grub.cfg" || \
- err "could not generate grub.elf"
+ $err "could not generate grub.elf"
}
build_uboot_payload()
@@ -175,12 +175,12 @@ build_uboot_payload()
[ ! -f "${ubootelf}" ] && [ -f "${ubdir}/u-boot" ] && \
ubootelf="${ubdir}/u-boot"
[ -f "${ubootelf}" ] && return 0
- err "Can't find u-boot build for board, $board";
+ $err "Can't find u-boot build for board, $board";
}
build_target_mainboard()
{
- rm -f "${romdir}/"* || err "!prepare, rm files, ${romdir}"
+ rm -f "${romdir}/"* || $err "!prepare, rm files, ${romdir}"
for x in "normal" "vgarom" "libgfxinit"; do
initmode="${x}"
@@ -237,7 +237,7 @@ build_seabios_roms()
x_ build_grub_roms "${t}" "seabios_withgrub"
else
t=$(mkSeabiosRom "${cbrom}" "fallback/payload") || \
- err "build_seabios_roms: cannot build tmprom"
+ $err "build_seabios_roms: cannot build tmprom"
newrom="${romdir}/seabios_${board}_${initmode}_${displaymode}"
[ "${initmode}" = "normal" ] && newrom="${romdir}/seabios" \
&& newrom="${newrom}_${board}_${initmode}"
@@ -256,13 +256,13 @@ build_grub_roms()
if [ "$payload1" = "grub" ] && [ "$payload_grub_withseabios" = "y" ]
then
_tmpmvrom=$(mkSeabiosRom "$tmprom" "seabios.elf") || \
- err "build_grub_roms 1 $board: can't build tmprom"
+ $err "build_grub_roms 1 $board: can't build tmprom"
x_ mv "$_tmpmvrom" "$tmprom"
elif [ "$payload1" != "grub" ] && [ "$payload_seabios_withgrub" = "y" ]
then
grub_cbfs="img/grub2"
_tmpmvrom=$(mkSeabiosRom "$tmprom" fallback/payload) || \
- err "build_grub_roms 2 $board: can't build tmprom"
+ $err "build_grub_roms 2 $board: can't build tmprom"
x_ mv "$_tmpmvrom" "$tmprom"
fi
@@ -276,16 +276,16 @@ build_grub_roms()
backgroundfile="config/grub/background/${grub_background}"
"${cbfstool}" "${tmprom}" add -f ${backgroundfile} \
-n background.png -t raw || \
- err "insert background, ${backgroundfile}"
+ $err "insert background, ${backgroundfile}"
fi
tmpcfg=$(mktemp -t coreboot_rom.XXXXXXXXXX)
printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" >"$tmpcfg" \
- || err "set grub_scandisk, $grub_scan_disk, $tmpcfg"
+ || $err "set grub_scandisk, $grub_scan_disk, $tmpcfg"
[ "${grub_scan_disk}" = "both" ] || \
x_ "$cbfstool" "$tmprom" add -f "$tmpcfg" -n scan.cfg -t raw
printf "set timeout=%s\n" "${grub_timeout}" > "${tmpcfg}" || \
- err "set timeout, ${grub_timeout}, ${tmpcfg}"
+ $err "set timeout, ${grub_timeout}, ${tmpcfg}"
[ -z "${grub_timeout}" ] || x_ "${cbfstool}" "${tmprom}" add \
-f "${tmpcfg}" -n timeout.cfg -t raw
x_ rm -f "${tmpcfg}"
@@ -344,7 +344,7 @@ mkSeabiosGrubonlyRom()
tmpbootorder=$(mktemp -t coreboot_rom.XXXXXXXXXX)
# only load grub, by inserting a custom bootorder file
- printf "/rom@img/grub2\n" > "$tmpbootorder" || err "printf bootorder"
+ printf "/rom@img/grub2\n" > "$tmpbootorder" || $err "printf bootorder"
x_ "${cbfstool}" "${_grubrom}" \
add -f "${tmpbootorder}" -n bootorder -t raw
x_ rm -f "${tmpbootorder}"
@@ -356,7 +356,7 @@ mkSeabiosGrubonlyRom()
build_uboot_roms()
{
tmprom=$(mkUbootRom "${cbrom}" "fallback/payload") || \
- err "build_uboot_roms $board: could not create tmprom"
+ $err "build_uboot_roms $board: could not create tmprom"
newrom="${romdir}/uboot_payload_${board}_${initmode}_${displaymode}.rom"
x_ moverom "${tmprom}" "${newrom}"
x_ rm -f "${tmprom}"
@@ -370,7 +370,7 @@ mkUbootRom() {
_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"
+ [ -f "$_ubootelf" ] || $err "mkUbootRom: $board: cant find u-boot"
tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX)