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.freiho...@siemens.com> --- bsp/beaglebone/beaglebone.scc | 5 +++++ bsp/beaglebone/qemu-bb.cfg | 9 +++++++++ bsp/beaglebone/qemu-bb.scc | 1 + 3 files changed, 15 insertions(+) create mode 100644 bsp/beaglebone/qemu-bb.cfg create mode 100644 bsp/beaglebone/qemu-bb.scc diff --git a/bsp/beaglebone/beaglebone.scc b/bsp/beaglebone/beaglebone.scc index 4b15ec06..2a5e67b1 100644 --- a/bsp/beaglebone/beaglebone.scc +++ b/bsp/beaglebone/beaglebone.scc @@ -5,3 +5,8 @@ include features/usb-net/usb-net.scc include features/input/input.scc include cfg/usb-mass-storage.scc include wifi.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 diff --git a/bsp/beaglebone/qemu-bb.cfg b/bsp/beaglebone/qemu-bb.cfg new file mode 100644 index 00000000..28b3d4ec --- /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 00000000..8bbcae8d --- /dev/null +++ b/bsp/beaglebone/qemu-bb.scc @@ -0,0 +1 @@ +kconf hardware qemu-bb.cfg -- 2.11.0 -- _______________________________________________ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto