Bug #208

emulation/qemu-armv7: Fails to build a QEMU/ARM

Added by Asami Doi 3 months ago. Updated about 2 months ago.

Status:ClosedStart date:05/29/2019
Priority:NormalDue date:
Assignee:Asami Doi% Done:

0%

Category:-
Target version:-

Description

Fails to build a QEMU/ARM with a coreinfo payload. An error is:

ERROR: Ramstage region _postram_cbfs_cache overlapped by: fallback/payload
Makefile.inc:1171: recipe for target 'check-ramstage-overlaps' failed

The same problem seems to happen since 2017 [1][2].

[1] https://coreboot.coreboot.narkive.com/fUz0RT5Z/error-ramstage-region-postram-cbfs-cache-overlapped
[2] https://mail.coreboot.org/pipermail/coreboot/2017-February/083336.html

The details I did are:
$ make crossgcc-arm CPUS=$(nproc)
$ make -C payloads/coreinfo
$ make menuconfig
select 'Mainboard' menu
Beside 'Mainboard vendor' should be '(Emulation)'
Beside 'Mainboard model' should be 'QEMU armv7 (vexpress-a9)'

select 'Payload' menu
select 'Add a Payload'
choose 'An Elf executable payload'
select 'Payload path and filename'
enter 'payloads/coreinfo/build/coreinfo.elf'
$ make
…..(omitted).....
W: Written area will abut bottom of target region: any unused space will keep its current contents
CBFS fallback/romstage
CBFS fallback/ramstage
CBFS config
CBFS revision
CBFS fallback/payload
INFO: Performing operation on 'COREBOOT' region...
ERROR: Ramstage region _postram_cbfs_cache overlapped by: fallback/payload
Makefile.inc:1171: recipe for target 'check-ramstage-overlaps' failed
make: *** [check-ramstage-overlaps] Error 1

History

#1 Updated by Patrick Rudolph 3 months ago

coreinfo is x86 only and is compiled using the i386-gcc.
Trying to use it on arm machine causes this issue.

#2 Updated by Asami Doi 3 months ago

coreinfo is x86 only and is compiled using the i386-gcc.

You're right. I made a mistake to compile payload as 32-bit x86 architecture.
So, I created an executable elf file for 32-bit ARM and added coreboot.rom as a payload.
However, "Payload not loaded." happens when I execute on qemu-system-arm.
I'm investigating why I cannot execute coreboot.rom with an ARM elf file and this issue should be closed after solve it.

#3 Updated by Asami Doi 3 months ago

The reason why "Payload not loaded" happens is because the configuration of libpayload was not enough.
The load address of a payload should be placed the RAM place where anyone can use. You can define the load address by CONFIG_LP_BASE_ADDRESS in the libpayload directory.

#4 Updated by Asami Doi 2 months ago

This issue should be closed because I updated a sample Makefile and created a configuration. We can currently build an ARM payload with libpayload for QEMU.

Please see this CL for more information: https://review.coreboot.org/c/coreboot/+/33287

#5 Updated by Patrick Rudolph about 2 months ago

  • Status changed from New to Closed

Also available in: Atom PDF