images: remove 'libgfxinit' from the image names.

The build system was designed to produce images with different GPU
drivers for a single computer and/or to show the image name in the
final image names, to enable users to know which GPU driver was used.

However since all boards have practically speaking the same GPU driver
('libgfxinit') this adds too much complexity for almost no benefits.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2024-09-23 16:43:03 +02:00 committed by Adrien 'neox' Bourmault
parent 80f75a334f
commit a202dce646
Signed by: neox
GPG Key ID: 57BC26A3687116F6
77 changed files with 24 additions and 69 deletions

View File

@ -67,8 +67,8 @@ test_qemu_rom_archive()
archive_files="" archive_files=""
for kb in ${keyboard_layouts} ; do for kb in ${keyboard_layouts} ; do
cbfb="libgfxinit_corebootfb" cbfb="corebootfb"
txtmode="libgfxinit_txtmode" txtmode="txtmode"
archive_files="${archive_files} \ archive_files="${archive_files} \
${target}/grub_${target}_${cbfb}_${kb}.rom \ ${target}/grub_${target}_${cbfb}_${kb}.rom \

View File

@ -82,7 +82,7 @@ test_grub_cfg_with_lvm()
fi fi
run_qemu_x86_64 \ run_qemu_x86_64 \
bin/qemu-pc_2mb/grub_qemu-pc_2mb_libgfxinit_corebootfb_usqwerty.rom \ bin/qemu-pc_2mb/grub_qemu-pc_2mb_corebootfb_usqwerty.rom \
"${rootfs_path}" \ "${rootfs_path}" \
"x86_64-linux" ; ret=$? "x86_64-linux" ; ret=$?

View File

