[linux-yocto] [kernel-cache][PATCH 1/2] features: add qemu-guest
Adrian Freihofer
adrian.freihofer at siemens.com
Sun Jun 9 05:44:51 PDT 2019
Purpose: Provide an easy way to add ARCH_VIRT=y to the kernel configuration.
This allows to boot ARM images compiled for real hardware in Qemu as well.
Including this feature e.g. into the Beaglebone BSP allows to:
export MACHINE="beaglebone-yocto"
bitbake core-image-minimale
runqemu
This also works with the 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.
Note: For newer aarch64 devices a pci variant of this config snipped
might be beneficial.
[Yocto #13384]
Signed-off-by: Adrian Freihofer <adrian.freihofer at siemens.com>
---
features/qemu-guest/qemu-arm-virt.cfg | 10 ++++++++++
features/qemu-guest/qemu-arm-virt.scc | 4 ++++
2 files changed, 14 insertions(+)
create mode 100644 features/qemu-guest/qemu-arm-virt.cfg
create mode 100644 features/qemu-guest/qemu-arm-virt.scc
diff --git a/features/qemu-guest/qemu-arm-virt.cfg b/features/qemu-guest/qemu-arm-virt.cfg
new file mode 100644
index 00000000..7aec61de
--- /dev/null
+++ b/features/qemu-guest/qemu-arm-virt.cfg
@@ -0,0 +1,10 @@
+CONFIG_ARCH_VIRT=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_VIRTIO_BLK_SCSI=y
+CONFIG_VIRTIO_NET=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_VIRTIO=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
diff --git a/features/qemu-guest/qemu-arm-virt.scc b/features/qemu-guest/qemu-arm-virt.scc
new file mode 100644
index 00000000..54682dcf
--- /dev/null
+++ b/features/qemu-guest/qemu-arm-virt.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Enable options for ARM images in Qemu"
+define KFEATURE_COMPATIBILITY board
+
+kconf hardware qemu-arm-virt.cfg
--
2.11.0
More information about the linux-yocto
mailing list