Files
system76-coreboot/src/mainboard/emulation/qemu-riscv/Kconfig
Furquan Shaikh 46514c2b87 treewide: Add Kconfig variable MEMLAYOUT_LD_FILE
This change defines a Kconfig variable MEMLAYOUT_LD_FILE which allows
SoC/mainboard to provide a linker file for the platform. x86 already
provides a default memlayout.ld under src/arch/x86. With this new
Kconfig variable, it is possible for the SoC/mainboard code for x86 to
provide a custom linker file as well.

Makefile.inc is updated for all architectures to use this new Kconfig
variable instead of assuming memlayout.ld files under a certain
path. All non-x86 boards used memlayout.ld under mainboard
directory. However, a lot of these boards were simply including the
memlayout from SoC. So, this change also updates these mainboards and
SoCs to define the Kconfig as required.

BUG=b:155322763
TEST=Verified that abuild with --timeless option results in the same
coreboot.rom image for all boards.

Change-Id: I6a7f96643ed0519c93967ea2c3bcd881a5d6a4d6
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42292
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-06-13 06:49:23 +00:00

76 lines
1.8 KiB
Plaintext

## SPDX-License-Identifier: GPL-2.0-only
# To execute, do:
# util/riscv/make-spike-elf.sh build/coreboot.rom build/coreboot.elf
# qemu-system-riscv64 -M virt -m 1024M -nographic -kernel build/coreboot.elf
if BOARD_EMULATION_QEMU_RISCV_RV64
config BOARD_EMULATION_QEMU_RISCV
def_bool y
select ARCH_RISCV_RV64
endif
if BOARD_EMULATION_QEMU_RISCV_RV32
config BOARD_EMULATION_QEMU_RISCV
def_bool y
select ARCH_RISCV_RV32
endif
if BOARD_EMULATION_QEMU_RISCV
config BOARD_SPECIFIC_OPTIONS
def_bool y
select SOC_UCB_RISCV
select BOARD_ROMSIZE_KB_4096
select BOOT_DEVICE_NOT_SPI_FLASH
select MISSING_BOARD_RESET
select DRIVERS_UART_8250MEM
select RISCV_HAS_OPENSBI
config MEMLAYOUT_LD_FILE
string
default "src/mainboard/emulation/qemu-riscv/memlayout.ld"
config MAINBOARD_DIR
string
default "emulation/qemu-riscv"
config MAINBOARD_PART_NUMBER
string
default "QEMU RISCV"
config MAX_CPUS
int
default 1
config DRAM_SIZE_MB
int
default 32768
config OPENSBI_PLATFORM
string
default "qemu/virt"
# ugly, but CBFS is placed in DRAM...
config OPENSBI_TEXT_START
hex
default 0x80010000 if COREBOOT_ROMSIZE_KB_64
default 0x80020000 if COREBOOT_ROMSIZE_KB_128
default 0x80040000 if COREBOOT_ROMSIZE_KB_256
default 0x80080000 if COREBOOT_ROMSIZE_KB_512
default 0x80100000 if COREBOOT_ROMSIZE_KB_1024
default 0x80200000 if COREBOOT_ROMSIZE_KB_2048
default 0x80400000 if COREBOOT_ROMSIZE_KB_4096
default 0x80600000 if COREBOOT_ROMSIZE_KB_6144
default 0x80800000 if COREBOOT_ROMSIZE_KB_8192
default 0x80a00000 if COREBOOT_ROMSIZE_KB_10240
default 0x80c00000 if COREBOOT_ROMSIZE_KB_12288
default 0x81000000 if COREBOOT_ROMSIZE_KB_16384
default 0x82000000 if COREBOOT_ROMSIZE_KB_32768
default 0x84000000 if COREBOOT_ROMSIZE_KB_65536
endif # BOARD_EMULATION_QEMU_RISCV