summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb5
-rw-r--r--meta/classes/baremetal-image.bbclass14
2 files changed, 16 insertions, 3 deletions
diff --git a/meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb b/meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb
index ee945c1ff0..19ef16988f 100644
--- a/meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb
+++ b/meta-skeleton/recipes-baremetal/baremetal-examples/baremetal-helloworld_git.bb
@@ -4,7 +4,7 @@ DESCRIPTION = "These are introductory examples to showcase the use of QEMU to ru
4LICENSE = "MIT" 4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=39346640a23c701e4f459e05f56f4449" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=39346640a23c701e4f459e05f56f4449"
6 6
7SRCREV = "99f4fa4a3b266b42b52af302610b0f4f429ba5e3" 7SRCREV = "0bf9ea216e6f76be50726a3a74e527b7bbb0ad93"
8PV = "0.1+git${SRCPV}" 8PV = "0.1+git${SRCPV}"
9 9
10SRC_URI = "git://github.com/aehs29/baremetal-helloqemu.git;protocol=https;branch=master" 10SRC_URI = "git://github.com/aehs29/baremetal-helloqemu.git;protocol=https;branch=master"
@@ -28,12 +28,13 @@ inherit baremetal-image
28# machine that QEMU uses on OE, e.g. -machine virt -cpu cortex-a57 28# machine that QEMU uses on OE, e.g. -machine virt -cpu cortex-a57
29# but the examples can also be run on other architectures/machines 29# but the examples can also be run on other architectures/machines
30# such as vexpress-a15 by overriding the setting on the machine.conf 30# such as vexpress-a15 by overriding the setting on the machine.conf
31COMPATIBLE_MACHINE = "qemuarmv5|qemuarm|qemuarm64" 31COMPATIBLE_MACHINE = "qemuarmv5|qemuarm|qemuarm64|qemuriscv64"
32 32
33BAREMETAL_QEMUARCH ?= "" 33BAREMETAL_QEMUARCH ?= ""
34BAREMETAL_QEMUARCH_qemuarmv5 = "versatile" 34BAREMETAL_QEMUARCH_qemuarmv5 = "versatile"
35BAREMETAL_QEMUARCH_qemuarm = "arm" 35BAREMETAL_QEMUARCH_qemuarm = "arm"
36BAREMETAL_QEMUARCH_qemuarm64 = "aarch64" 36BAREMETAL_QEMUARCH_qemuarm64 = "aarch64"
37BAREMETAL_QEMUARCH_qemuriscv64 = "riscv64"
37 38
38EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1" 39EXTRA_OEMAKE_append = " QEMUARCH=${BAREMETAL_QEMUARCH} V=1"
39 40
diff --git a/meta/classes/baremetal-image.bbclass b/meta/classes/baremetal-image.bbclass
index b0f5e885b5..319b61c7cd 100644
--- a/meta/classes/baremetal-image.bbclass
+++ b/meta/classes/baremetal-image.bbclass
@@ -73,7 +73,19 @@ QB_DEFAULT_KERNEL ?= "${IMAGE_LINK_NAME}.bin"
73QB_MEM ?= "-m 256" 73QB_MEM ?= "-m 256"
74QB_DEFAULT_FSTYPE ?= "bin" 74QB_DEFAULT_FSTYPE ?= "bin"
75QB_DTB ?= "" 75QB_DTB ?= ""
76QB_OPT_APPEND = "-nographic" 76QB_OPT_APPEND_append = " -nographic"
77
78# RISC-V tunes set the BIOS, unset, and instruct QEMU to
79# ignore the BIOS and boot from -kernel
80QB_DEFAULT_BIOS_qemuriscv64 = ""
81QB_OPT_APPEND_append_qemuriscv64 = " -bios none"
82
83
84# Use the medium-any code model for the RISC-V 64 bit implementation,
85# since medlow can only access addresses below 0x80000000 and RAM
86# starts at 0x80000000 on RISC-V 64
87CFLAGS_append_qemuriscv64 = " -mcmodel=medany"
88
77 89
78# This next part is necessary to trick the build system into thinking 90# This next part is necessary to trick the build system into thinking
79# its building an image recipe so it generates the qemuboot.conf 91# its building an image recipe so it generates the qemuboot.conf