aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2018-05-08 19:32:48 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-08-16 13:55:32 +0000
commit3db38dbef769db4ecfd21f0761bd258a621d0f26 (patch)
treea3111236c49b91cb26e118f43e14e03871261df2
parent30aae8bada22d350ce68ec5acc3d7ef4df46f7f0 (diff)
Add machine templates for qemuarm and qemuarm64
This changeset adds the necessary tepmlates to build the qemu targets for ARM 32bit and 64bit. The MACHINE names are 'qemuarm' and 'qemuarm64'. As the compiler flags for qemuarm in Yocto are using the equivalent of armv5te, we need to ship our own machine/qemuarm.conf with our default tuning for armv7-a (YP name armv7ve), and overrides to build a v7 kernel and use a v7 capable QEMU machine. For qemuarm64, some additional kernel configuration is enabled to allow building and loading of the MOST drivers. Bug-AGL: SPEC-756 Change-Id: I0a688a1d61a75f1287902fc2733a8a54b0485a34 Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> Signed-off-by: Scott Murray <scott.murray@konsulko.com>
-rw-r--r--meta-agl-bsp/conf/include/agl_qemuarm.inc14
-rw-r--r--meta-agl-bsp/conf/include/agl_qemuarm64.inc17
-rw-r--r--meta-agl-bsp/conf/machine/qemuarm.conf18
-rw-r--r--meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg9
-rw-r--r--[-rwxr-xr-x]meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend8
-rwxr-xr-xmeta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_4.12.bbappend2
-rw-r--r--templates/machine/qemuarm/50_local.conf.inc3
-rw-r--r--templates/machine/qemuarm64/50_local.conf.inc3
8 files changed, 73 insertions, 1 deletions
diff --git a/meta-agl-bsp/conf/include/agl_qemuarm.inc b/meta-agl-bsp/conf/include/agl_qemuarm.inc
new file mode 100644
index 000000000..739eb8dd0
--- /dev/null
+++ b/meta-agl-bsp/conf/include/agl_qemuarm.inc
@@ -0,0 +1,14 @@
+# Configuration for serial console
+#QB_KERNEL_CMDLINE_APPEND_append = " console=ttyAMA0,115200n8"
+#
+# All boot message will be off
+QB_KERNEL_CMDLINE_APPEND_append = " quiet"
+
+# Build updatable image. Only takes effect when sota.bbclass is inherited
+#DISTRO_FEATURES_append = " sota"
+
+# Root device
+ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02"
+
+# Use our own wks file
+WKS_FILE="directdisk.wks.in"
diff --git a/meta-agl-bsp/conf/include/agl_qemuarm64.inc b/meta-agl-bsp/conf/include/agl_qemuarm64.inc
new file mode 100644
index 000000000..ca2cc947e
--- /dev/null
+++ b/meta-agl-bsp/conf/include/agl_qemuarm64.inc
@@ -0,0 +1,17 @@
+# Configuration for serial console
+#QB_KERNEL_CMDLINE_APPEND_append = " console=ttyAMA0,115200n8"
+
+# All boot message will be off
+QB_KERNEL_CMDLINE_APPEND_append = " quiet"
+
+# Build updatable image. Only takes effect when sota.bbclass is inherited
+DISTRO_FEATURES_append = " sota"
+
+# Root device
+ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02"
+
+# Over-ride setting in oe-core's qemuarm64.conf
+QB_MEM_qemuarm64 = "-m 2048"
+
+# Use our own wks file
+WKS_FILE="directdisk.wks.in"
diff --git a/meta-agl-bsp/conf/machine/qemuarm.conf b/meta-agl-bsp/conf/machine/qemuarm.conf
new file mode 100644
index 000000000..d47c05208
--- /dev/null
+++ b/meta-agl-bsp/conf/machine/qemuarm.conf
@@ -0,0 +1,18 @@
+#@TYPE: Machine
+#@NAME: armv7a
+#@DESCRIPTION: generic ARM 32bit
+
+require conf/machine/include/qemu.inc
+require conf/machine/include/arm/arch-armv7ve.inc
+
+KERNEL_IMAGETYPE = "zImage"
+
+SERIAL_CONSOLES ?= "38400;ttyAMA0 38400;hvc0"
+
+# For runqemu
+QB_SYSTEM_NAME = "qemu-system-arm"
+QB_MACHINE = "-machine virt"
+
+# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
+QB_OPT_APPEND = "-show-cursor -usb -device virtio-rng-pci"
+PREFERRED_VERSION_linux-yocto ??= "4.12%"
diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg
new file mode 100644
index 000000000..15ddbd21e
--- /dev/null
+++ b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg
@@ -0,0 +1,9 @@
+CONFIG_I2C=y
+CONFIG_USB=y
+CONFIG_MEDIA_SUPPORT=m
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
+CONFIG_MEDIA_CONTROLLER=y
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L2_SUBDEV_API=y
+CONFIG_VIDEO_V4L2=m
diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend
index 99c9581b2..bfb0d323d 100755..100644
--- a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend
+++ b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -3,3 +3,11 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
# Extra configuration options for the QEMU kernel
SRC_URI += "file://hciattach.cfg \
"
+
+# Enable some things on qemuarm64 so MOST drivers will build and load.
+SRC_URI_append_qemuarm64 = " file://most_deps.cfg"
+
+# Build a generic v7 kernel instead of the arm926j one that upstream
+# qemuarm defaults to.
+KBUILD_DEFCONFIG_qemuarm = "multi_v7_defconfig"
+KCONFIG_MODE = "--alldefconfig"
diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_4.12.bbappend b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_4.12.bbappend
index 7464138aa..124a1f43b 100755
--- a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_4.12.bbappend
@@ -1,3 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
-SRC_URI_append = "file://0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch"
+SRC_URI_append = " file://0001-NFC-pn533-don-t-send-USB-data-off-of-the-stack.patch"
diff --git a/templates/machine/qemuarm/50_local.conf.inc b/templates/machine/qemuarm/50_local.conf.inc
new file mode 100644
index 000000000..84204fb8c
--- /dev/null
+++ b/templates/machine/qemuarm/50_local.conf.inc
@@ -0,0 +1,3 @@
+MACHINE = "qemuarm"
+#see meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc
+require conf/include/agl_qemuarm.inc
diff --git a/templates/machine/qemuarm64/50_local.conf.inc b/templates/machine/qemuarm64/50_local.conf.inc
new file mode 100644
index 000000000..65605b530
--- /dev/null
+++ b/templates/machine/qemuarm64/50_local.conf.inc
@@ -0,0 +1,3 @@
+MACHINE = "qemuarm64"
+#see meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc
+require conf/include/agl_qemuarm64.inc