From bcedb3e69a033de01480474c2f0425177b39c51a Mon Sep 17 00:00:00 2001 From: Enrico Jorns Date: Thu, 16 Feb 2023 15:08:20 +0100 Subject: [PATCH 1/7] raspberrypi: linux-raspberrypi: adapt to recommended minimal settings Taken from https://rauc.readthedocs.io/en/latest/integration.html#kernel-configuration Do not manually set squashfs options that only reflect defaults. Also enforcing single-threaded squashfs decompression might unnecessary slow things down. Signed-off-by: Enrico Jorns --- .../recipes-kernel/linux/files/rauc.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-rauc-raspberrypi/recipes-kernel/linux/files/rauc.cfg b/meta-rauc-raspberrypi/recipes-kernel/linux/files/rauc.cfg index e4723bc..7bcd88a 100644 --- a/meta-rauc-raspberrypi/recipes-kernel/linux/files/rauc.cfg +++ b/meta-rauc-raspberrypi/recipes-kernel/linux/files/rauc.cfg @@ -1,6 +1,6 @@ -CONFIG_SQUASHFS=y +CONFIG_MD=y +CONFIG_BLK_DEV_DM=y CONFIG_BLK_DEV_LOOP=y -CONFIG_SQUASHFS_FILE_CACHE=y -CONFIG_SQUASHFS_DECOMP_SINGLE=y -CONFIG_SQUASHFS_ZLIB=y -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +CONFIG_DM_VERITY=y +CONFIG_SQUASHFS=y +CONFIG_CRYPTO_SHA256=y From 4ade4faadc014bfe51acc5fb2dd64b4480377a9c Mon Sep 17 00:00:00 2001 From: Enrico Jorns Date: Thu, 16 Feb 2023 15:12:03 +0100 Subject: [PATCH 2/7] raspberrypi: update-bundle: default to 'verity' bundle format The legacy 'plain' format should not be used for new setups. Signed-off-by: Enrico Jorns --- meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb b/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb index 498b948..d0d2515 100644 --- a/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb +++ b/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb @@ -5,6 +5,9 @@ inherit bundle RAUC_BUNDLE_COMPATIBLE = "RaspberryPi4" RAUC_BUNDLE_VERSION = "v20200703" RAUC_BUNDLE_DESCRIPTION = "RAUC Demo Bundle" + +RAUC_BUNDLE_FORMAT = "verity" + RAUC_BUNDLE_SLOTS = "rootfs" RAUC_SLOT_rootfs = "core-image-minimal" RAUC_SLOT_rootfs[fstype] = "ext4" From 36725c9d76139d59390129e13455ca78411e89ba Mon Sep 17 00:00:00 2001 From: Enrico Jorns Date: Thu, 16 Feb 2023 15:33:25 +0100 Subject: [PATCH 3/7] raspberrypi: linux-raspberrypi: enable NBD for bundle streaming RAUC uses NBD internally for its streaming helper process. Signed-off-by: Enrico Jorns --- meta-rauc-raspberrypi/recipes-kernel/linux/files/rauc.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-rauc-raspberrypi/recipes-kernel/linux/files/rauc.cfg b/meta-rauc-raspberrypi/recipes-kernel/linux/files/rauc.cfg index 7bcd88a..16b46c2 100644 --- a/meta-rauc-raspberrypi/recipes-kernel/linux/files/rauc.cfg +++ b/meta-rauc-raspberrypi/recipes-kernel/linux/files/rauc.cfg @@ -4,3 +4,5 @@ CONFIG_BLK_DEV_LOOP=y CONFIG_DM_VERITY=y CONFIG_SQUASHFS=y CONFIG_CRYPTO_SHA256=y +# For bundle streaming +CONFIG_BLK_DEV_NBD=y From 1625dbd9d07c26f930d09f3fa3a966f76d5c185e Mon Sep 17 00:00:00 2001 From: Enrico Jorns Date: Fri, 1 Sep 2023 10:55:56 +0200 Subject: [PATCH 4/7] raspberrypi: README.rst: fix name of bundle recipe Signed-off-by: Enrico Jorns --- meta-rauc-raspberrypi/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-rauc-raspberrypi/README.rst b/meta-rauc-raspberrypi/README.rst index 45528d7..3590c79 100644 --- a/meta-rauc-raspberrypi/README.rst +++ b/meta-rauc-raspberrypi/README.rst @@ -96,7 +96,7 @@ IV. Build and Install The Demo Bundle To build the bundle, run:: - $ bitbake qemu-demo-bundle + $ bitbake update-bundle Copy the generated bundle to the target system via nc, scp or an attached USB stick. From 4409a8c7d4973a5682d9ecf01a553783f8ca7628 Mon Sep 17 00:00:00 2001 From: Drew Moseley Date: Sun, 17 Mar 2024 19:11:46 -0400 Subject: [PATCH 5/7] rpi: Auto grow the actual /home partition. With the current service, only the extended partition is expanded to fill the space. This also extends partition 6 which is the current /home and the last partition on the disk. Signed-off-by: Drew Moseley --- .../recipes-core/rauc/files/rauc-grow-data-partition.service | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-rauc-raspberrypi/recipes-core/rauc/files/rauc-grow-data-partition.service b/meta-rauc-raspberrypi/recipes-core/rauc/files/rauc-grow-data-partition.service index bcba29b..55be868 100644 --- a/meta-rauc-raspberrypi/recipes-core/rauc/files/rauc-grow-data-partition.service +++ b/meta-rauc-raspberrypi/recipes-core/rauc/files/rauc-grow-data-partition.service @@ -7,6 +7,7 @@ Before=home.mount Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/parted --script /dev/mmcblk0 resizepart 4 100% +ExecStart=/usr/sbin/parted --script /dev/mmcblk0 resizepart 6 100% [Install] WantedBy=home.mount From b9b58238789dad8152490089b3bc9c0736016369 Mon Sep 17 00:00:00 2001 From: Dan Walkes Date: Sat, 23 Mar 2024 21:50:11 -0600 Subject: [PATCH 6/7] raspberrypi: use MACHINE variable Instead of hard-coding RaspberryPi4, use a MACHINE variable in the update bundle and system.conf to support builds of other RPi platforms and avoiding a mismatch of configs. Signed-off-by: Dan Walkes --- meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb | 2 +- meta-rauc-raspberrypi/recipes-core/rauc/files/system.conf | 2 +- meta-rauc-raspberrypi/recipes-core/rauc/rauc_%.bbappend | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb b/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb index d0d2515..c4f14a2 100644 --- a/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb +++ b/meta-rauc-raspberrypi/recipes-core/bundles/update-bundle.bb @@ -2,7 +2,7 @@ DESCRIPTION = "RAUC bundle generator" inherit bundle -RAUC_BUNDLE_COMPATIBLE = "RaspberryPi4" +RAUC_BUNDLE_COMPATIBLE = "${MACHINE}" RAUC_BUNDLE_VERSION = "v20200703" RAUC_BUNDLE_DESCRIPTION = "RAUC Demo Bundle" diff --git a/meta-rauc-raspberrypi/recipes-core/rauc/files/system.conf b/meta-rauc-raspberrypi/recipes-core/rauc/files/system.conf index 36dac55..bd8568b 100644 --- a/meta-rauc-raspberrypi/recipes-core/rauc/files/system.conf +++ b/meta-rauc-raspberrypi/recipes-core/rauc/files/system.conf @@ -1,5 +1,5 @@ [system] -compatible=RaspberryPi4 +compatible=@@MACHINE@@ bootloader=uboot data-directory=/data/ diff --git a/meta-rauc-raspberrypi/recipes-core/rauc/rauc_%.bbappend b/meta-rauc-raspberrypi/recipes-core/rauc/rauc_%.bbappend index 61514c2..0193527 100644 --- a/meta-rauc-raspberrypi/recipes-core/rauc/rauc_%.bbappend +++ b/meta-rauc-raspberrypi/recipes-core/rauc/rauc_%.bbappend @@ -17,6 +17,10 @@ PACKAGES += "rauc-grow-data-part" RDEPENDS:${PN}-grow-data-part += "parted" +do_install:prepend() { + sed -i "s|@@MACHINE@@|${MACHINE}|g" ${WORKDIR}/system.conf +} + do_install:append() { install -d ${D}${systemd_unitdir}/system/ install -m 0644 ${WORKDIR}/rauc-grow-data-partition.service ${D}${systemd_unitdir}/system/ From 34d0c66bff6a591a69ee34db3088bfdd4419a4f7 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Wed, 3 Apr 2024 08:54:01 +0300 Subject: [PATCH 7/7] meta-rauc-raspberrypi: Support Kirkstone Remove EOL release and support only release Kirkstone with branch Kirkstone of layer meta-rauc-raspberrypi. Use branch master with newer releases. Signed-off-by: Leon Anavi --- meta-rauc-raspberrypi/conf/layer.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-rauc-raspberrypi/conf/layer.conf b/meta-rauc-raspberrypi/conf/layer.conf index e9e823a..142caf4 100644 --- a/meta-rauc-raspberrypi/conf/layer.conf +++ b/meta-rauc-raspberrypi/conf/layer.conf @@ -10,4 +10,4 @@ BBFILE_PATTERN_meta-rauc-raspberrypi = "^${LAYERDIR}/" BBFILE_PRIORITY_meta-rauc-raspberrypi = "6" LAYERDEPENDS_meta-rauc-raspberrypi = "core rauc raspberrypi" -LAYERSERIES_COMPAT_meta-rauc-raspberrypi = "dunfell gatesgarth hardknott honister kirkstone" +LAYERSERIES_COMPAT_meta-rauc-raspberrypi = "kirkstone"