mirror of
https://github.com/thead-yocto-mirror/meta-riscv
synced 2026-06-21 08:52:24 +02:00
freedom-u540: Enable OpenSBI by default for booting
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
committed by
Khem Raj
parent
d6e7e6f7db
commit
6cbef3699d
@@ -7,30 +7,28 @@ require conf/machine/include/tune-riscv.inc
|
||||
|
||||
MACHINE_FEATURES = "screen keyboard ext2 ext3 serial"
|
||||
|
||||
KERNEL_IMAGETYPE = "vmlinux"
|
||||
# This must be vmlinux for bbl to work and Image for openSBI
|
||||
KERNEL_IMAGETYPE = "Image"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-riscv"
|
||||
PREFERRED_VERSION_linux-riscv ?= "5.0%"
|
||||
|
||||
GDBVERSION = "riscv"
|
||||
|
||||
EXTRA_IMAGEDEPENDS += "riscv-pk"
|
||||
EXTRA_IMAGEDEPENDS += "opensbi"
|
||||
RISCV_SBI_PLAT = "sifive/fu540"
|
||||
# When we have better openSBI -> u-boot -> kernel support in released
|
||||
# versions of u-boot and Linux kernel swap to u-boot binary here.
|
||||
# RISCV_SBI_PAYLOAD ?= "u-boot-${MACHINE}.bin"
|
||||
RISCV_SBI_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin"
|
||||
# Override the DTB from the firmware with this one from openSBI
|
||||
# Use this to add Microsemi Expansion board support
|
||||
# RISCV_SBI_FDT ?= "HiFiveUnleashed-MicroSemi-Expansion.dtb"
|
||||
|
||||
SERIAL_CONSOLE = "115200 console"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
|
||||
|
||||
# The following options can be used to build images that use initramfs,
|
||||
# since the SPI controller driver currently still has an issue, using this
|
||||
# might speed up your boot process signifcantly
|
||||
#
|
||||
#RISCV_BBL_PAYLOAD ?= "${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin"
|
||||
#INITRAMFS_IMAGE_BUNDLE = "1"
|
||||
#INITRAMFS_IMAGE = "riscv-initramfs-image"
|
||||
#KERNEL_INITRAMFS = '-initramfs'
|
||||
|
||||
RISCV_BBL_PAYLOAD ?= "${KERNEL_IMAGETYPE}-${MACHINE}.bin"
|
||||
|
||||
IMAGE_FSTYPES_append = " wic.gz ext4"
|
||||
|
||||
# Do not update fstab file when using wic images
|
||||
@@ -40,12 +38,12 @@ IMAGE_BOOT_FILES = ""
|
||||
|
||||
### wic default support
|
||||
WKS_FILE_DEPENDS ?= " \
|
||||
riscv-pk \
|
||||
opensbi \
|
||||
e2fsprogs-native \
|
||||
bmap-tools-native \
|
||||
"
|
||||
|
||||
WKS_FILE ?= "freedom-u540-bbl.wks"
|
||||
WKS_FILE ?= "freedom-u540-opensbi.wks"
|
||||
|
||||
BAD_RECOMMENDATIONS += "\
|
||||
libcxx-dev \
|
||||
|
||||
6
wic/freedom-u540-opensbi.wks
Normal file
6
wic/freedom-u540-opensbi.wks
Normal file
@@ -0,0 +1,6 @@
|
||||
# short-description: Create SD card image for HiFive Unleashed development board
|
||||
|
||||
part opensbi --source rawcopy --sourceparams="file=fw_payload.bin" --ondisk mmcblk --align 1 --part-type 2e54b353-1271-4842-806f-e436d6af6985
|
||||
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 --size 5G
|
||||
|
||||
bootloader --ptable gpt
|
||||
Reference in New Issue
Block a user