aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-05-03 14:22:51 -0400
committerScott Murray <scott.murray@konsulko.com>2022-05-06 11:39:01 +0000
commit4f5cf5dc8de803407fa9d3ffa13994309edde985 (patch)
treef00561c7bcf8677f95f65f6206dd3c705275401f
parent080086bc5062a1eb025b82051884aaa508f50408 (diff)
Enable usrmerge
An increasing number of advanced systemd features with respect to immutable systems and sandboxing are effectively dependent on the usrmerge distro feature, so it seems reasonable to enable it since upstream AGL currently requires systemd usage. See SPEC-4352 for more detailed discussion of rationale. Changes: - Add usrmerge to AGL_DEFAULT_DISTRO_FEATURES in poky-agl.conf. - Add workarounds via bbappends in meta-agl-bsp for the assumption of using /lib instead of ${nonarch_base_libdir} in various meta-rcar-gen3 kernel module recipes. This will be followed up with upstream to hopefully fix the recipes. - Replaced some explicit /sbin usage with ${sbindir} in the initramfs-netboot recipe used by the agl-netboot feature to avoid packaging errors. Bug-AGL: SPEC-4352 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ibc0ae1e2628aca6474401e0852bbb97085f4ecfa Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/27437 Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend9
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend15
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend9
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend9
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bbappend9
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bbappend14
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bbappend8
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend15
-rw-r--r--meta-agl-core/conf/distro/poky-agl.conf2
-rw-r--r--meta-netboot/recipes-core/initramfs-netboot/initramfs-netboot_1.0.bb6
10 files changed, 91 insertions, 5 deletions
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend
index 66b9c46ed..bd7fdf207 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend
@@ -3,5 +3,12 @@ require checksum_control.inc
RDEPENDS:${PN}:append = " wayland-wsegl"
do_install:append(){
- sed -i 's/GROUP="video"/GROUP="display"/g' ${D}${sysconfdir}/udev/rules.d/72-pvr-seat.rules
+ sed -i 's/GROUP="video"/GROUP="display"/g' ${D}${sysconfdir}/udev/rules.d/72-pvr-seat.rules
+
+ # Work around upstream not using ${nonarch_base_libdir}/firmware
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
+ install -d ${D}${nonarch_base_libdir}/
+ mv ${D}/lib/firmware ${D}${nonarch_base_libdir}/
+ rm -rf ${D}/lib
+ fi
}
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend
index b8882ae49..6b9768394 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend
@@ -4,3 +4,18 @@ module_do_compile:prepend() {
cd ${S}/build/linux/config/compilers
cp aarch64-linux-gnu.mk ${TARGET_SYS}.mk
}
+
+do_install:append() {
+ # Work around upstream not using ${nonarch_base_libdir}/modules
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
+ install -d ${D}${nonarch_base_libdir}/
+ mv ${D}/lib/modules ${D}${nonarch_base_libdir}/
+ rm -rf ${D}/lib
+ fi
+}
+
+# Required to guarantee the module goes into the expected
+# kernel-module-gles package and doesn't end up packaged in
+# kernel-module-pvrsvkm by the default behavior. Can be removed
+# if upstream correctly use ${nonarch_base_libdir} themselves.
+FILES:${PN} += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/extra/pvrsrvkm.ko"
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend
index 98b8e92c3..6e4b9a024 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend
@@ -1,2 +1,11 @@
KERNEL_MODULE_AUTOLOAD:append = " mmngr"
KERNEL_MODULE_PACKAGE_SUFFIX = ""
+
+do_install:append() {
+ # Work around upstream not using ${nonarch_base_libdir}/modules
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
+ install -d ${D}${nonarch_base_libdir}/
+ mv ${D}/lib/modules ${D}${nonarch_base_libdir}/
+ rm -rf ${D}/lib
+ fi
+}
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend
index fbff56fff..d190595a7 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend
@@ -1,2 +1,11 @@
KERNEL_MODULE_AUTOLOAD:append = " mmngrbuf"
KERNEL_MODULE_PACKAGE_SUFFIX = ""
+
+do_install:append() {
+ # Work around upstream not using ${nonarch_base_libdir}/modules
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
+ install -d ${D}${nonarch_base_libdir}/
+ mv ${D}/lib/modules ${D}${nonarch_base_libdir}/
+ rm -rf ${D}/lib
+ fi
+}
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bbappend
index 1fa00a859..a0ffc20ce 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bbappend
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bbappend
@@ -1,3 +1,12 @@
require checksum_control.inc
KERNEL_MODULE_AUTOLOAD = "uvcs_drv"
+
+do_install:append() {
+ # Work around upstream not using ${nonarch_base_libdir}/modules
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
+ install -d ${D}${nonarch_base_libdir}/
+ mv ${D}/lib/modules ${D}${nonarch_base_libdir}/
+ rm -rf ${D}/lib
+ fi
+}
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bbappend
new file mode 100644
index 000000000..f6a756d04
--- /dev/null
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vsp2driver/kernel-module-vsp2driver.bbappend
@@ -0,0 +1,14 @@
+do_install:append() {
+ # Work around upstream not using ${nonarch_base_libdir}/modules
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
+ install -d ${D}${nonarch_base_libdir}/
+ mv ${D}/lib/modules ${D}${nonarch_base_libdir}/
+ rm -rf ${D}/lib
+ fi
+}
+
+# Required to guarantee the module goes into the expected
+# kernel-module-vsp2driver package and doesn't end up packaged in
+# kernel-module-vsp2 by the default behavior. Can be removed if
+# upstream correctly use ${nonarch_base_libdir} themselves.
+FILES:${PN} += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/extra/vsp2.ko"
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bbappend
new file mode 100644
index 000000000..aebf44cc4
--- /dev/null
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspm/kernel-module-vspm.bbappend
@@ -0,0 +1,8 @@
+do_install:append() {
+ # Work around upstream not using ${nonarch_base_libdir}/modules
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
+ install -d ${D}${nonarch_base_libdir}/
+ mv ${D}/lib/modules ${D}${nonarch_base_libdir}/
+ rm -rf ${D}/lib
+ fi
+}
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend
index 5efe01045..214b67c0b 100644
--- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend
@@ -1,2 +1,17 @@
KERNEL_MODULE_AUTOLOAD:append = " vspm_if"
KERNEL_MODULE_PACKAGE_SUFFIX = ""
+
+do_install:append() {
+ # Work around upstream not using ${nonarch_base_libdir}/modules
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
+ install -d ${D}${nonarch_base_libdir}/
+ mv ${D}/lib/modules ${D}${nonarch_base_libdir}/
+ rm -rf ${D}/lib
+ fi
+}
+
+# Required to guarantee the module goes into the expected
+# kernel-module-vspmif package and doesn't end up packaged in
+# kernel-module-vspm-if by the default behavior. Can be removed if
+# upstream correctly use ${nonarch_base_libdir} themselves.
+FILES:${PN} += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/extra/vspm_if.ko"
diff --git a/meta-agl-core/conf/distro/poky-agl.conf b/meta-agl-core/conf/distro/poky-agl.conf
index 94bd4ccd5..e13ce6f04 100644
--- a/meta-agl-core/conf/distro/poky-agl.conf
+++ b/meta-agl-core/conf/distro/poky-agl.conf
@@ -46,7 +46,7 @@ MAINTAINER = "AGL https://lists.automotivelinux.org/g/agl-dev-community"
TARGET_VENDOR = "-agl"
# Override these in poky based distros
-AGL_DEFAULT_DISTRO_FEATURES = "largefile opengl wayland pam bluetooth bluez5 3g polkit"
+AGL_DEFAULT_DISTRO_FEATURES = "usrmerge largefile opengl wayland pam bluetooth bluez5 3g polkit"
POKY_DEFAULT_DISTRO_FEATURES := "${AGL_DEFAULT_DISTRO_FEATURES}"
OVERRIDES .= ":${DISTRO_CODENAME}"
diff --git a/meta-netboot/recipes-core/initramfs-netboot/initramfs-netboot_1.0.bb b/meta-netboot/recipes-core/initramfs-netboot/initramfs-netboot_1.0.bb
index 264b21492..1e3ae7f76 100644
--- a/meta-netboot/recipes-core/initramfs-netboot/initramfs-netboot_1.0.bb
+++ b/meta-netboot/recipes-core/initramfs-netboot/initramfs-netboot_1.0.bb
@@ -11,11 +11,11 @@ do_install() {
install -dm 0755 ${D}/etc
touch ${D}/etc/initrd-release
install -dm 0755 ${D}/dev
- install -dm 0755 ${D}/sbin
- install -m 0755 ${WORKDIR}/init.sh ${D}/sbin/init
+ install -dm 0755 ${D}${sbindir}
+ install -m 0755 ${WORKDIR}/init.sh ${D}${sbindir}/init
}
inherit allarch
-FILES:${PN} += " /dev /etc/initrd-release /sbin/init "
+FILES:${PN} += " /dev /etc/initrd-release ${sbindir}/init "