meta-agl-lxc: add initial rcar3 support 33/26433/1
authorScott Murray <scott.murray@konsulko.com>
Mon, 14 Jun 2021 23:38:23 +0000 (19:38 -0400)
committerScott Murray <scott.murray@konsulko.com>
Mon, 14 Jun 2021 23:38:23 +0000 (19:38 -0400)
Note that these changes do allow building and booting the
lxc-host-image-demo image, and the cluster-demo container does
get autostarted, but currently Weston fails to start in the
container.

Changes:
- Add a meta-rcar-gen3 dynamic layer with some bbappends to
  disable problematic kernel module dependencies when building for
  the container guest configuration.  The ones used are based on
  the ones in the IC EG container-bsp github repo, but fewer are
  needed due to the use of linux-dummy, and the changes are done
  via aglcontainerguest overrides.
- Add linux-renesas bbappend that disables the problematic default
  addition of virtio.scc to KERNEL_FEATURES done in the
  meta-virtualization layer, which currently is dependent on the
  file coming from the linux-yocto kernel metadata, which is not
  the case with linux-renesas.  Upstream have been engaged on this
  being a problem, so this may not be required in the future.
- Add lxc.scc to KERNEL_FEATURES in linux-renesas bbappend to
  leverage the .cfg from meta-virtualization.
- Borrow a couple of tweaks from the IC EG container-bsp github
  repo to disable firmware and disable the serial consoles in the
  container guest build.

Bug-AGL: SPEC-3953

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I30fe6a940c5c44ee2ad71410a97a4495829c0b45

meta-agl-lxc/conf/layer.conf
meta-agl-lxc/conf/multiconfig/agl-container-guest.conf
meta-agl-lxc/dynamic-layers/meta-rcar-gen3/recipes-connectivity/openssl/openssl_1.1.%.bbappend [new file with mode: 0644]
meta-agl-lxc/dynamic-layers/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend [new file with mode: 0644]
meta-agl-lxc/dynamic-layers/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend [new file with mode: 0644]

index 4030d6e..64db95a 100644 (file)
@@ -8,4 +8,10 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
 BBFILE_COLLECTIONS += "aglcontainermc"
 BBFILE_PATTERN_aglcontainermc = "^${LAYERDIR}/"
 BBFILE_PRIORITY_aglcontainermc = "100"
+
+BBFILES_DYNAMIC += " \
+    rcar-gen3:${LAYERDIR}/dynamic-layers/meta-rcar-gen3/*/*/*.bb \
+    rcar-gen3:${LAYERDIR}/dynamic-layers/meta-rcar-gen3/*/*/*.bbappend \
+"
+
 LAYERSERIES_COMPAT_aglcontainermc = "dunfell"
index d7b85ee..1e2e932 100644 (file)
@@ -10,7 +10,14 @@ IMAGE_FSTYPES_aglcontainerguest = "container"
 
 IMAGE_LINGUAS_append_aglcontainerguest = " en-us"
 
-PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
+PREFERRED_PROVIDER_virtual/kernel_aglcontainerguest = "linux-dummy"
+KERNEL_DEVICETREE_aglcontainerguest = ""
+
+# Disable serial consoles
+SERIAL_CONSOLES_aglcontainerguest = ""
+
+# Remove unneeded firmware packages
+EXTRA_IMAGEDEPENDS_remove_aglcontainerguest = "arm-trusted-firmware optee-os u-boot"
 
 # We assume rngd is running on the host, so unnecessary in container
 VIRTUAL-RUNTIME_rngd = ""
diff --git a/meta-agl-lxc/dynamic-layers/meta-rcar-gen3/recipes-connectivity/openssl/openssl_1.1.%.bbappend b/meta-agl-lxc/dynamic-layers/meta-rcar-gen3/recipes-connectivity/openssl/openssl_1.1.%.bbappend
new file mode 100644 (file)
index 0000000..e30136f
--- /dev/null
@@ -0,0 +1,4 @@
+# Add a hook to disable depending on cryptodev-module for containers
+CRYPTODEV_RDEPENDS = "cryptodev-module"
+CRYPTODEV_RDEPENDS_aglcontainerguest = ""
+PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,${CRYPTODEV_RDEPENDS}"
diff --git a/meta-agl-lxc/dynamic-layers/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend b/meta-agl-lxc/dynamic-layers/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend
new file mode 100644 (file)
index 0000000..41cdea3
--- /dev/null
@@ -0,0 +1 @@
+RDEPENDS_${PN}_remove_aglcontainerguest = "kernel-module-gles"
diff --git a/meta-agl-lxc/dynamic-layers/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl-lxc/dynamic-layers/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend
new file mode 100644 (file)
index 0000000..0eae3d3
--- /dev/null
@@ -0,0 +1,8 @@
+# Enable LXC support
+KERNEL_FEATURES += "lxc.scc"
+
+# Workaround cfg/virtio.scc issue in meta-virtualization for now.
+# If it's addition is made not unconditional or the file is made
+# available in meta-virtualization as opposed to yocto-kernel-cache,
+# this can be revisited.
+KERNEL_FEATURES_remove = "cfg/virtio.scc"