@ -257,7 +257,7 @@ moverom() {
# expected: configs must not specify a payload # expected: configs must not specify a payload
mkCoreboot() { mkCoreboot() {
cbdir="${1}" # e.g. coreboot/default cbdir="${1}" # e.g. coreboot/default
cbcfgpath="${2}" # e.g. resources/coreboot/x200_8mb/config/libgfxinit_txtmode cbcfgpath="${2}" # e.g. resources/coreboot/x200_8mb/config/txtmode
if [ ! -f "${cbcfgpath}" ]; then if [ ! -f "${cbcfgpath}" ]; then
printf "\nmkCoreboot: Coreboot config '%s' does not exist. Skipping build.\n" \ printf "\nmkCoreboot: Coreboot config '%s' does not exist. Skipping build.\n" \
"${cbcfgpath}" "${cbcfgpath}"
@ -281,17 +281,11 @@ make_seabios_rom() {
# a tmpfile will be made instead # a tmpfile will be made instead
target_seabios_cbfs_path="${2}" # e.g. fallback/payload target_seabios_cbfs_path="${2}" # e.g. fallback/payload
target_opromloadonly="${3}" # 0 or 1. if 1, only load but don't execute oproms target_opromloadonly="${3}" # 0 or 1. if 1, only load but don't execute oproms
target_initmode="${4}" # e.g. libgfxinit cbfstool_path="${4}"
cbfstool_path="${5}"
if [ "${target_initmode}" = "normal" ]; then # etc/pci-optionrom-exec will be set to 2
target_seabioself="payload/seabios/seabios_vgarom.elf" # etc/pci-optionrom-exec will be set to 0
# if normal, etc/pci-optionrom-exec will be set to 2 target_seabioself="payload/seabios/seabios.elf"
else
target_seabioself="payload/seabios/seabios_${target_initmode}.elf"
# if libgfxinit, etc/pci-optionrom-exec will be set to 2
# if vgarom, etc/pci-optionrom-exec will be set to 0
fi
target_seavgabios_rom="payload/seabios/seavgabios.bin" target_seavgabios_rom="payload/seabios/seavgabios.bin"
tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX) tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX)
@ -299,17 +293,13 @@ make_seabios_rom() {
cp "${target_cbrom}" "${tmprom}" cp "${target_cbrom}" "${tmprom}"
"${cbfstool}" "${tmprom}" add-payload -f "${target_seabioself}" -n ${target_seabios_cbfs_path} -c lzma "${cbfstool}" "${tmprom}" add-payload -f "${target_seabioself}" -n ${target_seabios_cbfs_path} -c lzma
"${cbfstool}" "${tmprom}" add-int -i 3000 -n etc/ps2-keyboard-spinup "${cbfstool}" "${tmprom}" add-int -i 3000 -n etc/ps2-keyboard-spinup
if [ "${target_initmode}" = "normal" ] || [ "${target_initmode}" = "libgfxinit" ]; then
"${cbfstool}" "${tmprom}" add-int -i 2 -n etc/pci-optionrom-exec "${cbfstool}" "${tmprom}" add-int -i 2 -n etc/pci-optionrom-exec
elif [ "${target_initmode}" = "vgarom" ]; then
"${cbfstool}" "${tmprom}" add-int -i 0 -n etc/pci-optionrom-exec
fi # for undefined modes, don't add this integer. rely on SeaBIOS defaults
"${cbfstool}" "${tmprom}" add-int -i 0 -n etc/optionroms-checksum "${cbfstool}" "${tmprom}" add-int -i 0 -n etc/optionroms-checksum
"${cbfstool}" "${tmprom}" add-int -i ${target_opromloadonly} -n etc/only-load-option-roms "${cbfstool}" "${tmprom}" add-int -i ${target_opromloadonly} -n etc/only-load-option-roms
if [ "${target_initmode}" = "libgfxinit" ]; then "${cbfstool_path}" "${tmprom}" add -f "${target_seavgabios_rom}" -n vgaroms/seavgabios.bin -t raw
"${cbfstool_path}" "${tmprom}" add -f "${target_seavgabios_rom}" -n vgaroms/seavgabios.bin -t raw
fi
printf "%s\n" "${tmprom}" printf "%s\n" "${tmprom}"
} }
@ -360,14 +350,13 @@ make_grubrom_from_keymap() {
# Make separate ROM images with GRUB payload, for each supported keymap # Make separate ROM images with GRUB payload, for each supported keymap
mkRomsWithGrub() { mkRomsWithGrub() {
tmprompath="${1}" tmprompath="${1}"
initmode="${2}" displaymode="${2}"
displaymode="${3}" firstpayloadname="${3}" # allow values: grub, seabios, seabios_withgrub
firstpayloadname="${4}" # allow values: grub, seabios, seabios_withgrub
if [ "${payload_grub_withseabios}" = "y" ] && [ "${firstpayloadname}" = "grub" ]; then if [ "${payload_grub_withseabios}" = "y" ] && [ "${firstpayloadname}" = "grub" ]; then
mv "$(make_seabios_rom "${tmprompath}" "seabios.elf" "${seabios_opromloadonly}" "${initmode}" "${cbfstool}")" "${tmprompath}" mv "$(make_seabios_rom "${tmprompath}" "seabios.elf" "${seabios_opromloadonly}" "${cbfstool}")" "${tmprompath}"
elif [ "${payload_seabios_withgrub}" ] && [ "${firstpayloadname}" != "grub" ]; then elif [ "${payload_seabios_withgrub}" ] && [ "${firstpayloadname}" != "grub" ]; then
mv "$(make_seabios_rom "${tmprompath}" "fallback/payload" "${seabios_opromloadonly}" "${initmode}" "${cbfstool}")" "${tmprompath}" mv "$(make_seabios_rom "${tmprompath}" "fallback/payload" "${seabios_opromloadonly}" "${cbfstool}")" "${tmprompath}"
fi fi
for keymapfile in resources/grub/keymap/*; do for keymapfile in resources/grub/keymap/*; do
@ -397,11 +386,7 @@ mkRomsWithGrub() {
firstpayloadname="seabios" firstpayloadname="seabios"
fi fi
if [ "${initmode}" = "normal" ] ; then newrompath="${romdir}/${firstpayloadname}_${board}_${displaymode}_${keymap}.rom"
newrompath="${romdir}/${firstpayloadname}_${board}_${initmode}_${keymap}.rom"
else
newrompath="${romdir}/${firstpayloadname}_${board}_${initmode}_${displaymode}_${keymap}.rom"
fi
moverom "${tmpgrubrom}" "${newrompath}" "${romtype}" moverom "${tmpgrubrom}" "${newrompath}" "${romtype}"
rm -f "${tmpgrubrom}" rm -f "${tmpgrubrom}"
done done
@ -411,11 +396,10 @@ mkRomsWithGrub() {
mkRoms() { mkRoms() {
cbcfgpath="${1}" cbcfgpath="${1}"
displaymode="${2}" displaymode="${2}"
initmode="${3}"
if [ ! -f "${cbcfgpath}" ]; then if [ ! -f "${cbcfgpath}" ]; 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}" "${displaymode}" "${initmode}" "${cbcfgpath}" "${board}" "${displaymode}"
return 0 return 0
fi fi
@ -427,45 +411,29 @@ mkRoms() {
if [ "${payload_seabios}" = "y" ]; then if [ "${payload_seabios}" = "y" ]; then
if [ "${payload_seabios_withgrub}" = "n" ]; then if [ "${payload_seabios_withgrub}" = "n" ]; then
tmpseabiosrom="$(make_seabios_rom "${corebootrom}" "fallback/payload" "${seabios_opromloadonly}" "${initmode}" "${cbfstool}")" tmpseabiosrom="$(make_seabios_rom "${corebootrom}" "fallback/payload" "${seabios_opromloadonly}" "${cbfstool}")"
if [ "${initmode}" = "normal" ]; then newrompath="${romdir}/seabios_${board}_${displaymode}.rom"
newrompath="${romdir}/seabios_${board}_${initmode}.rom"
else
newrompath="${romdir}/seabios_${board}_${initmode}_${displaymode}.rom"
fi
moverom "${tmpseabiosrom}" "${newrompath}" "${romtype}" moverom "${tmpseabiosrom}" "${newrompath}" "${romtype}"
rm -f "${tmpseabiosrom}" rm -f "${tmpseabiosrom}"
else else
tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX) tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX)
cp "${corebootrom}" "${tmprom}" cp "${corebootrom}" "${tmprom}"
mkRomsWithGrub "${tmprom}" "${initmode}" "${displaymode}" "seabios_withgrub" mkRomsWithGrub "${tmprom}" "${displaymode}" "seabios_withgrub"
rm -f "${tmprom}" rm -f "${tmprom}"
fi fi
fi fi
if [ "${payload_grub}" = "y" ]; then if [ "${payload_grub}" = "y" ]; then
mkRomsWithGrub "${corebootrom}" "${initmode}" "${displaymode}" "grub" mkRomsWithGrub "${corebootrom}" "${displaymode}" "grub"
fi fi
} }
initmode="libgfxinit"
for displaymode in corebootfb txtmode; do for displaymode in corebootfb txtmode; do
cbcfgpath="resources/coreboot/${board}/config/${initmode}_${displaymode}" cbcfgpath="resources/coreboot/${board}/config/${displaymode}"
mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}" mkRoms "${cbcfgpath}" "${displaymode}"
done done
initmode="vgarom"
for displaymode in vesafb txtmode; do
cbcfgpath="resources/coreboot/${board}/config/${initmode}_${displaymode}"
mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}"
done
initmode="normal"
displaymode="txtmode"
cbcfgpath="resources/coreboot/${board}/config/${initmode}"
mkRoms "${cbcfgpath}" "${displaymode}" "${initmode}"
( (
cd "${cbdir}" cd "${cbdir}"
make distclean make distclean

View File

@ -248,19 +248,6 @@ using bincfg. Intel provides some limited information about ICH10 descriptors
in public datasheets. The rest can be guessed at like it was for ICH9M in in public datasheets. The rest can be guessed at like it was for ICH9M in
libreboot. libreboot.
Re-do desktop boards
--------------------
Right now, the configs make no sense. VGA ROM setup (for external GPU) also
runs libgfxinit, and vice versa, on KCMA-D8 / KGPE-D16, and in many
configs, both coreboot and seabios run pci roms. There needs to be consistency
here.
I think there should be separation:
* libgfxinit. coreboot doesn't load pci roms. seabios loads them
* vgarom-only setup, where coreboot runs pci roms. seabios doesn't load them
Add the following boards Add the following boards
------------------------ ------------------------