summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@siemens.com>2019-06-16 17:45:24 +0200
committerRicardo Salveti <ricardo@foundries.io>2019-07-10 16:55:17 -0300
commitebe4ca5e9b3cc5138c97223e6dfa327e4d75205e (patch)
tree95e564fd9d922894bdc8a70868e2eb354d9e396f
parent5b4f858197fb22c8584fdb3ad96fb1c5c051eb13 (diff)
bsp/beaglebone: support qemu -machine virt
Purpose: Support booting a beaglebone image with runqemu. If the kernel supports Qemu's virt machine, runqemu works almost for free. The device tree for machine virt is included in Qemu, which simplifies everything quite a bit. This change adds ARCH_VIRT=y and some drivers to the beaglebone kernel configuration which allows to: export MACHINE="beaglebone-yocto" bitbake core-image-minimale runqemu This also works out of an eSDK. Whithout this feature usually two different SDKs need to be compiled and maintained. One SDK is used for development in Qemu, another one is used to develop for the real target hardware. [Yocto #13384] Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--bsp/beaglebone/beaglebone.scc5
-rw-r--r--bsp/beaglebone/qemu-bb.cfg9
-rw-r--r--bsp/beaglebone/qemu-bb.scc1
3 files changed, 15 insertions, 0 deletions
diff --git a/bsp/beaglebone/beaglebone.scc b/bsp/beaglebone/beaglebone.scc
index 2087c69..25cca32 100644
--- a/bsp/beaglebone/beaglebone.scc
+++ b/bsp/beaglebone/beaglebone.scc
@@ -42,4 +42,9 @@ include features/power/cpu-freq.scc
include cfg/usb-mass-storage.scc
+# With these addons, runqemu just works (-machine virt)
+# The size of the zImage is increased by 168k for kernel 5.0.
+include cfg/virtio.scc
+include qemu-bb.scc
+
kconf hardware beaglebone.cfg
diff --git a/bsp/beaglebone/qemu-bb.cfg b/bsp/beaglebone/qemu-bb.cfg
new file mode 100644
index 0000000..28b3d4e
--- /dev/null
+++ b/bsp/beaglebone/qemu-bb.cfg
@@ -0,0 +1,9 @@
+CONFIG_ARCH_VIRT=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SPI=y
+CONFIG_SPI_PL022=y
+CONFIG_ARM_SP805_WATCHDOG=y
+CONFIG_RTC_DRV_PL031=y
+CONFIG_PL330_DMA=y
+CONFIG_ARM_TIMER_SP804=y
diff --git a/bsp/beaglebone/qemu-bb.scc b/bsp/beaglebone/qemu-bb.scc
new file mode 100644
index 0000000..8bbcae8
--- /dev/null
+++ b/bsp/beaglebone/qemu-bb.scc
@@ -0,0 +1 @@
+kconf hardware qemu-bb.cfg