Project

General

Profile

Actions

Bug #208

closed

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

Added by Asami Doi over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
05/29/2019
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

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

Actions #1

Updated by Patrick Rudolph over 5 years ago

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

Actions #2

Updated by Asami Doi over 5 years 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.

Actions #3

Updated by Asami Doi over 5 years 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.

Actions #4

Updated by Asami Doi over 5 years 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

Actions #5

Updated by Patrick Rudolph over 5 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF