Files
meta-riscv/conf/machine/freedom-u540.conf
Alistair Francis cb0857efe5 freedom-u540: Use fitImage
Let's swap to using a fitImage by default. At the same time let's update
the u-boot boot commands to handle all the image types and support
loading a uEnv.txt file.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-07-25 15:19:43 -07:00

76 lines
1.9 KiB
Plaintext

#@TYPE: Machine
#@NAME: freedom-u540
#@SOC: Freedom U540
#@DESCRIPTION: Machine configuration for the HiFive Unleashed development board
require conf/machine/include/riscv/tune-riscv.inc
MACHINE_FEATURES = "screen keyboard ext2 ext3 serial"
KERNEL_CLASSES = "kernel-fitimage"
KERNEL_IMAGETYPE = "fitImage"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-mainline"
EXTRA_IMAGEDEPENDS += "opensbi"
RISCV_SBI_PLAT = "sifive/fu540"
## This sets u-boot as the default OpenSBI payload
RISCV_SBI_PAYLOAD ?= "u-boot.bin"
## This will set the kernel as the OpenSBI payload. This is not recommended,
## you can use U-Boot's MMC loading instead.
# RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin"
RISCV_SBI_FDT ?= "hifive-unleashed-a00.dtb"
## Use this to add Microsemi Expansion board support
# RISCV_SBI_FDT ?= "hifive-unleashed-a00-microsemi.dtb"
SERIAL_CONSOLES = "115200;ttySIF0"
MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
IMAGE_FSTYPES += "wic.gz ext4"
KERNEL_DEVICETREE ?= "sifive/${RISCV_SBI_FDT}"
## Do not update fstab file when using wic images
WIC_CREATE_EXTRA_ARGS ?= "--no-fstab-update"
EXTRA_IMAGEDEPENDS += "u-boot"
UBOOT_MACHINE = "sifive_fu540_defconfig"
UBOOT_ENTRYPOINT = "0x80200000"
UBOOT_DTB_LOADADDRESS = "0x82200000"
## Set this to "mmc-boot" to generate a boot.scr file which should be included
## in the boot partition. It will try to load a kernel image by TFTP and if that
## fails it will fall back to local images in the boot partition.
UBOOT_ENV ?= "tftp-mmc-boot"
## wic default support
WKS_FILE_DEPENDS ?= " \
opensbi \
e2fsprogs-native \
bmap-tools-native \
"
IMAGE_BOOT_FILES ?= " \
fw_payload.bin \
fitImage \
boot.scr.uimg \
"
WKS_FILE ?= "freedom-u540-opensbi.wks"
BAD_RECOMMENDATIONS += "\
libcxx-dev \
libcxx-staticdev \
compiler-rt-dev \
compiler-rt-staticdev \
"
ASSUME_PROVIDED += "\
libcxx-dev \
libcxx-staticdev \
compiler-rt-dev \
compiler-rt-staticdev \
"