Project

General

Profile

Actions

Bug #527

open

Can't compile coreboot on Arch Linux

Added by naixin Lv 4 months ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
build system
Target version:
Start date:
02/23/2024
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
GIGABYTE GA-H61M-DS2
Affected OS:
none

Description

I want to compile coreboot for my Gigabyte GA-H61M-DS2 mainboard, but I only found a short guide for this board at this site: https://www.iot-tech.dev/full.php?ar=166
After downloaded the coreboot git repository, It gave me this error:

/home/zhongli/coreboot/util/crossgcc/xgcc/bin/x86_64-elf-ld.bfd: build/romstage/console/vtxprintf.o: in function `number':
/home/zhongli/coreboot/src/console/vtxprintf.c:63:(.text.number+0x12b): undefined reference to `__udivmoddi4'
/home/zhongli/coreboot/util/crossgcc/xgcc/bin/x86_64-elf-ld.bfd: build/romstage/lib/gcc.o: in function `__wrap___divdi3':
/home/zhongli/coreboot/src/lib/gcc.c:19:(.text.__wrap___divdi3+0x1): undefined reference to `__divdi3'
/home/zhongli/coreboot/util/crossgcc/xgcc/bin/x86_64-elf-ld.bfd: build/romstage/lib/gcc.o: in function `__wrap___udivdi3':
/home/zhongli/coreboot/src/lib/gcc.c:20:(.text.__wrap___udivdi3+0x1): undefined reference to `__udivdi3'
make: *** [src/arch/x86/Makefile.mk:191: build/cbfs/fallback/romstage.debug] Error 1

And I'll put my config file on here.
Any help ?


Files

defconfig (726 Bytes) defconfig My config file. naixin Lv, 02/23/2024 02:43 PM
ifd_shrinked.bin (4 KB) ifd_shrinked.bin My IFD firmware. naixin Lv, 02/23/2024 02:43 PM
me_shrinked.bin (96 KB) me_shrinked.bin My Intel ME firmware. naixin Lv, 02/23/2024 02:43 PM
Actions #1

Updated by naixin Lv 4 months ago

  • Target version changed from none to master
Actions #2

Updated by naixin Lv 4 months ago

  • Assignee deleted (naixin Lv)
Actions #3

Updated by Maximilian Brune 4 months ago

When I build this defconfig it works (at least without the payload). You could try removing the ANY_TOOLCHAIN option, because it seems like that your libgcc.a is not correct.

Actions #4

Updated by Nico Huber 4 months ago

/home/zhongli/coreboot/util/crossgcc/xgcc/bin/x86_64-elf-ld.bfd: build/romstage/console/vtxprintf.o: in function `number':

Actually, this looks like it's using the reference toolchain, but the 64-bit one. xcompile picks up 64-bit toolchains even if they don't have a libgcc for 32-bit builds.

If you are trying a 32-bit build (the default, so I guess yes), try make crossgcc-i386 CPUS=$(nproc).

Actions

Also available in: Atom PDF