aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-05-04 12:11:20 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-05-09 08:13:10 +0900
commit55d5b9a017f110c829585a57fa55763b15b9dd8d (patch)
tree7eda92664cc102482440eae46ed2b424c8968c04
parent0b5a1d19d6e458bdbf09e10e3384e92e9ddad76f (diff)
Add support integration type of multi partition
Existing AGL IC container integration was not supporting multi partition integration. This patch enable multi partition integration using wic. Bug-AGL: SPEC-4777 Change-Id: I8c926410177642953b3888751b774e71e924a074 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
-rw-r--r--meta-agl-ic-container/conf/multiconfig/agl-container-cluster.conf2
-rw-r--r--meta-agl-ic-container/conf/multiconfig/agl-container-ivi.conf2
-rw-r--r--meta-agl-ic-container/dynamic-layers/meta-rcar-gen3/recipes-platform/images/agl-instrument-cluster-container-demo.bbappend1
-rw-r--r--meta-agl-ic-container/recipes-platform/images/agl-instrument-cluster-container-demo.bb32
-rw-r--r--meta-agl-ic-container/recipes-platform/images/agl-lxc-install-single-image.inc19
-rw-r--r--meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc20
-rw-r--r--meta-agl-ic-container/recipes-platform/images/agl-lxc-multiconfig-build.inc16
-rw-r--r--meta-agl-ic-container/recipes-platform/images/guest-image-cluster-demo.bb5
-rw-r--r--meta-agl-ic-container/recipes-platform/images/guest-image-ivi-demo.bb7
-rw-r--r--meta-agl-ic-container/wic/agl-ic-container-noloader.wks11
10 files changed, 95 insertions, 20 deletions
diff --git a/meta-agl-ic-container/conf/multiconfig/agl-container-cluster.conf b/meta-agl-ic-container/conf/multiconfig/agl-container-cluster.conf
index 29272c78..ab0078a6 100644
--- a/meta-agl-ic-container/conf/multiconfig/agl-container-cluster.conf
+++ b/meta-agl-ic-container/conf/multiconfig/agl-container-cluster.conf
@@ -10,7 +10,7 @@ TMPDIR = "${TOPDIR}/tmp-${BB_CURRENT_MC}"
AGL_DEFAULT_IMAGE_FSTYPES = ""
AGL_EXTRA_IMAGE_FSTYPES = ""
-IMAGE_FSTYPES:aglcontainerguest = "container"
+IMAGE_FSTYPES:aglcontainerguest = "container ext4"
IMAGE_LINGUAS:append:aglcontainercluster = " en-us"
diff --git a/meta-agl-ic-container/conf/multiconfig/agl-container-ivi.conf b/meta-agl-ic-container/conf/multiconfig/agl-container-ivi.conf
index 4553e7a2..e969011a 100644
--- a/meta-agl-ic-container/conf/multiconfig/agl-container-ivi.conf
+++ b/meta-agl-ic-container/conf/multiconfig/agl-container-ivi.conf
@@ -10,7 +10,7 @@ TMPDIR = "${TOPDIR}/tmp-${BB_CURRENT_MC}"
AGL_DEFAULT_IMAGE_FSTYPES:aglcontainerivi = ""
AGL_EXTRA_IMAGE_FSTYPES:aglcontainerivi = ""
-IMAGE_FSTYPES:aglcontainerguest = "container"
+IMAGE_FSTYPES:aglcontainerguest = "container ext4"
IMAGE_LINGUAS:append:aglcontainerivi = " en-us"
diff --git a/meta-agl-ic-container/dynamic-layers/meta-rcar-gen3/recipes-platform/images/agl-instrument-cluster-container-demo.bbappend b/meta-agl-ic-container/dynamic-layers/meta-rcar-gen3/recipes-platform/images/agl-instrument-cluster-container-demo.bbappend
new file mode 100644
index 00000000..b037b19a
--- /dev/null
+++ b/meta-agl-ic-container/dynamic-layers/meta-rcar-gen3/recipes-platform/images/agl-instrument-cluster-container-demo.bbappend
@@ -0,0 +1 @@
+IMAGE_INSTALL:append:rcar-gen3 = " kernel-module-gles "
diff --git a/meta-agl-ic-container/recipes-platform/images/agl-instrument-cluster-container-demo.bb b/meta-agl-ic-container/recipes-platform/images/agl-instrument-cluster-container-demo.bb
new file mode 100644
index 00000000..bade2e3f
--- /dev/null
+++ b/meta-agl-ic-container/recipes-platform/images/agl-instrument-cluster-container-demo.bb
@@ -0,0 +1,32 @@
+SUMMARY = "AGL Instrument Cluster Cotainer Integration demo image"
+LICENSE = "MIT"
+
+require lxc-host-image-minimal.bb
+require recipes-platform/images/agl-lxc-multi-partition-image.inc
+
+CONTAINER_IMAGES ?= "agl-container-cluster:guest-image-cluster-demo \
+ agl-container-ivi:guest-image-ivi-demo \
+ "
+
+IMAGE_INSTALL += " \
+ kernel-modules \
+ alsa-utils \
+ packagegroup-pipewire \
+ pipewire-ic-ipc \
+ wireplumber-config-agl \
+"
+
+# packages required for network bridge settings via lxc-net
+IMAGE_INSTALL += " \
+ lxc-networking \
+ iptables-modules \
+ dnsmasq \
+ systemd-netif-config \
+ kernel-module-xt-addrtype \
+ kernel-module-xt-multiport \
+"
+
+# network manager to use
+VIRTUAL-RUNTIME_net_manager = "systemd"
+
+WKS_FILES:prepend = "agl-ic-container-noloader.wks "
diff --git a/meta-agl-ic-container/recipes-platform/images/agl-lxc-install-single-image.inc b/meta-agl-ic-container/recipes-platform/images/agl-lxc-install-single-image.inc
index de2ea5ca..49b7bc8e 100644
--- a/meta-agl-ic-container/recipes-platform/images/agl-lxc-install-single-image.inc
+++ b/meta-agl-ic-container/recipes-platform/images/agl-lxc-install-single-image.inc
@@ -1,15 +1,10 @@
# Integration type support for install guest root filesystem into host image.
+require recipes-platform/images/agl-lxc-multiconfig-build.inc
+
# Handle modification of IMAGE_LINK_NAME done by ULCB builds with Kingfisher support
MACHINE_SUFFIX = "${@bb.utils.contains('AGL_FEATURES', 'kingfisher', '-kf', '', d)}"
-python __anonymous() {
- for c in (d.getVar('CONTAINER_IMAGES') or "").split():
- (mc, image) = c.split(':')
- dependency = 'mc::' + mc + ':' + image + ':do_image_complete'
- d.appendVarFlag('do_rootfs', 'mcdepends', ' ' + dependency)
-}
-
install_container_images() {
for c in ${CONTAINER_IMAGES}; do
config=${c%:*}
@@ -23,14 +18,4 @@ install_container_images() {
done
}
-#
-# Force rebuild of rootfs on every build to work around mcdepends issue
-#
-# NOTE:
-# This is currently required as bitbake fails to trigger do_rootfs
-# sometimes even when the guest image has in fact rebuilt. This is
-# being investigated with upstream.
-#
-do_rootfs[nostamp] = "1"
-
ROOTFS_POSTPROCESS_COMMAND += "install_container_images; "
diff --git a/meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc b/meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc
new file mode 100644
index 00000000..bd85e70e
--- /dev/null
+++ b/meta-agl-ic-container/recipes-platform/images/agl-lxc-multi-partition-image.inc
@@ -0,0 +1,20 @@
+# Integration type support for multi partition with host and guest image.
+
+require recipes-platform/images/agl-lxc-multiconfig-build.inc
+
+# Handle modification of IMAGE_LINK_NAME done by ULCB builds with Kingfisher support
+MACHINE_SUFFIX = "${@bb.utils.contains('AGL_FEATURES', 'kingfisher', '-kf', '', d)}"
+
+install_container_images() {
+ for c in ${CONTAINER_IMAGES}; do
+ config=${c%:*}
+ image=${c#*:}
+ name=${image#guest-image-}
+ rm -f "${DEPLOY_DIR_IMAGE}/${image}.ext4"
+ src="${TOPDIR}/tmp-${config}/deploy/images/${MACHINE}/${image}-${MACHINE}${MACHINE_SUFFIX}.ext4"
+ bbnote "Installing ${src}"
+ ln -s ${src} "${DEPLOY_DIR_IMAGE}/${image}.ext4"
+ done
+}
+
+ROOTFS_POSTPROCESS_COMMAND += "install_container_images; "
diff --git a/meta-agl-ic-container/recipes-platform/images/agl-lxc-multiconfig-build.inc b/meta-agl-ic-container/recipes-platform/images/agl-lxc-multiconfig-build.inc
new file mode 100644
index 00000000..73ec163f
--- /dev/null
+++ b/meta-agl-ic-container/recipes-platform/images/agl-lxc-multiconfig-build.inc
@@ -0,0 +1,16 @@
+python __anonymous() {
+ for c in (d.getVar('CONTAINER_IMAGES') or "").split():
+ (mc, image) = c.split(':')
+ dependency = 'mc::' + mc + ':' + image + ':do_image_complete'
+ d.appendVarFlag('do_rootfs', 'mcdepends', ' ' + dependency)
+}
+
+#
+# Force rebuild of rootfs on every build to work around mcdepends issue
+#
+# NOTE:
+# This is currently required as bitbake fails to trigger do_rootfs
+# sometimes even when the guest image has in fact rebuilt. This is
+# being investigated with upstream.
+#
+do_rootfs[nostamp] = "1"
diff --git a/meta-agl-ic-container/recipes-platform/images/guest-image-cluster-demo.bb b/meta-agl-ic-container/recipes-platform/images/guest-image-cluster-demo.bb
index 1476d7ab..8cf15287 100644
--- a/meta-agl-ic-container/recipes-platform/images/guest-image-cluster-demo.bb
+++ b/meta-agl-ic-container/recipes-platform/images/guest-image-cluster-demo.bb
@@ -10,3 +10,8 @@ IMAGE_INSTALL += " \
cluster-refgui \
pipewire-ic-ipc \
"
+
+IMAGE_OVERHEAD_FACTOR = "0"
+EXTRA_IMAGECMD:append = " -L agl-cluster"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+IMAGE_ROOTFS_SIZE = "1048576"
diff --git a/meta-agl-ic-container/recipes-platform/images/guest-image-ivi-demo.bb b/meta-agl-ic-container/recipes-platform/images/guest-image-ivi-demo.bb
index 22a59114..fe5928b7 100644
--- a/meta-agl-ic-container/recipes-platform/images/guest-image-ivi-demo.bb
+++ b/meta-agl-ic-container/recipes-platform/images/guest-image-ivi-demo.bb
@@ -27,4 +27,9 @@ IMAGE_INSTALL += " \
wireplumber \
packagegroup-pipewire-base \
wireplumber-policy-config-agl \
-" \ No newline at end of file
+"
+
+IMAGE_OVERHEAD_FACTOR = "0"
+EXTRA_IMAGECMD:append = " -L agl-momi-ivi"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+IMAGE_ROOTFS_SIZE = "1048576"
diff --git a/meta-agl-ic-container/wic/agl-ic-container-noloader.wks b/meta-agl-ic-container/wic/agl-ic-container-noloader.wks
new file mode 100644
index 00000000..4af949a0
--- /dev/null
+++ b/meta-agl-ic-container/wic/agl-ic-container-noloader.wks
@@ -0,0 +1,11 @@
+# short-description: Single partition rootfs with UUID and no bootloader
+# long-description: Creates a partitioned image with a single partition in
+# use and does not contain a bootloader.
+
+bootloader --ptable gpt
+part / --source rootfs --fstype=ext4 --label host --align 4096 --size 1024
+part --source rawcopy --sourceparams="file=guest-image-cluster-demo.ext4"
+part --source rawcopy --sourceparams="file=guest-image-ivi-demo.ext4"
+part --fstype=ext4 --label agl-qt-ivi --align 4096 --size 3072
+part --fstype=ext4 --label agl-flutter-ivi --align 4096 --size 3072
+part --fstype=ext4 --label agl-html5-ivi --align 4096 --size 3072