coreboot/payloads/external/LinuxBoot
Maximilian Brune 7bcec7a2ef payloads/LinuxBoot: Build x86_64 with host toolchain
Currently our coreboot toolchain cannot build the Linux kernel in case
of x86_64. It spits out the following error during build:
```
make -C build/kernel-6_3 \
CROSS_COMPILE=/home/max/coreboot-amd/util/crossgcc/xgcc/bin/x86_64-elf- \
ARCH=x86_64 KBUILD_BUILD_USER=coreboot KBUILD_BUILD_HOST=reproducible \
KBUILD_BUILD_TIMESTAMP=Tue Aug 20 13:36:03 2024 KBUILD_BUILD_VERSION=0 bzImage
arch/x86/lib/clear_page_64.S: Assembler messages:
arch/x86/lib/clear_page_64.S:18: Error: number of operands mismatch for `mov'
arch/x86/lib/clear_page_64.S:27: Error: number of operands mismatch for `mov'
make[4]: *** [scripts/Makefile.build:374: arch/x86/lib/clear_page_64.o] Error 1
make[3]: *** [scripts/Makefile.build:494: arch/x86/lib] Error 2
make[3]: *** Waiting for unfinished jobs....
arch/x86/entry/entry_64.S: Assembler messages:
arch/x86/entry/entry_64.S:437: Error: unbalanced parenthesis in operand 1.
arch/x86/entry/entry_64.S:262:  Info: macro invoked from here
arch/x86/entry/entry_64.S:265:   Info: macro invoked from here
arch/x86/entry/entry_64.S:439: Error: unbalanced parenthesis in operand 1.
arch/x86/entry/entry_64.S:262:  Info: macro invoked from here
arch/x86/entry/entry_64.S:265:   Info: macro invoked from here
make[5]: *** [scripts/Makefile.build:374: arch/x86/entry/entry_64.o] Error 1
make[4]: *** [scripts/Makefile.build:494: arch/x86/entry] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:494: arch/x86] Error 2
make[2]: *** [Makefile:2025: .] Error 2
make[1]: *** [targets/linux.mk:60: build/kernel-6_3/arch/x86/boot/bzImage] Error 2
make: *** [payloads/external/Makefile.mk:401: payloads/external/LinuxBoot/build/Image] Error 2
```

In order to fix it, we will default to the host toolchain in order to
build x86_64 Linux. For that we add another Kconfig that decides,
whether or not a cross toolchain is used to build Linux.

Change-Id: Icaf56d6991d79f629e9ba8c901b441d81921d594
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83990
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2024-12-19 07:13:53 +00:00
..
arm64 payloads/external/LinuxBoot: Clean up 2023-07-23 18:24:39 +00:00
i386 payloads/external/LinuxBoot: Clean up 2023-07-23 18:24:39 +00:00
riscv payloads/external/LinuxBoot: Clean up 2023-07-23 18:24:39 +00:00
targets payloads/LinuxBoot: Build x86_64 with host toolchain 2024-12-19 07:13:53 +00:00
x86_64 payloads/external/LinuxBoot: Update x86_64 defconfig 2019-06-28 14:27:34 +00:00
empty.dts payloads/external/LinuxBoot: Clean up 2023-07-23 18:24:39 +00:00
Kconfig payloads/LinuxBoot: Build x86_64 with host toolchain 2024-12-19 07:13:53 +00:00
Kconfig.name payloads/*/Kconfig.name: update documentation link 2023-01-17 15:20:24 +00:00
Makefile LinuxBoot/Makefile: initramfs not build for bzImage 2024-05-11 18:28:30 +00:00