From f4865e11716fb6dfd34f19e36f24a49418f34536 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Tue, 15 Apr 2025 17:11:27 +0300 Subject: [PATCH 1/4] meta-rauc-community: Add common features Add meta-rauc-community layer to provide common features that can be reused across other layers for integrating various hardware platforms. Signed-off-by: Leon Anavi --- meta-rauc-community/conf/layer.conf | 17 +++++++++++++++++ .../udev/files/raspberrypi-rauc.rules | 3 +++ .../recipes-core/udev/udev-extraconf_%.bbappend | 6 ++++++ 3 files changed, 26 insertions(+) create mode 100644 meta-rauc-community/conf/layer.conf create mode 100644 meta-rauc-community/recipes-core/udev/files/raspberrypi-rauc.rules create mode 100644 meta-rauc-community/recipes-core/udev/udev-extraconf_%.bbappend diff --git a/meta-rauc-community/conf/layer.conf b/meta-rauc-community/conf/layer.conf new file mode 100644 index 0000000..09d1913 --- /dev/null +++ b/meta-rauc-community/conf/layer.conf @@ -0,0 +1,17 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-rauc-community" +BBFILE_PATTERN_meta-rauc-community = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-rauc-community = "6" + +LAYERDEPENDS_meta-rauc-community = "core rauc" +LAYERSERIES_COMPAT_meta-rauc-community = "styhead walnascar" + +RAUC_KEY_FILE ?= "${LAYERDIR}/../files/rauc-example-keys/development-1.key.pem" +RAUC_CERT_FILE ?= "${LAYERDIR}/../files/rauc-example-keys/development-1.cert.pem" +RAUC_KEYRING_FILE ?= "${LAYERDIR}/../files/rauc-example-keys/ca.cert.pem" diff --git a/meta-rauc-community/recipes-core/udev/files/raspberrypi-rauc.rules b/meta-rauc-community/recipes-core/udev/files/raspberrypi-rauc.rules new file mode 100644 index 0000000..6c1c08c --- /dev/null +++ b/meta-rauc-community/recipes-core/udev/files/raspberrypi-rauc.rules @@ -0,0 +1,3 @@ +/dev/mmcblk0p1 +/dev/mmcblk0p2 +/dev/mmcblk0p3 diff --git a/meta-rauc-community/recipes-core/udev/udev-extraconf_%.bbappend b/meta-rauc-community/recipes-core/udev/udev-extraconf_%.bbappend new file mode 100644 index 0000000..8914aee --- /dev/null +++ b/meta-rauc-community/recipes-core/udev/udev-extraconf_%.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" +SRC_URI:append = " file://rauc.rules" + +do_install:append:() { + install -m 0644 ${UNPACKDIR}/rauc.rules ${D}${sysconfdir}/udev/mount.ignorelist.d/ +} From 9e3fd09d0eca64ce409f25251bc22d77332127d1 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Tue, 15 Apr 2025 17:19:04 +0300 Subject: [PATCH 2/4] meta-rauc-raspberrypi: meta-rauc-community Add a layer dependency on meta-rauc-community. Remove the unified certificates and keys because RAUC_KEY_FILE, RAUC_CERT_FILE and RAUC_KEYRING_FILE are set in meta-rauc-community. Signed-off-by: Leon Anavi --- meta-rauc-raspberrypi/README.rst | 5 ++++- meta-rauc-raspberrypi/conf/layer.conf | 6 +----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/meta-rauc-raspberrypi/README.rst b/meta-rauc-raspberrypi/README.rst index b402da8..8fe3769 100644 --- a/meta-rauc-raspberrypi/README.rst +++ b/meta-rauc-raspberrypi/README.rst @@ -36,7 +36,10 @@ migratability between different layer revision. I. Adding the meta-rauc-raspberrypi layer to your build ======================================================= -Run 'bitbake-layers add-layer meta-rauc-raspberrypi' +Add meta-rauc-community and meta-rauc-raspberrypi:: + + bitbake-layers add-layer meta-rauc-community + bitbake-layers add-layer meta-rauc-raspberrypi II. Build The Demo System ========================= diff --git a/meta-rauc-raspberrypi/conf/layer.conf b/meta-rauc-raspberrypi/conf/layer.conf index 658e43d..62a035f 100644 --- a/meta-rauc-raspberrypi/conf/layer.conf +++ b/meta-rauc-raspberrypi/conf/layer.conf @@ -9,12 +9,8 @@ BBFILE_COLLECTIONS += "meta-rauc-raspberrypi" BBFILE_PATTERN_meta-rauc-raspberrypi = "^${LAYERDIR}/" BBFILE_PRIORITY_meta-rauc-raspberrypi = "6" -LAYERDEPENDS_meta-rauc-raspberrypi = "core rauc raspberrypi" +LAYERDEPENDS_meta-rauc-raspberrypi = "core raspberrypi rauc meta-rauc-community" # For u-boot support for raspberrypi5 # https://git.yoctoproject.org/meta-lts-mixins scarthgap/u-boot branch LAYERRECOMMENDS_meta-rauc-raspberrypi = "lts-u-boot-mixin" LAYERSERIES_COMPAT_meta-rauc-raspberrypi = "styhead walnascar" - -RAUC_KEY_FILE ?= "${LAYERDIR}/../files/rauc-example-keys/development-1.key.pem" -RAUC_CERT_FILE ?= "${LAYERDIR}/../files/rauc-example-keys/development-1.cert.pem" -RAUC_KEYRING_FILE ?= "${LAYERDIR}/../files/rauc-example-keys/ca.cert.pem" From 02c9d6019c443422201edd232cd76d310f5ef1d0 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Tue, 15 Apr 2025 17:24:04 +0300 Subject: [PATCH 3/4] meta-rauc-raspberrypi: udev-extraconf_%.bbappend Deploy a version of rauc.rules for all Raspberry Pi models and versions, and delegate the remaining functionality to meta-rauc-community layer. Signed-off-by: Leon Anavi --- .../udev/files/{raspberrypi-rauc.rules => rpi/rauc.rules} | 0 .../recipes-core/udev/udev-extraconf_%.bbappend | 7 +------ 2 files changed, 1 insertion(+), 6 deletions(-) rename meta-rauc-raspberrypi/recipes-core/udev/files/{raspberrypi-rauc.rules => rpi/rauc.rules} (100%) diff --git a/meta-rauc-raspberrypi/recipes-core/udev/files/raspberrypi-rauc.rules b/meta-rauc-raspberrypi/recipes-core/udev/files/rpi/rauc.rules similarity index 100% rename from meta-rauc-raspberrypi/recipes-core/udev/files/raspberrypi-rauc.rules rename to meta-rauc-raspberrypi/recipes-core/udev/files/rpi/rauc.rules diff --git a/meta-rauc-raspberrypi/recipes-core/udev/udev-extraconf_%.bbappend b/meta-rauc-raspberrypi/recipes-core/udev/udev-extraconf_%.bbappend index c8838f3..8802adb 100644 --- a/meta-rauc-raspberrypi/recipes-core/udev/udev-extraconf_%.bbappend +++ b/meta-rauc-raspberrypi/recipes-core/udev/udev-extraconf_%.bbappend @@ -1,6 +1 @@ -FILESEXTRAPATHS:prepend:rpi := "${THISDIR}/files:" -SRC_URI:append:rpi = " file://raspberrypi-rauc.rules" - -do_install:append:rpi() { - install -m 0644 ${UNPACKDIR}/raspberrypi-rauc.rules ${D}${sysconfdir}/udev/mount.ignorelist.d/ -} +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" From da9b3b3be7a71fcd0458b80e70cac1503a150b39 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Thu, 17 Apr 2025 18:12:12 +0300 Subject: [PATCH 4/4] meta-rauc-community: update-bundle.bb Move update-bundle.bb from meta-rauc-raspberrypi to the new sub-layer meta-rauc-community. Use core-image-base instead of core-image-minimal. This way in future we can use the same update bundle for all supported machines and reduce the source code in each integration sub-layer. Signed-off-by: Leon Anavi --- .../recipes-core/bundles/update-bundle.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {meta-rauc-raspberrypi => meta-rauc-community}/recipes-core/bundles/update-bundle.bb (75%) diff --git a/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb b/meta-rauc-community/recipes-core/bundles/update-bundle.bb similarity index 75% rename from meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb rename to meta-rauc-community/recipes-core/bundles/update-bundle.bb index fc5a551..4e8cca5 100644 --- a/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb +++ b/meta-rauc-community/recipes-core/bundles/update-bundle.bb @@ -3,11 +3,11 @@ DESCRIPTION = "RAUC bundle generator" inherit bundle RAUC_BUNDLE_COMPATIBLE = "${MACHINE}" -RAUC_BUNDLE_VERSION = "v20200703" +RAUC_BUNDLE_VERSION = "v20250417" RAUC_BUNDLE_DESCRIPTION = "RAUC Demo Bundle" RAUC_BUNDLE_FORMAT = "verity" RAUC_BUNDLE_SLOTS = "rootfs" -RAUC_SLOT_rootfs = "core-image-minimal" +RAUC_SLOT_rootfs = "core-image-base" RAUC_SLOT_rootfs[fstype] = "ext4"