Closed MilesBHuff closed 10 months ago
Your toolchain setup is broken. The build is using the system provided GCC and not the coreboot provided GCC.
Are crossgcc-i386
and crossgcc-x64
built in coreboot?
The build is using the system provided GCC and not the coreboot provided GCC.
Ahh gotcha. Yes, that is correct; I symlinked my system's GCC binaries into coreboot, since the build was complaining that they were missing, and buildgcc
in system76/firmware-open/coreboot/util/crossgcc
didn't provide those binaries when I ran it.
Are
crossgcc-i386
andcrossgcc-x64
built in coreboot?
I ran buildgcc
in system76/firmware-open/coreboot/util/crossgcc
; it seems to have only built i386.
Ah, and this is where looking at an issue in the day and not late at night comes in handy: I just needed to notice the existence of, and read, the Makefile
. This is what I needed to run: CPUS=$(nproc) make build-x64
.
Unfortunately, I'm still seeing the following error:
/home/user/Development/system76/firmware-open/coreboot/util/crossgcc/xgcc/bin/x86_64-elf-gcc-ar: Cannot find binary 'x86_64-elf-ar'
make: *** [GNUmakefile:412: /home/user/Development/system76/firmware-open/edk2/Build/UefiPayloadPkgX64/RELEASE_COREBOOT/X64/UefiCpuPkg/CpuDxe/CpuDxe/OUTPUT/CpuDxe.lib] Error 1
...which is odd, because that file definitely exists at that location, and is not a symlink any longer.
crossgcc-i386
and crossgcc-x64
are the coreboot targets to build.
Ah! I see now what you meant. I need to build coreboot on its own, with those targets, before I can build the firmware. I thought per the firmware's README that I only needed to build the firmware itself.
Alas, it seems it may no longer be possible to build the older version of coreboot used in b337ac6:
You can now run NASM from /home/user/Development/system76/firmware-open/coreboot/util/crossgcc/xgcc.
Welcome to the coreboot cross toolchain builder v2022-07-30_ae157d38e3
Building toolchain using 16 thread(s).
Downloading and verifying tarballs ...
* acpica-unix2-20220331.tar.gz (downloading from https://acpica.org/sites/acpica/files/acpica-unix2-20220331.tar.gz)... 0%... Failed to download acpica-unix2-20220331.tar.gz.
make[1]: *** [Makefile:23: build_iasl] Error 1
make: *** [util/crossgcc/Makefile.inc:30: crossgcc-i386] Error 2
Trying again with the latest code, though, I was indeed able to build coreboot using the targets you provided. (Huzzah!) Unfortunately, I'm still running into the same error as above when I try to built the firmware:
/home/user/Development/system76/firmware-open/coreboot/util/crossgcc/xgcc/bin/x86_64-elf-gcc-ar: Cannot find binary 'x86_64-elf-ar'
Which, again, is weird, because this file exists:
-rwxr-xr-x 1 user user 49280 Jul 27 11:04 /home/user/Development/system76/firmware-open/coreboot/util/crossgcc/xgcc/bin/x86_64-elf-gcc-ar
I cannot reproduce this on a fresh clone.
Try cleaning edk2:
git -C edk2 clean -dffx
New coreboot toolchain uses GCC 13 and hits this issue. The fix been cherry-picked to system76-stable202108
.
Sorry for disappearing earlier -- life got busy and I never got back around to trying to compile this. Given what you just found, it sounds like the issue I was experiencing may have just been me running too new a version of GCC. Thanks for following up.
I get the following error when trying to build https://github.com/system76/firmware-open with both the latest code and the code as of hash https://github.com/system76/firmware-open/commit/b337ac66fb3b8d77880e81f35acf3c50072a85c2 (the last safe commit for 10th gen and older):
Full log: https://gist.github.com/MilesBHuff/145df4d28f359504d691e2a41da93887#file-build-log
OS: OpenSUSE Tumbleweed I've installed all of the dependencies in
scripts/deps.sh
, afaict.