summaryrefslogtreecommitdiff
path: root/resources/scripts
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-07-16 03:18:58 +0100
committerLeah Rowe <leah@libreboot.org>2023-07-16 03:18:58 +0100
commitaf084014f04602f570a23b0cc23a112401348faf (patch)
tree87d24edd508fe384d236fa81a701f6d837adfe7e /resources/scripts
parente6002b91557bc4da7dccf06cd861a33a67262672 (diff)
coreboot: re-add asus kgpe-d16/kcma-d8/kfsn4-dre
Libreboot 20220710 was the last release to support these boards. I plan to eventually port code differences between D8/D16 to Dasharo, for KCMA-D8 support in Dasharo, to then use in Libreboot for both KCMA-D8 and KGPE-D16, but I have no plans to update the KFSN4-DRE code, at least for now. Libreboot 20220710 used coreboot 4.11, whereas this patch makes use of coreboot 4.11_branch; the crossgcc toolchains no longer compile on modern distros, so I spent time patching those (tested in Debian Sid, will also work on Arch Linux and so on). The acpica downloads now fail, in 4.11_branch, because Intel made some changes upstream for these tarball downloads. Newer coreboot works around this by grabbing tarballs from github, itself a non-ideal solution, but I digress; this patch changes coreboot crossgcc (in 4.11_branch) to download the acpica tarball from libreboot rsync, where I've added it. This patch also re-introduces the PIKE2008 fix, where empty option ROMs for these are inserted into CBFS. This prevents SeaBIOS from loading the real option ROMs, which would cause SeaBIOS to hang. This means that SAS drives are not supported in SeaBIOS, for these boards in Libreboot. I previously said, in the Censored Libreboot c20230710 announcement, that I would *only* merge D8/D16 when I've added Dasharo support to Libreboot, and use that, but the work to make coreboot 4.11_branch compile is something I'm quite proud of and I see no reason to exclude from lbmk master branch. Honestly, there's not much different than 4.11, code-wise. I *probably* won't use 4.11_branch for the next Libreboot release, on D8/D16. By then, I might have Dasharo integrated in lbmk instead. We shall see. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'resources/scripts')
-rwxr-xr-xresources/scripts/build/boot/roms_helper24
1 files changed, 24 insertions, 0 deletions
diff --git a/resources/scripts/build/boot/roms_helper b/resources/scripts/build/boot/roms_helper
index 97178593..8e1655a5 100755
--- a/resources/scripts/build/boot/roms_helper
+++ b/resources/scripts/build/boot/roms_helper
@@ -84,6 +84,8 @@ seabios_opromloadonly="0"
payload_memtest="n"
payload_uboot="n"
uboot_config="undefined"
+# ditto option whether to compile ada in crossgcc:
+crossgcc_ada="y" # yes by default
# Override the above defaults using board.cfg
. "resources/coreboot/${board}/board.cfg"
@@ -170,7 +172,13 @@ if [ "${blobs_required}" != "n" ] \
blobs_required="y"
fi
+# ada support needed for libgfxinit submodule
+if [ "${crossgcc_ada}" != "y" ] && [ "${crossgcc_ada}" != "n" ]; then
+ crossgcc_ada="y"
+fi
+
# Override all payload directives with cmdline args
+# (do not override crossgcc_ada)
if [ ! -z ${payloads} ]; then
echo "setting payloads $payloads"
payload_grub="n"
@@ -203,6 +211,9 @@ fi
cat version > "${cbdir}/.coreboot-version"
+if [ "${crossgcc_ada}" = "n" ]; then
+ export BUILD_LANGUAGES=c
+fi
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
@@ -334,6 +345,19 @@ moverom() {
cp ${rompath} ${newrompath}
fi
+ # pike2008 cards cause a system hang when loading option roms in seabios
+ # if there is an empty option rom in cbfs, no option rom will be loaded
+ if [ "${cuttype}" = "d8d16sas" ]; then
+ emptyrom=$(mktemp -t coreboot_rom.XXXXXXXXXX)
+ rm -f "${emptyrom}"
+ touch "${emptyrom}"
+ for deviceID in "0072" "3050"; do
+ "${cbfstool}" "${newrompath}" add -f "${emptyrom}" \
+ -n pci1000,${deviceID}.rom -t raw
+ done
+ rm -f "${emptyrom}"
+ fi
+
for romsize in 4 8 16; do
ifdgbe="descriptors/ich9m/ich9fdgbe_${romsize}m.bin"
if [ "${cuttype}" = "${romsize}MiB ICH9 IFD NOR flash" ]; then