1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-12 03:10:15 +00:00

arm-autonomy: Create arm-autonomy-host feature

Create a new distribution feature to enable functionalities for autonomy
host systems:
- enable xen and ipv4 in distribution features
- enable xen backend drivers in Linux kernel using a kmeta feature

For the feature to work properly, create a class inherited when the
layer is included to enable required parameters

Change-Id: Ia0cdaa2b69bc030515ea16d67c47fec6b1ea0897
Issue-Id: SCM-767
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Bertrand Marquis
2020-03-27 10:50:05 +00:00
committed by Jon Mason
parent c1a093a4d4
commit 780adc19c3
8 changed files with 75 additions and 0 deletions

View File

@@ -18,6 +18,11 @@ Distribution Features
---------------------
This layer is adding the following Yocto DISTRO_FEATURES:
* arm-autonomy-host: this feature activates functionalities required to build
an autonomy host system. It is doing the following:
- add 'xen' and 'ipv4' to DISTRO_FEATURES.
- add xen backend drivers to linux kernel configuration.
Bitbake variables
-----------------
Some recipes and classes in this layer are introducing variables which can be

View File

@@ -0,0 +1,4 @@
# Include arm-autonomy distro config files if the distro features are set
require ${@bb.utils.contains('DISTRO_FEATURES', 'arm-autonomy-host', '${ARM_AUTONOMY_DISTRO_CFGDIR}/arm-autonomy-host.inc', '', d)}

View File

@@ -0,0 +1,5 @@
# This files is added when DISTRO_FEATURES contains arm-autonomy-host
# We need to have xen and ipv4 activated
DISTRO_FEATURES_append = " xen ipv4"

View File

@@ -23,3 +23,9 @@ LAYERSERIES_COMPAT_meta-arm-autonomy = "zeus"
# otherwise the user will see a warning on each build.
SKIP_META_VIRT_SANITY_CHECK = "1"
# Directory of our distro config files
ARM_AUTONOMY_DISTRO_CFGDIR = "${LAYERDIR}/conf/distro/include/"
# Add class to handle arm-autonomy distro extensions
USER_CLASSES_append = " arm-autonomy-features"

View File

@@ -0,0 +1,35 @@
CONFIG_PARAVIRT=y
CONFIG_XEN=y
CONFIG_BLOCK=y
CONFIG_XEN_BLKDEV_BACKEND=y
CONFIG_SCSI=y
CONFIG_TARGET_CORE=y
CONFIG_XEN_SCSI_BACKEND=y
CONFIG_NET=y
CONFIG_XEN_NETDEV_BACKEND=y
CONFIG_HVC_IRQ=y
CONFIG_HVC_XEN=y
CONFIG_WATCHDOG=y
CONFIG_XEN_WDT=y
CONFIG_XEN_BALLOON=y
CONFIG_XEN_DEV_EVTCHN=y
CONFIG_XENFS=y
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_GNTDEV=y
CONFIG_XEN_GRANT_DEV_ALLOC=y
CONFIG_SWIOTLB_XEN=y
CONFIG_XEN_EFI=y
CONFIG_XEN_AUTO_XLATE=y

View File

@@ -0,0 +1,4 @@
define KFEATURE_DESCRIPTION "Enable XEN Host Drivers on autonomy systems"
kconf non-hardware xen-host.cfg

View File

@@ -0,0 +1,3 @@
# Add arm-autonomy kernel support
require linux-arm-autonomy.inc

View File

@@ -0,0 +1,13 @@
# Add arm-autonomy specific features to the kernel
FILESEXTRAPATHS_prepend := "${THISDIR}:"
#
# arm-autonomy kmeta
#
SRC_URI_append = " file://arm-autonomy-kmeta;type=kmeta;name=arm-autonomy-kmeta;destsuffix=arm-autonomy-kmeta"
# Add xen host drivers to kernel if arm-autonomy-host is activated
KERNEL_FEATURES += "${@bb.utils.contains('DISTRO_FEATURES', \
'arm-autonomy-host', 'features/arm-autonomy/xen-host.scc', '', d)}"