diff options
author | Leah Rowe <leah@libreboot.org> | 2023-05-08 19:45:32 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-05-09 20:40:12 +0100 |
commit | 3f1ee01507444335bda531b394bcdf36b5a47495 (patch) | |
tree | 01cf04bd1789a6c3d28deb71f509a7b74add7139 /resources/scripts | |
parent | 450f19bd7973d9a6e050ebe91207b93c2ba03e85 (diff) |
seabios: do normal config, disable oprom in vgarom
previously, "normal" initmode relied on the vgarom-based
seabios config, which enables option roms, but then lbmk
would insert pci-optionrom-exec 0 for vgarom, and 2 for normal
in libreboot, coreboot roms with "vgarom" in the filename do
pci option rom execution from coreboot, and "normal" roms
do execution from seabios(where seabios is the only payload
provided on normal setups)
this is because payloads like grub can also be used, on vgarom
setups, where coreboot must handle oprom execution
Diffstat (limited to 'resources/scripts')
-rwxr-xr-x | resources/scripts/build/boot/roms_helper | 14 | ||||
-rwxr-xr-x | resources/scripts/build/payload/seabios | 10 |
2 files changed, 13 insertions, 11 deletions
diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper index 9bcc6933..dd4a3b19 100755 --- a/resources/scripts/build/boot/roms_helper +++ b/resources/scripts/build/boot/roms_helper @@ -217,7 +217,8 @@ fi if [ ! -f "${seavgabiosrom}" ] \ || [ ! -f payload/seabios/seabios_libgfxinit.elf ] \ - || [ ! -f payload/seabios/seabios_vgarom.elf ]; then + || [ ! -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" ] \ @@ -361,14 +362,7 @@ make_seabios_rom() { target_opromloadonly="${3}" # 0 or 1. if 1, only load but don't execute oproms target_initmode="${4}" # e.g. libgfxinit - if [ "${target_initmode}" = "normal" ]; then - target_seabioself="payload/seabios/seabios_vgarom.elf" - # if normal, etc/pci-optionrom-exec will be set to 2 - 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_seabioself="payload/seabios/seabios_${target_initmode}.elf" target_seavgabios_rom="payload/seabios/seavgabios.bin" tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX) @@ -378,7 +372,7 @@ make_seabios_rom() { "${cbfstool}" "${tmprom}" add-int -i 3000 -n etc/ps2-keyboard-spinup || exit 1 if [ "${target_initmode}" = "normal" ] || [ "${target_initmode}" = "libgfxinit" ]; then "${cbfstool}" "${tmprom}" add-int -i 2 -n etc/pci-optionrom-exec || exit 1 - elif [ "${target_initmode}" = "vgarom" ]; then + elif [ "${target_initmode}" = "vgarom" ]; then # coreboot executes the rom "${cbfstool}" "${tmprom}" add-int -i 0 -n etc/pci-optionrom-exec || exit 1 fi # for undefined modes, don't add this integer. rely on SeaBIOS defaults "${cbfstool}" "${tmprom}" add-int -i 0 -n etc/optionroms-checksum || exit 1 diff --git a/resources/scripts/build/payload/seabios b/resources/scripts/build/payload/seabios index af2840d8..4a7ba626 100755 --- a/resources/scripts/build/payload/seabios +++ b/resources/scripts/build/payload/seabios @@ -2,7 +2,7 @@ # helper script: builds SeaBIOS source code # -# Copyright (C) 2020, 2021 Leah Rowe <info@minifree.org> +# Copyright (C) 2020, 2021, 2023 Leah Rowe <info@minifree.org> # Copyright (C) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com> # # This program is free software: you can redistribute it and/or modify @@ -55,6 +55,14 @@ make -j$(nproc) mv out/bios.bin.elf ../payload/seabios/seabios_vgarom.elf rm .config +# for normal setup: +[ -f Makefile ] && make distclean +cp ../resources/seabios/config/normal .config +make silentoldconfig -j$(nproc) +make -j$(nproc) +mv out/bios.bin.elf ../payload/seabios/seabios_normal.elf +rm .config + # clean it again. gotta keep it clean! [ -f Makefile ] && make distclean |