summaryrefslogtreecommitdiff
path: root/resources/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/build')
-rwxr-xr-xresources/scripts/build/boot/roms_helper31
-rwxr-xr-xresources/scripts/build/grub/payload12
-rwxr-xr-xresources/scripts/build/release/roms18
-rwxr-xr-xresources/scripts/build/release/src2
4 files changed, 32 insertions, 31 deletions
diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper
index a8e7635d..64cb9a71 100755
--- a/resources/scripts/build/boot/roms_helper
+++ b/resources/scripts/build/boot/roms_helper
@@ -189,7 +189,7 @@ if [ "${payload_grub}" = "y" ] || \
printf "Required GRUB payloads not yet built. Building now.\n" \
1>&2
fi
- for keymapfile in ${kmapdir}/*; do
+ for keymapfile in "${kmapdir}"/*; do
[ -f "${keymapfile}" ] || continue
keymap="${keymapfile##*/}"
@@ -230,11 +230,11 @@ moverom() {
printf "\nCreating new ROM image: %s\n" "${newrompath}"
if [ "${cuttype}" = "4MiB IFD BIOS region" ]; then
- dd if=${rompath} of=${newrompath} bs=1 \
- skip=$(($(stat -c %s ${rompath}) - 0x400000)) \
+ dd if="${rompath}" of="${newrompath}" bs=1 \
+ skip=$(($(stat -c %s "${rompath}") - 0x400000)) \
count=4194304 || err "moverom: cannot cut 4MB section"
else
- cp ${rompath} ${newrompath} || err "moverom: cannot copy rom"
+ cp "${rompath}" "${newrompath}" || err "moverom: can't copy rom"
fi
# pike2008 cards cause a system hang when loading option roms in seabios
@@ -245,7 +245,7 @@ moverom() {
touch "${emptyrom}" || err "cannot create fake oprom"
for deviceID in "0072" "3050"; do
"${cbfstool}" "${newrompath}" add -f "${emptyrom}" \
- -n pci1000,${deviceID}.rom -t raw || \
+ -n "pci1000,${deviceID}.rom" -t raw || \
err "moverom: cannot insert fake pike2008 rom"
done
rm -f "${emptyrom}" || err "moverom: cannot remove pike2008 rom"
@@ -257,7 +257,7 @@ moverom() {
[ -f "${ifdgbe}" ] || \
./build descriptors ich9m || \
err "moverom: cannot create ich9m ifd"
- dd if=${ifdgbe} of=${newrompath} bs=1 count=12k \
+ dd if="${ifdgbe}" of="${newrompath}" bs=1 count=12k \
conv=notrunc || err "moverom: cant insert ich9m ifd"
fi
cmpstr="${romsize}MiB ICH9 IFD NOGBE NOR flash"
@@ -266,18 +266,19 @@ moverom() {
[ -f "${ifdgbe}" ] || \
./build descriptors ich9m || \
err "moverom: cannot create ich9m ifd"
- dd if=${ifdgbe} of=${newrompath} bs=1 count=4k \
+ dd if="${ifdgbe}" of="${newrompath}" bs=1 count=4k \
conv=notrunc || err "moverom: cant insert ich9m ifd"
fi
done
if [ "${cuttype}" = "i945 laptop" ]; then
- dd if=${newrompath} of=top64k.bin bs=1 \
- skip=$(($(stat -c %s ${newrompath}) - 0x10000)) count=64k \
- || err "moverom: cannot copy boot block from i945 rom"
- dd if=top64k.bin of=${newrompath} bs=1 \
- seek=$(($(stat -c %s ${newrompath}) - 0x20000)) count=64k \
- conv=notrunc || \
+ dd if="${newrompath}" of=top64k.bin bs=1 \
+ skip=$(($(stat -c %s "${newrompath}") - 0x10000)) \
+ count=64k || \
+ err "moverom: cannot copy boot block from i945 rom"
+ dd if=top64k.bin of="${newrompath}" bs=1 \
+ seek=$(($(stat -c %s "${newrompath}") - 0x20000)) \
+ count=64k conv=notrunc || \
err "moverom: cannot copy boot block into i945 rom"
rm -f top64k.bin || err "moverom: can't remove top64k.bin"
fi
@@ -292,7 +293,7 @@ moverom() {
if [ "${microcode_present}" = "n" ]; then
rm -f "${_newrom_b}" || err "cannot remove ${_newrom_b}"
printf "REMARK: '%s' already lacks microcode\n" \
- ${newrompath}
+ "${newrompath}"
printf "Renaming default ROM file instead.\n"
mv "${newrompath}" "${_newrom_b}" || \
err "moverom: mv \"${newrompath}\" \"${_newrom_b}\""
@@ -520,7 +521,7 @@ mkRoms()
if [ "${payload_memtest}" = "y" ]; then
"${cbfstool}" "${corebootrom}" add-payload \
- -f ${memtest_bin} -n img/memtest -c lzma || \
+ -f "${memtest_bin}" -n img/memtest -c lzma || \
err "mkRoms: cannot add img/memtest to coreboot rom"
fi
diff --git a/resources/scripts/build/grub/payload b/resources/scripts/build/grub/payload
index 00ed4d44..63849bac 100755
--- a/resources/scripts/build/grub/payload
+++ b/resources/scripts/build/grub/payload
@@ -82,22 +82,22 @@ build_grub_elf()
grub/grub-mkstandalone \
--grub-mkimage="grub/grub-mkimage" \
-O i386-coreboot \
- -o elf/grub/grub_${keymap}.elf \
+ -o "elf/grub/grub_${keymap}.elf" \
-d grub/grub-core/ \
--fonts= --themes= --locales= \
--modules="${grub_modules}" \
--install-modules="${grub_install_modules}" \
- ${gcfg} ${grubk} || \
+ "${gcfg}" "${grubk}" || \
err "build_grub_elf: cannot build grub payload (grub-mkstandalone)"
}
create_grub_config()
{
- sed "s/usqwerty/${keymap}/" < ${grubcfgsdir}/config/grub.cfg \
- > elf/grub/grub_${keymap}.cfg || \
+ sed "s/usqwerty/${keymap}/" < "${grubcfgsdir}/config/grub.cfg" \
+ > "elf/grub/grub_${keymap}.cfg" || \
err "create_grub_config: sed failed: grub.cfg"
- sed "s/grubtest.cfg/grub.cfg/" < elf/grub/grub_${keymap}.cfg \
- > elf/grub/grub_${keymap}_test.cfg || \
+ sed "s/grubtest.cfg/grub.cfg/" < "elf/grub/grub_${keymap}.cfg" \
+ > "elf/grub/grub_${keymap}_test.cfg" || \
err "create_grub_config: sed failed: grubtest.cfg"
}
diff --git a/resources/scripts/build/release/roms b/resources/scripts/build/release/roms
index bdc54c9b..395fb8d7 100755
--- a/resources/scripts/build/release/roms
+++ b/resources/scripts/build/release/roms
@@ -125,7 +125,7 @@ strip_archive()
{
romdir=${1}
- [ -d coreboot/${tree} ] || \
+ [ -d "coreboot/${tree}" ] || \
./fetch_trees coreboot ${tree} || \
err "strip_archive: coreboot/${tree}: can't fetch source"
./build coreboot utils ${tree} || \
@@ -143,7 +143,7 @@ strip_archive()
err "strip_archive: !touch ${blobdir}/blobhashes"
(
- cd ${romdir} || err "strip_archive: !cd ${romdir}"
+ cd "${romdir}" || err "strip_archive: !cd ${romdir}"
sha1sum *.rom >> blobhashes || \
err "strip_archive: ${romdir}: !sha1sum *.rom >> blobhashes"
)
@@ -160,7 +160,7 @@ strip_rom_image()
[ -f "${romfile}" ] || return 0
if [ "${CONFIG_HAVE_ME_BIN}" = "y" ]; then
- ${ifdtool} --nuke me "${romfile}" || \
+ "${ifdtool}" --nuke me "${romfile}" || \
err "strip_rom_images: ${romfile}: cannot nuke Intel ME"
mv "${romfile}" "${romdir}_tmp" || \
err "strip_rom_images: !mv ${romfile} ${romdir}_tmp"
@@ -169,25 +169,25 @@ strip_rom_image()
fi
if [ "${CONFIG_HAVE_MRC}" = "y" ]; then
- ${cbfstool} "${romfile}" remove -n mrc.bin || \
+ "${cbfstool}" "${romfile}" remove -n mrc.bin || \
err "strip_rom_images: ${romfile}: cannot nuke mrc.bin"
- ${cbfstool} "${romfile}" print || :
+ "${cbfstool}" "${romfile}" print || :
fi
if [ "${CONFIG_KBC1126_FIRMWARE}" = "y" ]; then
- ${cbfstool} "${romfile}" remove -n ecfw1.bin || \
+ "${cbfstool}" "${romfile}" remove -n ecfw1.bin || \
err "strip_rom_images: ${romfile}: can't nuke ecfw1.bin"
- ${cbfstool} "${romfile}" remove -n ecfw2.bin || \
+ "${cbfstool}" "${romfile}" remove -n ecfw2.bin || \
err "strip_rom_images: ${romfile}: can't nuke ecfw2.bin"
fi
[ "${CONFIG_INCLUDE_SMSC_SCH5545_EC_FW}" != "y" ] || \
- ${cbfstool} "${romfile}" remove -n sch5545_ecfw.bin || \
+ "${cbfstool}" "${romfile}" remove -n sch5545_ecfw.bin || \
err "strip_rom_images: ${romfile}: can't nuke sch5545ec fw"
# TODO: replace this board-specific hack
if [ "${target}" = "e6400nvidia_4mb" ]; then
- ${cbfstool} "${romfile}" remove -n "pci10de,06eb.rom" || \
+ "${cbfstool}" "${romfile}" remove -n "pci10de,06eb.rom" || \
err "strip_rom_images: ${romfile}: can't nuke e6400 vga rom"
fi
}
diff --git a/resources/scripts/build/release/src b/resources/scripts/build/release/src
index 498bfabb..2e1b7174 100755
--- a/resources/scripts/build/release/src
+++ b/resources/scripts/build/release/src
@@ -125,7 +125,7 @@ copy_blobs()
[ -e "${srcdir}/blobs/${i}" ] || \
mkdir -p "${srcdir}/blobs/${i}" || \
err "copy_blobs: ! -d ${srcdir}/blobs/${i}"
- cp blobs/${i}/${j}.bin "${srcdir}/blobs/${i}" || \
+ cp "blobs/${i}/${j}.bin" "${srcdir}/blobs/${i}" || \
err "copy_blobs: ! -f ${srcdir}/blobs/${i}"
done
done