mirror of
https://github.com/thead-yocto-mirror/meta-riscv
synced 2026-09-16 12:14:20 +02:00
Machine-specific packages (like Linux kernel) should have machine-specific PACKAGE_ARCH that is obtained from MACHINE_ARCH. This allows to separate their build artifacts in TMPDIR. Currently all RISC-V machines override MACHINE_ARCH and artifacts for machine-specific recipes collide. For example kernels of both qemuriscv64 and freedom-u540 machines will be deployed into the same $D directory. Remove MACHINE_ARCH override and set tune PACKAGE_ARCH via PACKAGE_EXTRA_ARCHS. Signed-off-by: Taras Kondratiuk <takondra@cisco.com>
32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
#@TYPE: Machine
|
|
#@NAME: generic riscv64 baremetal machine
|
|
#@DESCRIPTION: Machine configuration for running a generic riscv64
|
|
|
|
DEFAULTTUNE = "riscv64"
|
|
require conf/machine/include/qemu.inc
|
|
require conf/machine/include/tune-riscv.inc
|
|
|
|
PREFERRED_VERSION_qemu = "${QEMUVERSION}"
|
|
PREFERRED_VERSION_qemu-native = "${QEMUVERSION}"
|
|
PREFERRED_VERSION_nativesdk-qemu = "${QEMUVERSION}"
|
|
|
|
GDBVERSION = "riscv"
|
|
QEMUVERSION = "riscv"
|
|
|
|
# qemuboot options
|
|
QB_MACHINE = "-machine virt"
|
|
QB_DEFAULT_KERNEL = "bbl"
|
|
QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
|
|
QB_ROOTFS_OPT = "-drive file=@ROOTFS@,format=raw,id=hd0 -device virtio-blk-device,drive=hd0"
|
|
QB_SLIRP_OPT = "-netdev user,id=net0,hostfwd=tcp::22222-:22"
|
|
|
|
# Prelink does not yet work
|
|
|
|
USER_CLASSES_remove = "image-prelink"
|
|
# To support baremetal ld complains
|
|
# /opt/riscv32/sysroots/x86_64-becsdk-linux/usr/libexec/riscv32-bec-elf/gcc/riscv32-bec-elf/7.3.0/real-ld: unrecognized option '--hash-style=gnu'
|
|
#TARGET_LINK_HASH_STYLE = ""
|
|
LINKER_HASH_STYLE = ""
|
|
|
|
TCLIBC = "baremetal"
|