build/roms_helper: move logic into main()

logic will be split from main into smaller
functions, in follow-up commits
fsdg20230625
Leah Rowe 2023-05-12 16:55:45 +01:00
parent df611f9bc1
commit bceb5f2eb4
1 changed files with 283 additions and 267 deletions

View File

@ -36,36 +36,7 @@ kmapdir="resources/grub/keymap"
displaymodes="" displaymodes=""
payloads="" payloads=""
keyboard_layouts="" keyboard_layouts=""
while [ $# -gt 0 ]; do board=""
case ${1} in
-d)
displaymodes="${displaymodes}${2}"
shift ;;
-p)
payloads="${payloads}${2}"
shift ;;
-k)
keyboard_layouts="${keyboard_layouts}${2}"
shift ;;
*)
board=${1} ;;
esac
shift
done
printf "board is %s , kb is %s , displaymode is %s , payloads is %s\n" \
${board} ${keyboard_layouts} ${displaymodes} ${payloads}
if [ ! -d "${cbcfgdir}/${board}" ]; then
printf "build/roms: Target not defined: %s\n" ${board}
exit 1
fi
if [ ! -f "${cbcfgdir}/${board}/board.cfg" ]; then
printf "build/roms: Missing board.cfg for target: %s\n" ${board}
exit 1
fi
grub_scan_disk="undefined" grub_scan_disk="undefined"
cbtree="undefined" cbtree="undefined"
@ -75,227 +46,304 @@ arch="undefined"
# Disable all payloads by default. # Disable all payloads by default.
# board.cfg files have to specifically enable [a] payload(s) # board.cfg files have to specifically enable [a] payload(s)
payload_grub="n" payload_grub="n"
payload_grub_withseabios="n" # seabios chainloaded from grub payload_grub_wseabios="n" # seabios chainloaded from grub
payload_seabios="n" payload_seabios="n"
payload_seabios_withgrub="n" # i386-coreboot grub from SeaBIOS boot menu payload_seabios_wgrub="n" # i386-coreboot grub from SeaBIOS boot menu
payload_memtest="n" payload_memtest="n"
payload_uboot="n" payload_uboot="n"
uboot_config="undefined" uboot_config="undefined"
# Override the above defaults using board.cfg
. "${cbcfgdir}/${board}/board.cfg"
if [ "${grub_scan_disk}" = "undefined" ]; then romdir=""
printf "build/roms: Target '%s' does not define grub_scan_disk. " \ cbdir=""
${board} cbfstool=""
printf "Defaulting to 'both'.\n" corebootrom=""
grub_scan_disk="both" seavgabiosrom=""
fi
if [ "${grub_scan_disk}" != "both" ] && \ CROSS_COMPILE=""
[ "${grub_scan_disk}" != "ata" ] && \
[ "${grub_scan_disk}" != "ahci" ]; then
printf "build/roms: Target '%s' defines bad grub_scan_disk option. " \
${board}
printf "Defaulting to 'both'.\n"
grub_scan_disk="both"
# erroring out would be silly. just use the default
fi
if [ "${cbtree}" = "undefined" ]; then main()
printf "build/roms: Target '%s' does not define a coreboot tree. " \ {
${board} while [ $# -gt 0 ]; do
printf "Skipping build.\n" case ${1} in
exit 1 -d)
fi displaymodes="${displaymodes}${2}"
if [ "${arch}" = "undefined" ]; then shift ;;
printf "build/roms: Target '%s' does not define a CPU type. " \ -p)
${board} payloads="${payloads}${2}"
printf "Skipping build.\n" shift ;;
exit 1 -k)
fi keyboard_layouts="${keyboard_layouts}${2}"
shift ;;
*)
board=${1} ;;
esac
shift
done
if [ "${payload_memtest}" != "n" ] && \ printf "board %s , kb %s , displaymode %s , payloads %s\n" \
[ "${payload_memtest}" != "y" ]; then ${board} ${keyboard_layouts} ${displaymodes} \
payload_memtest="n" ${payloads}
fi
if [ "${payload_grub_withseabios}" = "y" ]; then if [ "${board}" = "" ]; then
payload_grub="y" printf "build/roms: undefined board. Exiting\n"
fi
if [ "${payload_grub_withseabios}" = "y" ]; then
payload_seabios="y"
payload_seabios_withgrub="y"
fi
if [ "${payload_seabios_withgrub}" = "y" ]; then
payload_seabios="y"
fi
# NOTE: reverse logic must NOT be applied. If SeaBIOS-with-GRUB works, that
# doesn't necessarily mean GRUb-with-SeaBIOS will. For example, the board
# might have an external GPU, where it's recommended to boot SeaBIOS first
if [ "${payload_grub}" != "y" ] && [ "${payload_seabios}" != "y" ] \
&& [ "${payload_uboot}" != "y" ]; then
for configfile in "${cbcfgdir}/${board}/config/"*; do
if [ ! -e "${configfile}" ]; then
continue
fi
printf "ERROR build/roms: Target '%s' defines no payload. " \
${board}
printf "Exiting.\n"
exit 1 exit 1
done
fi
if [ "${payload_uboot}" != "n" ] && \
[ "${payload_uboot}" != "y" ]; then
payload_uboot="n"
fi
if [ "${payload_uboot}" = "y" ] && \
[ "${uboot_config}" = "undefined" ]; then
uboot_config="default"
fi
# Override all payload directives with cmdline args
if [ ! -z ${payloads} ]; then
echo "setting payloads $payloads"
payload_grub="n"
payload_grub_withseabios="n" # seabios chainloaded from grub
payload_seabios="n"
payload_seabios_withgrub="n" # i386-coreboot grub from SeaBIOS menu
payload_uboot="n"
payload_memtest="n"
for payload in ${payloads} ; do
eval "payload_${payload}=y"
done
fi
romdir="bin/${board}"
cbdir="coreboot/${board}"
if [ "${board}" != "${cbtree}" ]; then
cbdir="coreboot/${cbtree}"
fi
cbfstool="${cbdir}/util/cbfstool/cbfstool"
corebootrom="${cbdir}/build/coreboot.rom"
seavgabiosrom="payload/seabios/seavgabios.bin"
if [ ! -d "${cbdir}" ]; then
./download coreboot ${cbtree}
fi
cat version > "${cbdir}/.coreboot-version"
if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then
if [ ! -d "${cbdir}/util/crossgcc/xgcc/i386-elf/" ]; then
# Even for 64-bit machines, coreboot builds 32-bit ROM
# images, so we only need to worry about i386-elf
make -C "${cbdir}" crossgcc-i386 CPUS=$(nproc)
fi fi
case "$(uname -m)" in if [ ! -d "${cbcfgdir}/${board}" ]; then
x86*|i*86|amd64) : ;; printf "build/roms: Target not defined: %s\n" ${board}
*) export CROSS_COMPILE=i386-elf- ;; exit 1
esac
elif [ "${arch}" = "ARMv7" ]; then
if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then
make -C "${cbdir}" crossgcc-arm CPUS=$(nproc)
fi fi
case "$(uname -m)" in if [ ! -f "${cbcfgdir}/${board}/board.cfg" ]; then
arm|arm32|armv6*|armv7*) : ;; printf "build/roms %s: Missing board.cfg\n" ${board}
*) export CROSS_COMPILE=arm-eabi- ;; exit 1
esac
elif [ "${arch}" = "AArch64" ]; then
if [ ! -d "${cbdir}/util/crossgcc/xgcc/aarch64-elf/" ]; then
make -C "${cbdir}" crossgcc-aarch64 CPUS=$(nproc)
fi fi
# aarch64 also needs armv7 toolchain for arm-trusted-firmware
if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then # Override the above defaults using board.cfg
make -C "${cbdir}" crossgcc-arm CPUS=$(nproc) . "${cbcfgdir}/${board}/board.cfg"
if [ "${grub_scan_disk}" = "undefined" ]; then
printf "build/roms '%s': grub_scan_disk is undefined. " \
${board}
printf "Defaulting to 'both'.\n"
grub_scan_disk="both"
fi fi
case "$(uname -m)" in if [ "${grub_scan_disk}" != "both" ] && \
arm64|aarch64) : ;; [ "${grub_scan_disk}" != "ata" ] && \
*) export CROSS_COMPILE=aarch64-elf- ;; [ "${grub_scan_disk}" != "ahci" ]; then
esac printf "build/roms '%s': invalid grub_scan_disk config. " \
fi ${board}
printf "Defaulting to 'both'.\n"
export PATH="$(pwd)/${cbdir}/util/crossgcc/xgcc/bin:$PATH" grub_scan_disk="both"
# erroring out would be silly. just use the default
if [ ! -f "${cbfstool}" ]; then
./build module cbutils ${cbtree} || exit 1
fi
if [ ! -f "${seavgabiosrom}" ] \
|| [ ! -f payload/seabios/seabios_libgfxinit.elf ] \
|| [ ! -f payload/seabios/seabios_vgarom.elf ] \
|| [ ! -f payload/seabios/seabios_normal.elf ]; then
if [ "${payload_seabios}" = "y" ]; then
./build payload seabios
elif [ "${payload_grub}" = "y" ] \
&& [ "${payload_grub_withseabios}" = "y" ]; then
./build payload seabios
fi fi
fi
if [ "${payload_memtest}" = "y" ]; then if [ "${cbtree}" = "undefined" ]; then
if [ ! -f "memtest86plus/memtest" ]; then printf "build/roms '%s': undefined coreboot tree. " \
./build module memtest86plus ${board}
printf "Skipping build.\n"
exit 1
fi
if [ "${arch}" = "undefined" ]; then
printf "build/roms '%s': undefined CPU type. " \
${board}
printf "Skipping build.\n"
exit 1
fi fi
fi
[ -d "${romdir}/" ] || mkdir -p "${romdir}/" if [ "${payload_memtest}" != "n" ] && \
rm -f "${romdir}"/* [ "${payload_memtest}" != "y" ]; then
payload_memtest="n"
fi
if [ "${payload_grub_wseabios}" = "y" ]; then
payload_grub="y"
fi
if [ "${payload_grub_wseabios}" = "y" ]; then
payload_seabios="y"
payload_seabios_wgrub="y"
fi
if [ "${payload_seabios_wgrub}" = "y" ]; then
payload_seabios="y"
fi
# NOTE: reverse logic must NOT be applied. If SeaBIOS-with-GRUB works,
# that doesn't mean GRUB-with-SeaBIOS will. For example, the board
# might have an external GPU, where SeaBIOS should be booted first
if [ "${payload_grub}" != "y" ] && [ "${payload_seabios}" != "y" ] \
&& [ "${payload_uboot}" != "y" ]; then
for configfile in "${cbcfgdir}/${board}/config/"*; do
if [ ! -e "${configfile}" ]; then
continue
fi
printf "build/roms %s: Payload undefined. Exiting.\n" \
${board}
exit 1
done
fi
if [ "${payload_uboot}" != "n" ] && \
[ "${payload_uboot}" != "y" ]; then
payload_uboot="n"
fi
if [ "${payload_uboot}" = "y" ] && \
[ "${uboot_config}" = "undefined" ]; then
uboot_config="default"
fi
# Override all payload directives with cmdline args
if [ ! -z ${payloads} ]; then
echo "setting payloads $payloads"
payload_grub="n"
payload_grub_wseabios="n" # seabios chainloaded from grub
payload_seabios="n"
payload_seabios_wgrub="n" # grub from SeaBIOS menu
payload_uboot="n"
payload_memtest="n"
if [ "${payload_grub}" = "y" ] \ for payload in ${payloads} ; do
|| [ "${payload_seabios_withgrub}" = "y" ]; then eval "payload_${payload}=y"
if [ -f "payload/grub/grub_usqwerty.cfg" ]; then done
sha1sumcmd="sha1sum resources/grub/config/grub.cfg" fi
grubrefchecksum="$(${sha1sumcmd} | awk '{print $1}')"
sha1sumcmd="sha1sum payload/grub/grub_usqwerty.cfg" romdir="bin/${board}"
grubbuildchecksum="$(${sha1sumcmd} | awk '{print $1}')" cbdir="coreboot/${board}"
if [ "${board}" != "${cbtree}" ]; then
cbdir="coreboot/${cbtree}"
fi
cbfstool="${cbdir}/util/cbfstool/cbfstool"
corebootrom="${cbdir}/build/coreboot.rom"
seavgabiosrom="payload/seabios/seavgabios.bin"
if [ "${grubrefchecksum}" != "${grubbuildchecksum}" ]; then if [ ! -d "${cbdir}" ]; then
rm -Rf payload/grub/ ./download coreboot ${cbtree}
printf "Changes detected to GRUB. Re-building now:\n" fi
cat version > "${cbdir}/.coreboot-version"
if [ "${arch}" = "x86_32" ] || [ "${arch}" = "x86_64" ]; then
if [ ! -d "${cbdir}/util/crossgcc/xgcc/i386-elf/" ]; then
# Even for 64-bit machines, coreboot builds 32-bit ROM
# images, so we only need to worry about i386-elf
make -C "${cbdir}" crossgcc-i386 CPUS=$(nproc)
fi fi
else case "$(uname -m)" in
printf "Required GRUB payloads not yet built. Building now:\n" x86*|i*86|amd64) : ;;
rm -Rf payload/grub/ # just in case *) export CROSS_COMPILE=i386-elf- ;;
esac
elif [ "${arch}" = "ARMv7" ]; then
if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then
make -C "${cbdir}" crossgcc-arm CPUS=$(nproc)
fi
case "$(uname -m)" in
arm|arm32|armv6*|armv7*) : ;;
*) export CROSS_COMPILE=arm-eabi- ;;
esac
elif [ "${arch}" = "AArch64" ]; then
if [ ! -d "${cbdir}/util/crossgcc/xgcc/aarch64-elf/" ]; then
make -C "${cbdir}" crossgcc-aarch64 CPUS=$(nproc)
fi
# aarch64 also needs armv7 toolchain for arm-trusted-firmware
if [ ! -d "${cbdir}/util/crossgcc/xgcc/arm-eabi/" ]; then
make -C "${cbdir}" crossgcc-arm CPUS=$(nproc)
fi
case "$(uname -m)" in
arm64|aarch64) : ;;
*) export CROSS_COMPILE=aarch64-elf- ;;
esac
fi fi
for keymapfile in ${kmapdir}/*; do
if [ ! -f "${keymapfile}" ]; then export PATH="$(pwd)/${cbdir}/util/crossgcc/xgcc/bin:$PATH"
continue
if [ ! -f "${cbfstool}" ]; then
./build module cbutils ${cbtree} || exit 1
fi
if [ ! -f "${seavgabiosrom}" ] \
|| [ ! -f payload/seabios/seabios_libgfxinit.elf ] \
|| [ ! -f payload/seabios/seabios_vgarom.elf ] \
|| [ ! -f payload/seabios/seabios_normal.elf ]; then
if [ "${payload_seabios}" = "y" ]; then
./build payload seabios
elif [ "${payload_grub}" = "y" ] \
&& [ "${payload_grub_wseabios}" = "y" ]
then
./build payload seabios
fi
fi
if [ "${payload_memtest}" = "y" ]; then
if [ ! -f "memtest86plus/memtest" ]; then
./build module memtest86plus
fi
fi
[ -d "${romdir}/" ] || mkdir -p "${romdir}/"
rm -f "${romdir}"/*
if [ "${payload_grub}" = "y" ] \
|| [ "${payload_seabios_wgrub}" = "y" ]; then
if [ -f "payload/grub/grub_usqwerty.cfg" ]; then
sha1cmd="sha1sum resources/grub/config/grub.cfg"
grubrefchecksum="$(${sha1cmd} | awk '{print $1}')"
sha1cmd="sha1sum payload/grub/grub_usqwerty.cfg"
grubsha1="$(${sha1cmd} | awk '{print $1}')"
if [ "${grubrefchecksum}" != "${grubsha1}" ]; then
rm -Rf payload/grub/
printf "GRUB change detected. Rebuilding:\n"
fi
else
printf "GRUB payloads needed. Building:\n"
rm -Rf payload/grub/ # just in case
fi
for keymapfile in ${kmapdir}/*; do
if [ ! -f "${keymapfile}" ]; then
continue
fi
keymap="${keymapfile##*/}"
keymap="${keymap%.gkb}"
grubelf="payload/grub/grub_${keymap}.elf"
grubcfg="payload/grub/grub_${keymap}.cfg"
grubtestcfg="payload/grub/grub_${keymap}_test.cfg"
if [ ! -f "${grubelf}" ] || [ ! -f "${grubcfg}" ] || \
[ ! -f "${grubtestcfg}" ]; then
./build payload grub
fi
done
fi
if [ "${payload_uboot}" = "y" ]; then
ubdir=""
if [ "${uboot_config}" = "default" ]; then
ubdir="payload/u-boot/${board}"
else
ubdir="payload/u-boot/${board}/${uboot_config}"
fi fi
keymap="${keymapfile##*/}" if [ -f "${ubdir}/u-boot.elf" ]; then
keymap="${keymap%.gkb}" ubootelf="${ubdir}/u-boot.elf"
elif [ -f "${ubdir}/u-boot" ]; then
grubelf="payload/grub/grub_${keymap}.elf" ubootelf="${ubdir}/u-boot"
grubcfg="payload/grub/grub_${keymap}.cfg" else
grubtestcfg="payload/grub/grub_${keymap}_test.cfg" printf "U-Boot needed. Building:\n"
rm -Rf "payload/u-boot/${board}" # just in case
if [ ! -f "${grubelf}" ] || [ ! -f "${grubcfg}" ] || \ ./build payload u-boot "${board}"
[ ! -f "${grubtestcfg}" ]; then
./build payload grub
fi fi
done
fi
if [ "${payload_uboot}" = "y" ]; then
if [ "${uboot_config}" = "default" ]; then
ubdir="payload/u-boot/${board}"
else
ubdir="payload/u-boot/${board}/${uboot_config}"
fi fi
if [ -f "${ubdir}/u-boot.elf" ]; then if [ -z ${displaymodes} ]; then
ubootelf="${ubdir}/u-boot.elf" initmode="libgfxinit"
elif [ -f "${ubdir}/u-boot" ]; then for displaymode in corebootfb txtmode; do
ubootelf="${ubdir}/u-boot" _cbcfg="${cbcfgdir}/${board}/config/${initmode}"
_cbcfg="${_cbcfg}_${displaymode}"
mkRoms "${_cbcfg}" "${displaymode}" "${initmode}"
done
initmode="vgarom"
for displaymode in vesafb txtmode; do
_cbcfg="${cbcfgdir}/${board}/config/${initmode}"
_cbcfg="${_cbcfg}_${displaymode}"
mkRoms "${_cbcfg}" "${displaymode}" "${initmode}"
done
initmode="normal"
displaymode="txtmode"
_cbcfg="${cbcfgdir}/${board}/config/${initmode}"
mkRoms "${_cbcfg}" "${displaymode}" "${initmode}"
else else
printf "Required U-Boot payload not yet built. Building now\n" echo "special displaymode defined as $displaymodes"
rm -Rf "payload/u-boot/${board}" # just in case for initmode in vgarom libgfxinit; do
./build payload u-boot "${board}" for displaymode in ${displaymodes}; do
_cbcfg="${cbcfgdir}/${board}/config/"
_cbcfg="${_cbcfg}${initmode}_${displaymode}"
mkRoms "${_cbcfg}" "${displaymode}" \
"${initmode}"
done
done
fi fi
fi
(
cd "${cbdir}"
make distclean # TODO: do make clean instead (avoid re-building utils)
)
}
# it is assumed that no other work will be done on the ROM # it is assumed that no other work will be done on the ROM
# after calling this function. therefore this function is "final" # after calling this function. therefore this function is "final"
@ -350,10 +398,10 @@ moverom()
mkCoreboot() mkCoreboot()
{ {
cbdir="${1}" # eg. coreboot/default cbdir="${1}" # eg. coreboot/default
cbcfgpath="${2}" # eg. ${cbcfgdir}/e6400nvidia_4mb/config/normal _cbcfg="${2}" # eg. ${cbcfgdir}/e6400nvidia_4mb/config/normal
if [ ! -f "${cbcfgpath}" ]; then if [ ! -f "${_cbcfg}" ]; then
printf "\nmkCoreboot: coreboot config '%s' does not exist. " \ printf "\nmkCoreboot: coreboot config '%s' does not exist. " \
${cbcfgpath} ${_cbcfg}
printf "Skipping build.\n" printf "Skipping build.\n"
return 0 return 0
fi fi
@ -372,7 +420,7 @@ mkCoreboot()
mv "${cbdir}/cbfstool" "${cbfstool}" mv "${cbdir}/cbfstool" "${cbfstool}"
fi fi
) )
cp "${cbcfgpath}" "${cbdir}"/.config cp "${_cbcfg}" "${cbdir}"/.config
./build module cbutils ${cbdir#coreboot/} || exit 1 ./build module cbutils ${cbdir#coreboot/} || exit 1
( (
cd "${cbdir}" cd "${cbdir}"
@ -512,15 +560,15 @@ mkRomsWithGrub()
tmprompath="${1}" tmprompath="${1}"
initmode="${2}" initmode="${2}"
displaymode="${3}" displaymode="${3}"
firstpayloadname="${4}" # allow values: grub, seabios, seabios_withgrub firstpayloadname="${4}" # allow values: grub, seabios, seabios_wgrub
x=${tmprompath} x=${tmprompath}
y=${initmode} y=${initmode}
if [ "${payload_grub_withseabios}" = "y" ] \ if [ "${payload_grub_wseabios}" = "y" ] \
&& [ "${firstpayloadname}" = "grub" ]; then && [ "${firstpayloadname}" = "grub" ]; then
mv "$(mkSeabiosRom "${x}" "seabios.elf" "${y}")" \ mv "$(mkSeabiosRom "${x}" "seabios.elf" "${y}")" \
"${tmprompath}" "${tmprompath}"
elif [ "${payload_seabios_withgrub}" ] \ elif [ "${payload_seabios_wgrub}" ] \
&& [ "${firstpayloadname}" != "grub" ]; then && [ "${firstpayloadname}" != "grub" ]; then
mv "$(mkSeabiosRom "${x}" "fallback/payload" "${y}")" \ mv "$(mkSeabiosRom "${x}" "fallback/payload" "${y}")" \
"${tmprompath}" "${tmprompath}"
@ -569,18 +617,18 @@ mkRomsWithGrub()
# Main ROM building function. This calls all other functions # Main ROM building function. This calls all other functions
mkRoms() mkRoms()
{ {
cbcfgpath="${1}" _cbcfg="${1}"
displaymode="${2}" displaymode="${2}"
initmode="${3}" initmode="${3}"
if [ ! -f "${cbcfgpath}" ]; then if [ ! -f "${_cbcfg}" ]; then
printf "'%s' does not exist. Skipping build for %s %s %s\n" \ printf "'%s' does not exist. Skipping build for %s %s %s\n" \
${cbcfgpath} ${board} \ ${_cbcfg} ${board} \
${displaymode} ${initmode} ${displaymode} ${initmode}
return 0 return 0
fi fi
mkCoreboot "${cbdir}" "${cbcfgpath}" mkCoreboot "${cbdir}" "${_cbcfg}"
if [ "${displaymode}" = "txtmode" ] \ if [ "${displaymode}" = "txtmode" ] \
&& [ "${payload_memtest}" = "y" ]; then && [ "${payload_memtest}" = "y" ]; then
@ -590,7 +638,7 @@ mkRoms()
fi fi
if [ "${payload_seabios}" = "y" ]; then if [ "${payload_seabios}" = "y" ]; then
if [ "${payload_seabios_withgrub}" = "n" ]; then if [ "${payload_seabios_wgrub}" = "n" ]; then
x=${corebootrom} x=${corebootrom}
y=${initmode} y=${initmode}
t=$(mkSeabiosRom "$x" "fallback/payload" "$y") t=$(mkSeabiosRom "$x" "fallback/payload" "$y")
@ -633,36 +681,4 @@ mkRoms()
fi fi
} }
if [ -z ${displaymodes} ]; then main $@
initmode="libgfxinit"
for displaymode in corebootfb txtmode; do
cbcfgpath="${cbcfgdir}/${board}/config/${initmode}_$displaymode"
mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}"
done
initmode="vgarom"
for displaymode in vesafb txtmode; do
cbcfgpath="${cbcfgdir}/${board}/config/${initmode}_$displaymode"
mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}"
done
initmode="normal"
displaymode="txtmode"
cbcfgpath="${cbcfgdir}/${board}/config/${initmode}"
mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}"
else
echo "special displaymode defined as $displaymodes"
for initmode in vgarom libgfxinit; do
for displaymode in ${displaymodes}; do
cbcfgpath="${cbcfgdir}/${board}/config/${initmode}_"
cbcfgpath="${cbcfgpath}${displaymode}"
mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}"
done
done
fi
(
cd "${cbdir}"
make distclean
)