Giter Site home page Giter Site logo

meta-rauc's Introduction

RAUC logo

RAUC - Robust Auto-Update Controller

LGPLv2.1 CI_branch Codecov_branch Coverity codeql OSS-Fuzz Documentation Matrix CII Best Practices Repology

Packaging status

RAUC controls the update process on embedded Linux systems. It is both a target application that runs as an update client and a host/target tool that allows you to create, inspect and modify update files ("bundles").

Source Code: https://github.com/rauc/rauc

Documentation: https://rauc.readthedocs.org/

Chat: IRC channel #rauc on libera.chat (bridged to the Matrix channel #rauc:matrix.org)

Features

  • Fail-Safe & Atomic:
    • An update may be interrupted at any point without breaking the running system.
    • Update compatibility check
    • Atomic bootloader updates (eMMC boot partitions, MBR, GPT)
  • Cryptographic signing and verification of updates using OpenSSL (signatures based on x.509 certificates)
    • Keys and certificates on PKCS#11 tokens (HSMs) are supported
  • Flexible and customizable redundancy/storage setup
    • Symmetric setup (Root-FS A & B)
    • Asymmetric setup (recovery & normal)
    • Application partition, data partitions, ...
    • Allows grouping of multiple slots (rootfs, appfs) as update targets
  • Built-in HTTP(S) streaming mode
    • No intermediate storage on target required
  • Delta-like adaptive update support
    • Transparent selection of download optimization
  • Alternative network delta-streaming mode (using casync tool)
    • chunk-based binary delta updates
    • special bundle format and external chunk store
  • Bundle encryption for multiple recipients
  • Bootloader support:
  • Storage support:
    • read-only filesystems: SquashFS, EROFS, dm-verity protected images, ...
    • read-write filesystems: ext4, VFAT, UBIFS, JFFS2
    • eMMC boot partitions (atomic update)
    • UBI volumes
    • raw NAND flash (using nandwrite)
    • raw NOR flash (using flashcp)
    • MBR partition table
    • GPT partition table
  • Independent from update source
    • Simple webserver (e.g. lighttpd)
    • Software provisioning server (e.g. hawkBit with rauc-hawkbit-updater)
    • USB Stick
  • Controllable via D-Bus interface
  • Supports data migration
  • Network protocol support using libcurl (https, http, ftp, ssh, ...)
  • Several layers of update customization
    • Update-specific extensions (hooks)
    • System-specific extensions (handlers)
    • fully custom update script

Host Features

  • Create and sign update bundles
  • Resign bundles
  • Encrypt bundles
  • Inspect bundle files

Target Features

  • Run as a system service (D-Bus interface)
  • Install bundles
  • View system status information
  • Change status of symmetric/asymmetric/custom slots

Target Requirements

  • Boot state storage
    • GRUB: environment file on SD/eMMC/SSD/disk
    • Barebox: State partition on EEPROM/FRAM/MRAM or NAND flash
    • U-Boot: environment variable
    • EFI: EFI variables
    • Custom: depends on implementation
  • Boot target selection support in the bootloader
  • Enough mass storage for two symmetric/asymmetric/custom slots
  • Storage location and storage space for the bundle:
    • For USB stick update: Sufficent space on the stick for (compressed) bundle, no on-target storage required
    • For HTTP(S) bundle streaming installation: Sufficient space on server, no on-target storage requied
      • For adaptive updates: some on-target storage for meta-data
    • For casync-based updates: temporary on-target storage for downloaded chunks required
    • For external (non-streaming) download: Sufficient temporary on-target storage space for (compressed) bundle
  • Hardware watchdog (optional, but recommended)
  • RTC (optional, but recommended)

Usage

Please see the documentation for details.

Prerequisites

Host (Build) Prerequisites

  • build-essential
  • meson
  • libtool
  • libdbus-1-dev
  • libglib2.0-dev
  • libcurl3-dev
  • libssl-dev
sudo apt-get install build-essential meson libtool libdbus-1-dev libglib2.0-dev libcurl3-dev libssl-dev

For HTTP(S) streaming support, you also need netlink protocol headers:

sudo apt-get install libnl-genl-3-dev

If you intend to use json-support you also need

sudo apt-get install libjson-glib-dev

Target Prerequisites

Required kernel options (either y or m):

  • CONFIG_MD
  • CONFIG_BLK_DEV_DM
  • CONFIG_BLK_DEV_LOOP
  • CONFIG_DM_VERITY
  • CONFIG_SQUASHFS
  • CONFIG_CRYPTO_SHA256
  • CONFIG_BLK_DEV_NBD (for streaming support)
  • CONFIG_DM_CRYPT (for encryption support)
  • CONFIG_CRYPTO_AES (for encryption support)

For using tar archive in RAUC bundles with Busybox tar, you have to enable the following Busybox feature:

  • CONFIG_FEATURE_TAR_AUTODETECT=y
  • CONFIG_FEATURE_TAR_LONG_OPTIONS=y

Depending on the actual storage type and/or filesystem used, further target tools might be required. The documentation chapter Required Target Tools gives a more detailed list on these.

Building from Sources

Note

RAUC is intended to be built both as a host tool as well as a target tool (service). Therefore it is fully prepared for cross-compilation with meson.

git clone https://github.com/rauc/rauc
cd rauc
meson setup build
meson compile -C build # or 'ninja -C build' on meson < 0.54.0

Manual Installation

Note

To prepare RAUC for the target device, it is highly recommended to use an embedded Linux distribution build suite such as Yocto/OE, PTXdist or Buildroot.

On the host system RAUC can be used directly from the build dir, or optionally be installed. On the target instead, installing is highly recommended as it also unpacks service and D-Bus configuration files required to run RAUC properly:

meson install

Running the Test Suite

sudo apt-get install qemu-system-x86 time squashfs-tools
# Optional to run all tests:
# sudo apt-get install faketime casync grub-common openssl softhsm2 opensc opensc-pkcs11 libengine-pkcs11-openssl mtd-utils
./qemu-test

Creating a Bundle (Host)

Create a directory with the content that should be installed:

mkdir content-dir/
cp $SOURCE/rootfs.ext4 content-dir/

Create a manifest describing which image to install where together with some meta info:

cat >> content-dir/manifest.raucm << EOF
[update]
compatible=FooCorp Super BarBazzer
version=2019.01-1
[image.rootfs]
filename=rootfs.ext4
EOF

Let RAUC create a bundle from this:

rauc --cert autobuilder.cert.pem --key autobuilder.key.pem bundle content-dir/ update-2019.01-1.raucb

Starting the RAUC Service (Target)

Create a system configuration file in /etc/rauc/system.conf and start the service process in background:

rauc service &

Installing a Bundle (Target)

To install the bundle (from local storage) on your target device, run:

rauc install update-2023.02-1.raucb

To install a bundle from a webserver (using RAUC's built-in HTTP(S) streaming), run:

rauc install https://example.com/update-2023.02-1.raucb

Contributing

Fork the repository and send us a pull request.

Please read the Documentation's Contributing section for more details.

License

Copyright (C) 2015–2024 RAUC project

RAUC is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this source code, see the file named COPYING. If not, see https://www.gnu.org/licenses/.

meta-rauc's People

Contributors

einoj avatar ejoerns avatar emantor avatar esden avatar eugenwiens avatar federandink avatar gizero avatar hellow554 avatar hnez avatar jarsop avatar jluebbe avatar jremmet avatar leiflm avatar markusvolk avatar matthiasklein avatar mbessler avatar mcampbellizo avatar mnhu avatar mqqc avatar mschwan-phytec avatar onkelulla avatar paletteguy avatar psykar avatar san-skov-dk avatar sprhawk avatar svlstriker avatar swaeberle avatar texierp avatar troth avatar vivien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meta-rauc's Issues

specifying intermediate certificates in bundle.bbclass

According to the docs if you'd like to include intermediate certificates you have to use --intermediate=your/cert/here.pem, but the bundle.bbclass does not provide such option.

One could misuse the BUNDLE_ARGS variable to acomplish this.

I propose a RAUC_INTERMEDIATE_FILE (or RAUC_INTER_FILE for short, although I'd like to see the longer version) that will automatically add an intermediate file to the rauc bundle command.

error with update bundles : "Signature size exceeds bundle size"

Hi,
I' m using RAUC to update a device. When i tried to install a bundle on my client device I 've got the following error message

Signature size (7957085066972967886) exceeds bundle size

I first tried to print the information via the rauc -d info command but to no avail as it displayed the same message

I' ve then installed the RAUC tool on my computer and tried the same command and it worked perfectly

I checked in etc/rauc if the certificate was the same as the one in my layer and both were indeed the same

note :

  • I am working with version "dunfell:2fe17af894b82cd2b0d0203478d4924fa916b440"
  • I am using Hawkbit with rauc-hawkbit-updater
  • I' ve generated the certificates with the openssl script provided by the meta-rauc layer
  • My machine has not enough RAM onboard so I am temporarily using a directory located on an SD card

Thank you in advance, I have already tested rauc with raspberry and i appreciate your tool

Busybox patch does not apply on hardknott

PR #151 introduced a patch for busybox that got integrated with busybox version 1.33.0. Poky ships busybox with version 1.33.0 since hardknott. As a result, on hardknott, meta-rauc does not build because the patch does not apply.

Now, I thought the easiest way to resolve this is to simply remove this patch for master (currently hardknott). But I noticed that the layer is marked as compatible for both gatesgarth and hardknott. On gatesgarth this patch is needed, because busybox has version 1.32.0.

What is the proposed solution here? Is removing compatibility for gatesgarth on the master branch and deleting the patch on master an option? (Because there is a dedicated branch for gatesgarth anyway)

casync bundle support in yocto receipe

Hi,
is there support in the meta-rauc layer to create casync bundles? Unfortunately I was not able to find any documentation on how to write a proper receipe to create a casync bundle for a generated image by yocto.

Thanks in advance

Missing "do_image_complete" for kernel

This is a "repost", since I did not see a response in the mailing list:

I’m attempting to add a kernel to my rauc bundle, based off of phytec’s “linux-ti” kernel: https://git.phytec.de/meta-phytec/tree/recipes-kernel/linux/linux-ti_4.4.52-phy2.bb However, when I add the kernel, I’m getting an error bundle.bb depends upon non-existent task do_image_complete. It appears that the only class which contains do_image_complete is the image class, but as far as I understood, the kernel shouldn’t be a system image. I am able to create a file with just the file system, but adding a kernel or dts file does not work.

Looking inside the bundle.bbclass file, it appears that it is using the do_image_complete task for fetching dependencies. Am I supposed to create this task for my kernel somehow? What is it looking for as a return value?

Below is my bundle.bb file:

inherit bundle

RAUC_KEY_FILE = "${THISDIR}/development-1.key.pem"
RAUC_CERT_FILE = "${THISDIR}/development-1.cert.pem"
RAUC_BUNDLE_COMPATIBLE= "277264"

RAUC_BUNDLE_SLOTS="rootfs kernel"

RAUC_SLOT_rootfs="phytec-qtdemo"
RAUC_SLOT_rootfs[fstype]="ubifs"

RAUC_SLOT_kernel="linux-ti"
RAUC_SLOT_kernel[type]="kernel"

Cannot add hooks file to bundle recipe

Hi All - I cannot seem to get my custom hook file installed in the bundle. Below is my entire bundle recipe. If I remove my new additions "RAUC_BUNDLE_EXTRA*", then the bundle builds fine and I can manually install it on my system. If I leave those lines there, the bundle build fails with the following:

File: '/usr/lib/python3.6/shutil.py', lineno: 245, function: copy
     0241:
     0242:    """
     0243:    if os.path.isdir(dst):
     0244:        dst = os.path.join(dst, os.path.basename(src))
 *** 0245:    copyfile(src, dst, follow_symlinks=follow_symlinks)
     0246:    copymode(src, dst, follow_symlinks=follow_symlinks)
     0247:    return dst
     0248:
     0249:def copy2(src, dst, *, follow_symlinks=True):
File: '/usr/lib/python3.6/shutil.py', lineno: 120, function: copyfile
     0116:
     0117:    if not follow_symlinks and os.path.islink(src):
     0118:        os.symlink(os.readlink(src), dst)
     0119:    else:
 *** 0120:        with open(src, 'rb') as fsrc:
     0121:            with open(dst, 'wb') as fdst:
     0122:                copyfileobj(fsrc, fdst)
     0123:    return dst
     0124:
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pclass/Desktop/abc-jetson-yocto/build/tmp/work/jetson_nano-poky-linux/jetson-nano-abc-bundle/1.0-r0/abc-uboot-fw-update-change-env.sh'

ERROR: jetson-nano-abc-bundle-1.0-r0 do_unpack: [Errno 2] No such file or directory: '/home/pclass/Desktop/abc-jetson-yocto/build/tmp/work/jetson_nano-poky-linux/jetson-nano-abc-bundle/1.0-r0/abc-uboot-fw-update-change-env.sh'

Here is my entire bundle script:

inherit bundle

IMAGE_INSTALL += "abc-u-boot-env"

RAUC_KEY_FILE = "${COREBASE}/../meta-abc/recipes-core/rauc/files/openssl-ca/dev/private/development-1.key.pem"
RAUC_CERT_FILE = "${COREBASE}/../meta-abc/recipes-core/rauc/files/openssl-ca/dev/development-1.cert.pem"

RAUC_BUNDLE_COMPATIBLE = "ABC-Jetson-Nano"

RAUC_BUNDLE_VERSION = "20190805"

RAUC_BUNDLE_SLOTS = "rootfs"

RAUC_SLOT_rootfs ?= "jetson-nano-core-image-iot"
RAUC_SLOT_rootfs[fstype] = "ext4"

RAUC_BUNDLE_HOOKS[file] ?= "abc-uboot-fw-update-change-env.sh"
RAUC_BUNDLE_HOOKS[hooks] ?= "post-install"

RAUC_BUNDLE_EXTRAS ?= "abc-u-boot-env"
RAUC_BUNDLE_EXTRA_abc-u-boot-env[file] ?= "abc-uboot-fw-update-change-env.sh"

#do_fetch_append() {
#
#    import os
#    import shutil
#
#    filename = 'abc-uboot-fw-update-change-env.sh'
#    source_dir = d.expand("${COREBASE}/../meta-abc/recipes-bsp/abc-u-boot-env/files/")
#    dest_dir = d.expand("${D}")
#
#    shutil.copy(os.path.join(source_dir,filename),os.path.join(dest_dir,filename))
#
#}

How do I deploy my custom hooks file to the bundle? Thank you!

Unable to fetch zstd

Hi, since 25 december bitbake is un unable to fetch zstd using the original recipe.

WARNING: zstd-1.33+gitAUTOINC+f3a8bd553a-r0 do_fetch: Failed to fetch URL git://github.com/facebook/zstd.git, attempting MIRRORS if available
ERROR: zstd-1.33+gitAUTOINC+f3a8bd553a-r0 do_fetch: Fetcher failure: Unable to find revision f3a8bd553a865c59f1bd6e1f68bf182cf75a8f00 in branch master even from upstream
ERROR: zstd-1.33+gitAUTOINC+f3a8bd553a-r0 do_fetch: Fetcher failure for URL: 'git://github.com/facebook/zstd.git'. Unable to fetch URL from any source.

I checked the repository and looks like the commit is there.

any thoughts??

Thanks,
Miuqel

Including files in slot modifies the format ext4 to ext2

Hi,
I'm working with Rauc 1.1 and meta-rauc (from warrior release) with a linux-intel kernel 4.19 (x86).
I'm including a file in the kernel bundle slot,

RAUC_SLOT_kernel = "linux-intel"
RAUC_SLOT_kernel[type] = "file"
RAUC_SLOT_kernel[file] = "bzImage"

The system.conf:

[slot.kernel.0]        
parent=rootfs.0
device=/dev/sda2       
type=ext4      
               
[slot.kernel.1]        
parent=rootfs.1
device=/dev/sda3       
type=ext4 

Updating the kernel slot is modifying the filesystem format from ext4 to ext2.
Is it a problem you have already faced ?

I have done many tests with other files and the same problem occurs.
If I make a tar archive of the file, the file is correctly copied into the filesystem and even Rauc tool reformats the filesystem to ensure its integrity.

Thanks for your response,
Sandra

rauc-mark-good.service: Restart loop

recipes-core/rauc/files/rauc-mark-good.service does not define the service Type, so it defaults to simple. If systemd is generally configured to restart services, this will result in a loop that continuously tries to mark the target as good. I hope I haven't yet destroyed my EEPROMs...
I suggest setting

[Service]
Type=oneshot

Bump to a SRCREV that doesn't cause segfaults

This revision of rauc-hawkbit-updater causes segfaults rauc/rauc-hawkbit-updater#21

SRCREV = "d909982e9e4b84cb76b98bf85f25a0a88472301a"

I would at least bump to the revision that fixes this segfault, possibly a even newer one. rauc/rauc-hawkbit-updater@7b97849

It is a problem that rauc-hawkbit-updater do not crate tags for stable commits. I have opened an isue with them about that rauc/rauc-hawkbit-updater#60

No variable expansion in RAUC_SLOT_*[rename]

I have a very non-standard yocto deploy setup and have to use the RAUC_SLOT_*[rename] field to bundle the correct images. The value in there is currently not expanded. I would like to set a dynamic value to allow for easy checking if I bundled the correct image.

Problematic LOCs are here:

if slotflags and 'rename' in slotflags:
imgname = slotflags.get('rename')

I have implemented a local fix by replacing
imgname = slotflags.get('rename')
with
imgname = d.getVarFlag('RAUC_SLOT_%s' % slot, 'rename').

If the current behavior is not intentional I would prepare a quick PR to fix this issue.

busybox_%.bbappend doesn't set all configs recomended from docs

In the rauc docs it suggests that the following config options be enabled if using Busybox Tar:

CONFIG_FEATURE_TAR_AUTODETECT=y
CONFIG_FEATURE_TAR_LONG_OPTIONS=y

However, currently only CONFIG_FEATURE_TAR_LONG_OPTIONS is enabled in the busybox_%.bbappend in this layer. Should this also be enabled? I'm happy to open a PR, but wanted to check before putting in the effort.

microchip sama5d27 : error during kernel image boot

Hi
I was trying to integrate rauc on sama5d27 board. i have created integrated rauc with yocto. following are the configuration files used.
meta-rauc branch: dunfell
rauc_%.bbappend

FILESEXTRAPATHS_prepend := "${THISDIR}/files:  "    
SRC_URI_append := "file://system.conf"      
RAUC_CERT_FILE = "${THISDIR}/files/development-1.cert.pem"  

system.conf

[system]
compatible=sama5d27-som1-ek-sd
bootloader=uboot
statusfile=/home/root/central_slot.raucs

[keyring]
path=demo.cert.pem

[slot.rootfs.0]
device=/dev/mmcblk0p2
type=ext4
bootname=A

[slot.rootfs.1]
device=/dev/mmcblk0p3
type=ext4
bootname=B

But am seeing following error during boot up time

(rauc:511): rauc-WARNING **: 12:35:14.924: Failed getting primary slot: Failed getting primary slot: fw_printenv failed with exit code: 247

rauc-Message: 12:35:15.051: rauc status: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code30: Failed marking 'rootfs.0' as good: Failed to r7

Poky (Yocto Project Reference Distro) 3.1 sama5d27-som1-ek-sd ttyS0

can someone please help me to bringup rauc on sama5d2 board?

Linux Capability preservation of binaries

Hi,

I'm wondering if anyone can assist me in finding my missing capabilities!

When I build and flash the wic file to our device, capabilities are present. When I build and bundle the same image (except in tar), then install using rauc on the target, the capabilities disappear.

I've extracted the rauc bundle after generation and inspected the relevant binaries, there are no caps set. So I'm guessing it has to do with tar or squashfs?

Rootfs slot checksum changes even when no changes have been made

Hello,

I have a A/B configuration with 2 rootfs partitions and 2 appfs partitions. I am using adaptive update and I have both partitions as read-only so I can skip calculating hashes if the hash of slot matches of hash of bundle. The issue is that my rootfs slot has always different checksum hash even though no changes have been made, and the only change which was made was into other slot.

I am generating my partitions with help of wks file

part / --source rootfs --fixed-size 1024M --ondisk mmcblk0 --exclude-path data/ --exclude-path app/ --fstype=ext4 --label rootfs_A --align 4096
part / --source rootfs --fixed-size 1024M --ondisk mmcblk0  --exclude-path data/ --exclude-path app/ --fstype=ext4 --label rootfs_B --align 4096
part /rce --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/app  --fixed-size 512M --ondisk mmcblk0 --fstype=ext4 --label rce_A --align 4096
part /rce --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/app  --fixed-size 512M  --ondisk mmcblk0 --fstype=ext4 --label rce_B --align 4096
part /data --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/data --fixed-size 250M --ondisk mmcblk0 --fstype=ext4 --label data --align 4096

And creating bundle with copying partitions created by wic file directly into recipe to create bundle:

RAUC_SLOT_appfs = "fpc-image-base"
RAUC_SLOT_appfs[type] = "image"
RAUC_SLOT_appfs[file] = "app.ext4"
RAUC_SLOT_appfs[fstype] = "ext4"
RAUC_SLOT_appfs[adaptive] = "block-hash-index"

RAUC_SLOT_rootfs = "fpc-image-base"
RAUC_SLOT_rootfs[type] = "image"
RAUC_SLOT_rootfs[file] = "rootfs.ext4"
RAUC_SLOT_rootfs[fstype] = "ext4"
RAUC_SLOT_rootfs[adaptive] = "block-hash-index"

The issue might not even be in meta-rauc, but with my way of generating partitions and creating rootfs. But I dont understand why when i make change to files which are only in app partition the checksum of rootfs changes, I checked the contents of rootfs and the files from app partition are not there. It seems like every time rootfs is generated something changes which causes the checksum to also change. Any help would be appreciated.

rauc-hawkbit do_install task failing

Hi there,

I have noticed that the do_install task on the rauc-hawkbit recipe has started failing during my builds when it previously built without issue. I have tried on the dunfell and master branches both with the same issue. It doesn't seem like there has been any meaningful change in the recipe itself, but I am wondering if an upstream change to setuptools has been changed and introduced this failure.

I cannot say I am too familiar with setuptools. So, it is hard for me to say where it is attempting to get the version information from. Any guidance would be helpful.

See the log of the error below:

mitch:build$ bitbake rauc-hawkbit
Loading cache: 100% |##########################################################| Time: 0:00:00
Loaded 3680 entries from dependency cache.
Parsing recipes: 100% |########################################################| Time: 0:00:03
Parsing of 2446 .bb files complete (2441 cached, 5 parsed). 3687 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "rpi-cm4"
DISTRO               = "yoctoOS"
DISTRO_VERSION       = "22.04"
TUNE_FEATURES        = "aarch64 cortexa72 crc crypto"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "dunfell:ce50594d709f473fbad30e187565531af6714aaa"
meta-oe              
meta-perl            
meta-python          
meta-filesystems     
meta-networking      = "dunfell:86b864a4d8c28185a4a464583fb86f73aa22847a"
meta-security        = "dunfell:b76698c788cb8ca632077a972031899ef15025d6"
meta-selinux         = "dunfell:1fba53261bb8d7d3a5dcf238e388811cbb15219b"
meta-rauc            = "dunfell:2fe17af894b82cd2b0d0203478d4924fa916b440"
meta-rauc-raspberrypi = "master:f09b79a72ad53f7abbab812a6f287e4b3f447b1a"
meta-clang           = "dunfell:3bb001d3f364bbf6588fed04b9ee2c7e74a0beba"
meta-java            = "dunfell:3af889e112ddb5c677990535b1e0209c08f68e3f"
meta-rust            = "master:c654f5cb928bd4f4c7da7d74a8356fd2a94283f6"
meta-raspberrypi     = "dunfell:934064a01903b2ba9a82be93b3f0efdb4543a0e8"

Initialising tasks: 100% |#####################################################| Time: 0:00:02
Sstate summary: Wanted 15 Found 8 Missed 7 Current 874 (53% match, 99% complete)
NOTE: Executing Tasks
ERROR: rauc-hawkbit-0.2.0+gitAUTOINC+47bebb4a01-r0 do_install: 'python3 setup.py install --root=/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/image     --prefix=/usr     --install-lib=/usr/lib/python3.8/site-packages     --install-data=/usr/share' execution failed.
ERROR: rauc-hawkbit-0.2.0+gitAUTOINC+47bebb4a01-r0 do_install: Execution of '/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/temp/run.do_install.234086' failed with exit code 1
ERROR: Logfile of failure stored in: /path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/temp/log.do_install.234086
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/path/to/yoctoOS/layers/poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/path/to/yoctoOS/layers/poky/meta/recipes-core/glibc/glibc_2.31.bb:do_populate_sysroot', 'virtual:native:/path/to/yoctoOS/layers/poky/meta/recipes-devtools/python/python3_3.8.13.bb:do_populate_sysroot', 'virtual:native:/path/to/yoctoOS/layers/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/path/to/yoctoOS/layers/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/path/to/yoctoOS/layers/poky/meta/recipes-devtools/python/python3-setuptools_45.2.0.bb:do_populate_sysroot', '/path/to/yoctoOS/layers/poky/meta/recipes-devtools/gcc/gcc-cross_9.3.bb:do_populate_sysroot', '/path/to/yoctoOS/layers/poky/meta/recipes-devtools/python/python3_3.8.13.bb:do_populate_sysroot', 'virtual:native:/path/to/yoctoOS/layers/third-party/meta-openembedded/meta-python/recipes-devtools/python/python3-setuptools-scm_3.3.3.bb:do_populate_sysroot', '/path/to/yoctoOS/layers/poky/meta/recipes-devtools/gcc/gcc-runtime_9.3.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['quilt-native', 'glibc', 'python3-native', 'pseudo-native', 'patch-native', 'python3-setuptools-native', 'gcc-cross-aarch64', 'python3', 'python3-setuptools-scm-native', 'gcc-runtime', 'linux-libc-headers', 'zlib-native', 'sqlite3-native', 'libtirpc-native', 'autoconf-native', 'gnu-config-native', 'xz-native', 'bzip2-native', 'util-linux-native', 'pkgconfig-native', 'libffi-native', 'gdbm-native', 'automake-native', 'readline-native', 'libtool-native', 'openssl-native', 'libnsl2-native', 'attr-native', 'unzip-native', 'mpfr-native', 'libmpc-native', 'binutils-cross-aarch64', 'gmp-native', 'texinfo-dummy-native', 'flex-native', 'libxcrypt', 'zlib', 'opkg-utils', 'autoconf-archive', 'libtirpc', 'readline', 'libffi', 'libnsl2', 'util-linux', 'bzip2', 'openssl', 'xz', 'sqlite3', 'gdbm', 'libgcc', 'm4-native', 'gettext-minimal-native', 'libcap-ng-native', 'libpcre2-native', 'ncurses-native', 'ncurses', 'libcap-ng', 'bash-completion']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| Traceback (most recent call last):
|   File "setup.py", line 6, in <module>
|     setup(
|   File "/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
|     return distutils.core.setup(**attrs)
|   File "/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/core.py", line 108, in setup
|     _setup_distribution = dist = klass(attrs)
|   File "/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/dist.py", line 447, in __init__
|     _Distribution.__init__(self, {
|   File "/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/recipe-sysroot-native/usr/lib/python3.8/distutils/dist.py", line 292, in __init__
|     self.finalize_options()
|   File "/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/dist.py", line 740, in finalize_options
|     ep.load()(self)
|   File "/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
|     ep.load()(self, ep.name, value)
|   File "/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools_scm/integration.py", line 17, in version_keyword
|     dist.metadata.version = get_version(**value)
|   File "/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools_scm/__init__.py", line 150, in get_version
|     parsed_version = _do_parse(config)
|   File "/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/recipe-sysroot-native/usr/lib/python3.8/site-packages/setuptools_scm/__init__.py", line 105, in _do_parse
|     raise LookupError(
| LookupError: setuptools-scm was unable to detect version for '/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/git'.
| 
| Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
| 
| For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
| ERROR: 'python3 setup.py install --root=/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/image     --prefix=/usr     --install-lib=/usr/lib/python3.8/site-packages     --install-data=/usr/share' execution failed.
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/path/to/yoctoOS/build/tmp/work/aarch64-poky-linux/rauc-hawkbit/0.2.0+gitAUTOINC+47bebb4a01-r0/temp/run.do_install.234086' failed with exit code 1
ERROR: Task (/path/to/yoctoOS/layers/third-party/meta-rauc/recipes-support/rauc-hawkbit/rauc-hawkbit_git.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2737 tasks of which 2728 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /path/to/yoctoOS/layers/third-party/meta-rauc/recipes-support/rauc-hawkbit/rauc-hawkbit_git.bb:do_install
Summary: There were 4 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Warnings building rauc-native on zeus

When building the rauc-native recipe on zeus I get the warnings at the end of this issue. I spent a couple hours trying to get to the bottom of it and am stumped. The best I have is that removing inherit native causes this to go away. Obviously that kills the point of the recipe, but there might be a clue in there. I'm not sure what native.bbclass would be causing this.

I found this bug in upstream OpenEmbedded that is similar but not exactly the same. I'm not sure how to check for sure, but I don't think any key tasks are getting set to noexec. Due to either native.bbclass or any of the rauc recipe itself.

One last note, I am running an in-house distro that is based off Poky, so it's possible this is related to our changes, but it would still be inserting that we only see this with rauc-native and no other native recipes. Would love to hear if anyone has seen this before or has any thoughts before I spin up a clean build against Poky.

WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-openssl.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-glib-2.0.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-opkg-utils.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-gcc-runtime.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-glibc.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-bash-completion.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-util-linux.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-libffi.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-libpcre.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-zlib.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-dbus.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-linux-libc-headers.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-libgcc.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-libxcrypt.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-libcap-ng.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-ncurses.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-bzip2.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-base-passwd.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-shadow-sysroot.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-shadow.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-expat.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-initscripts.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?
WARNING: rauc-native-1.2-r0 do_prepare_recipe_sysroot: Manifest /workspaces/izo-yocto/build-tonos-r1/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-attr.populate_sysroot not found in tonos_r1 armv7ahf-neon armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch x86_64_x86_64-nativesdk (variant '')?

Update System and keep the data stored on EEPROM

Hello ,
Hi, i have two system(s) on my board : system A and system B. The system B updates the first one using the yocto meta-rauc.
I want to write some data in EEPROM through the system A only once. So if i update A the data in EEPROM , it dosen't erase.
Have you any idea, how it's done?
Thank you.

problems if IMAGE_BASENAME is changed

When changing the IMAGE_BASENAME in a custom image recipe, I'm facing an issue when defining a RAUC_SLOT of the type image:
The content of RAUC_SLOT_<slotclass> is defining the dependency to the image recipe AND it is also used to determine the name of the image file. So if the IMAGE_BASENAME is not matching the recipe name the image file cannot be found.
E.g.

RAUC_SLOT_rootfs = "mymachine-myproj-image"
RAUC_SLOT_rootfs[fstype] = "ext4"

and inside my recipe (e.g. too shorten the names of the output files)

export IMAGE_BASENAME = "myproj-image"

rauc is searching for the file

mymachine-myproj-image-<machine>.ext4

which is not existing.

As a simple solution I patched the bundle.bbclass to handle the slot flag 'file' also for slots of the type image

index 20d5c0b..3c5299a 100644
--- a/classes/bundle.bbclass
+++ b/classes/bundle.bbclass
@@ -143,7 +143,10 @@ def write_manifest(d):
             img_fstype = slotflags.get('fstype')
 
         if imgtype == 'image':
-            imgsource = "%s-%s.%s" % (d.getVar('RAUC_SLOT_%s' % slot), machine, img_fstype)
+            if slotflags and 'file' in slotflags:
+                imgsource = d.getVarFlag('RAUC_SLOT_%s' % slot, 'file')
+            else:
+                imgsource = "%s-%s.%s" % (d.getVar('RAUC_SLOT_%s' % slot), machine, img_fstype)
             imgname = imgsource
         elif imgtype == 'kernel':
             # TODO: Add image type support

Now it is possible to define the image file.

RAUC_SLOT_rootfs[file] = "myproj-image-${MACHINE}.ext4"

What is the correct solution? And why is the flag 'file' not evaluated for 'image'?

Can't find rauc.service files

I am attempting to build and install RAUC on my target system. Bitbake is complaining about not being able to find rauc.service. I can see that it is generated in the data/ directory as stated in the documentation, however I can't seem to point the build system to it. When I set S="${WORKDIR}/build/data" I get other errors about not finding other files (license files specifically).

I am confused around the workflow for the .service files. I'm thinking that in my .bbappend I need to do something with the file. When I move rauc.service into ${WORKDIR} I still get the error:

ERROR: rauc-1.5.1-r0 do_package: Didn't find service unit 'rauc.service', specified in SYSTEMD_SERVICE_rauc-service.

When I manually copy the file into my layer (in the files folder next to my .bbappend ) I can resolve the error message, however that doesn't really feel like an appropriate course of action: initial build to generate .service file, inevitably fail to build, copy .service file to directory that can be seen, then build again.

I've got

FILESEXTRAPATHS:prepend := "${THISDIR}/files:${WORKDIR}/build/data/:"
SRC_URI:append := " file://system.conf file://rauc.service "

at the top of my recipe, but bitbake just complains it can't find the file and lists all the places it looks including:

/home/user/poky/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/rauc/%-r0/build/data/

which is where that file would be. I believe this is due to the error occurring during do_fetch, which obviously occurs before the do_package stage.

Unfortunately I feel my infancy with Yocto Project is the limiting factor here, I would be very grateful for some of your input

Here is my rauc_%.bbappend file in it's entirety.

FILESEXTRAPATHS:prepend := "${THISDIR}/files:${WORKDIR}/build/data/:"
SRC_URI:append := " file://system.conf \
file://rauc.service "

FILES_${PN}="${D}/etc/rauc/system.conf ${D}${systemd_unitdir}/rauc.service"

do_install(){
	install -d ${D}/etc/rauc/
	install -d ${D}/lib/systemd/system
	
	install -m 600 ${WORKDIR}/system.conf ${D}/etc/rauc/
	install -m 600 ${WORKDIR}/rauc.service ${D}${systemd_unitdir}/
	
}

rauc used on x86 (intel nuc)

I have successfully added rauc necessary bits and pieces to my cusotm layer and also build image which contains 2 rootfs. I've used https://github.com/rauc/rauc/blob/master/contrib/grub.conf for experiments. When board is booted it always want to boot from SlotB (default set to 2) and not 1. Also I find out that grub.cfg is taken from /dev/sda3 (rootfs B) and not from /dev/sda2 (rootfs A). Any ideas how this could happen? Thanks.

How to add post install hook

Hi, I want to add post install hook.
I have added following lines in bundle recipe, but that did not worked....
SRC_URI += " file://demo.sh"
RAUC_BUNDLE_HOOKS[file] ?= "demo.sh"
RAUC_BUNDLE_HOOKS[hooks] ?= "post-install"

Can you please help, how to execute custom script as post-install-hook....

Missing dependency to rauc-native in do_bundle

After purging the './build/tmp' directory and rebuilding from the shared state cache with Yocto 2.4, I hit a case where do_bundle is called from a sysroot where rauc is not available although rauc-native is in DEPENDS

DEBUG: Executing shell function do_bundle
/shared/build/tmp/work/somemachine-somedistro-linux/bundle-some-image/1.0-r0/temp/run.do_bundle.31126: 113: /shared/build/tmp/work/somemachine-somedistro-linux/bundle-some-image/1.0-r0/temp/run.do_bundle.31126: /shared/build/tmp/work/somemachine-somedistro-linux/bundle-some-image/1.0-r0/recipe-sysroot-native/usr/bin/rauc: not found
WARNING: exit code 127 from a shell command.
ERROR: Function failed: do_bundle (log file is located at /shared/build/tmp/work/somemachine-somedistro-linux/bundle-some-image/1.0-r0/temp/log.do_bundle.31126)

After explicitly adding do_bundle[depends] += "rauc-native:do_populate_sysroot" to the recipes, the build was fine again.

This kind of explicit dependencies seems to be a usual pattern in Yocto. If this approach looks good to you, I can submit a PR.

RAUC_KEY_PASSPHRASE isn't passed to rauc bundle

Hi,

I'm trying to sign a bundle image with an encrypted certificate. I am doing so by using the RAUC_KEY_PASSPHRASE, as per the documentaion. I have tried setting this variable with an export in host environment and a BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS RAUC_KEY_PASSPHRASE" before building, as well as from the bundle image recipe. Nevertheless, rauc bundle always fails as it can't read the private key.
bitbake -e seems to confirm I have the correct environment.

I have managed to sign the image by hand using the same certificate / keys and the same password so I don't think there's any issue here.

I have also been able to sign the bundle using yocto by adding a export RAUC_KEY_PASSPHRASE=mypassword in bundle.bbclass / do_bundle, so it seems this is due do the environment not being accessible from the child process.
This is confirmed by adding some debug prints in the do_bundle task, where I can see my password with a simple print of RAUC_KEY_PASSPHRASE, but not with a eng|grep RAUC.

I am using the kirkstone release and haven't found any clean solution yet.

Thanks,
Antoine

casync failed to fetch

Hi

it looks like that there is no more master branch in casync repo. I saw that in master, the SRC_URI branch has been changed to main. However kirkstone and honister still have the branch in master.

Regards,
Qorin

Rauc and sysvinit

As I understand in issues #48 and #51 there has been added support for sysvinit systems. But whenever i boot my system and run rauc status i get the following error:

rauc-Message: 08:53:08.367: rauc mark: rauc status: error retrieving slot status via D-Bus: error creating proxy: Error calling StartServiceByName for de.pengutronix.rauc: GDBus.Error:org.freedesktop.DBus.Error.Spawn.PermissionsInvalid: The permission of the setuid helper is not correct

Which can be solved with running rauc service &.

I've tried using chmod and chgrp to change permissions on the de.pengutronix.rauc file without any luck. Do i need to create a sysvinit start script that runs rauc service or do you know another way to fix this?

Setting boot limit or no of tries to 1?

It is provided we have these parameters BOOT_A_LEFT and BOOT_B_LEFT which are set to 3 in the https://github.com/rauc/rauc/blob/master/contrib/uboot.sh boot script that you have provided. I want to change this boot limit to 1, so I tried to set the above parameters as 1. But what I observe is on reboot this again changes to 3

This log is before reboot i.e on a new image flash

Found valid slot A, 1 attempts remaining
skip remaining slots
Saving Environment to FAT... OK

After reboot

Found valid slot A, 3 attempts remaining
skip remaining slots
Saving Environment to FAT... OK

Is it that a patch is needed for changing these variables on the source code itself?

RAUC 1.5 Incompatibility with Kernel Headers < 4.14

  • Since dunfell branch is updated to rauc version 1.5 with eaf6586, Rauc failed to compile using linux kernel 4.14.78 while looking for flag LOOP_SET_BLOCK_SIZE. Kernel flags given in meta-rauc are applied.
../rauc-1.5/src/mount.c: In function ‘r_setup_loop’:
../rauc-1.5/src/mount.c:201:25: error: ‘LOOP_SET_BLOCK_SIZE’ undeclared (first use in this function)
  looprc = ioctl(loopfd, LOOP_SET_BLOCK_SIZE, 4096);
                         ^
../rauc-1.5/src/mount.c:201:25: note: each undeclared identifier is reported only once for each function it appears in

can I use zues branch for rauc in yocto?

hi all,

but after trying sumo branch , now I know sumo do not works well.
so I want to try zues or hardknott branch , can I use them?
I posted Qz here:
rauc/rauc#989
and the supporter told me do not use sumo branch.
but my maaxboard source code only support zues or hardknott except sumo and the current master is langdale

Thanks

sysvinit support

Am I right in thinking this layer only configures the service with systemd? i.e. it doesn't add it to sysvinit.

Error when creating update bundle with hooks

Hi All,

I am using meta-rauc to build an update package for my raspberry pi 4. My build configurations are as follows:
Target machine : raspberrypi4-64
yocto branch: kirkstone

I am facing issues when creating bundles with hook file. Bellow is my recipe and the error linked to it.
Screenshot (112)

Screenshot (111)

The bundle.bbclass file mentions to link the file as SRC_URI += "hook.sh",but I have kept the hook file in a files folder in the directory my recipe is present. If I don't use the SRC_URI += "file://postinstall.sh" file path, bitbake gives the error of malformed URl.

Please let me know what is causing this issue. Thanks in advance

Switch from "_" to ":" separator

Yocto Kirkstone switched from underscore to colon separator. Should this be done for meta-rauc also?
I.e. switch from RAUC_SLOT_<slot> to RAUC_SLOT:<slot>.

Simple reference poky+rauc implementation

Hello dear rauc-Team,

Thanks for developing this fantastic Update-Framewrok.
I am a little bit familiar with yocto and want to try to build a mini-raspberry-pi3 image including rauc as an update-frmaework using yocto.

The problem is that i could not find any reference implementation using RAUC not even with poky! mainly i would like to know, where and how to set the partition-layouts needed by RAUC and generally how to integrate rauc in a simple BSP like Poky!

It would be great if you could point me to some reference implementations!

Thanks
Arash

Nothing RPROVIDES 'u-boot-default-env'

When trying to compile rauc with yocto (dunfell) I am getting an error message that nothing provides the u-boot-default-env.

ERROR: Nothing RPROVIDES 'u-boot-default-env' (but /home/mdedonato/projects/yocto/poky/meta/recipes-bsp/u-boot/libubootenv_0.3.1.bb RDEPENDS on or otherwise requires it)

NOTE: Runtime target 'u-boot-default-env' is unbuildable, removing... Missing or unbuildable dependency chain was: ['u-boot-default-env']

NOTE: Runtime target 'u-boot-fw-utils' is unbuildable, removing... Missing or unbuildable dependency chain was: ['u-boot-fw-utils', 'u-boot-default-env']

NOTE: Runtime target 'rauc' is unbuildable, removing... Missing or unbuildable dependency chain was: ['rauc', 'u-boot-fw-utils', 'u-boot-default-env']

ERROR: Required build target 'test-bundle' has no buildable providers. Missing or unbuildable dependency chain was: ['test-bundle', 'core-image-minimal', 'rauc', 'u-boot-fw-utils', 'u-boot-default-env']

Missing mtd-utils-ubifs dependency

When installing a tarred filesystem on an ubifs slot, mkfs.ubifs is used to format the slot. If the binary is not available you get the following error message:
LastError: Installation error: Failed updating slot rootfs.1: failed to start mkfs.ubifs: Failed to execute child process ?mkfs.ubifs? (No such file or directory)
A short search brought up that mkfs.ubifs is available in the mtd-utils-ubifs recipe from the meta layer. Manually adding the recipe for my image solved the issue.

RAUC does not use IMAGE_ROOTFS_EXTRA_SPACE or IMAGE_OVERHEAD_FACTOR

When building my image I use IMAGE_ROOTFS_EXTRA_SPACE=400000 and IMAGE_OVERHEAD_FACTOR=1, to make sure that there is at least 400MB free space on the two root filesystems on my image. This works for the image created by yocto which is created with the do_image_wic command. However the .ext4 partition included in the RAUC bundle does not get the extra space and is only 1.1G

NOTE: Creating symlink: tmp/work/rpi_cm3-poky-linux-gnueabi/core-base-image/1.0-r0/deploy-core-base-image-image-complete/core-base-image-rpi-cm3.wic -> core-base-image-rpi-cm3-20210129084916.rootfs.wic

If I run fdisk -l I can see that both rootfs's have a size of 1.3G

$ fdisk -l deploy-core-base-image-image-complete/core-base-image-rpi-cm3-20210129084916.rootfs.wic 
Disk deploy-core-base-image-image-complete/core-base-image-rpi-cm3-20210129084916.rootfs.wic: 3,35 GiB, 3588227072 bytes, 7008256 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcd0fc87a

Device                                                                                 Boot   Start     End Sectors  Size Id Type
deploy-core-base-image-image-complete/core-base-image-rpi-cm3-20210129084916.rootfs.wic1 *       8192   69335   61144 29,9M  c W95 FAT32 (LBA)
deploy-core-base-image-image-complete/core-base-image-rpi-cm3-20210129084916.rootfs.wic2        73728 2874573 2800846  1,3G 83 Linux
deploy-core-base-image-image-complete/core-base-image-rpi-cm3-20210129084916.rootfs.wic3      2875392 5676237 2800846  1,3G 83 Linux
deploy-core-base-image-image-complete/core-base-image-rpi-cm3-20210129084916.rootfs.wic4      5677056 7008255 1331200  650M 83 Linux

$ ll core-base-image-rpi-cm3.ext4 
-rw-r--r-- 1 root root 1,1G jan.   1  1970 /mnt/clu/core-base-image-rpi-cm3.ext4

I believe this happens because the .ext4 file is exported to ${DEPLOY_DIR_IMAGE} by do_image_ext4 and the rootfs in the image files are resized by do_image_wic which is run after.

$ cat temp/log.task_order 

do_cleansstate (10726): log.do_cleansstate.10726
do_cleanall (10729): log.do_cleanall.10729
do_prepare_recipe_sysroot (10941): log.do_prepare_recipe_sysroot.10941
do_deploy_source_date_epoch (10944): log.do_deploy_source_date_epoch.10944
do_rootfs (10986): log.do_rootfs.10986
do_image_qa (21840): log.do_image_qa.21840
do_image (21845): log.do_image.21845
do_rootfs_wicenv (39147): log.do_rootfs_wicenv.39147
do_image_ext4 (39150): log.do_image_ext4.39150
do_image_wic (39155): log.do_image_wic.39155
do_image_complete (39473): log.do_image_complete.39473

The extra space is added when do_image_wic calls set_image_size()

meta-poky/meta/classes/image.bbclass:569:python set_image_size () {
meta-poky/meta/classes/image_types_wic.bbclass:145:do_rootfs_wicenv[prefuncs] = 'set_image_size'

Is there a way to get the 400MB extra space added to the .ext4 file in the RAUC bundle? Perhaps by using the .wic file which is also in ${DEPLOY_DIR_IMAGE}, or by running set_image_size () from image.bbclass before including the .ext4 file in the RAUC bundle?

How to pass PEM password to meta-rauc?

I am getting this error when attempting to bundle, I am unable to find where to pass the password in for the key.pem file.

ERROR: cube-bundle-1.0-r0 do_bundle: Execution of '/home/user/poky/build/tmp/work/poky-linux-gnueabi/cube-bundle/1.0-r0/temp/run.do_bundle.9897' failed with exit code 1:
rauc-Message: 02:55:39.491: Debug log domains: 'rauc'
(rauc:9900): rauc-DEBUG: 02:55:39.491: bundle start
(rauc:9900): rauc-DEBUG: 02:55:39.492: system config not found, using default values
(rauc:9900): rauc-DEBUG: 02:55:39.492: input directory: /home/user/poky/build/tmp/work/poky-linux-gnueabi/cube-bundle/1.0-r0/bundle
(rauc:9900): rauc-DEBUG: 02:55:39.492: output bundle: /home/user/poky/build/tmp/work/poky-linux-gnueabi/cube-bundle/1.0-r0/build/bundle.raucb
(rauc:9900): rauc-DEBUG: 02:55:41.372: Payload size: 53411840 bytes.
Creating bundle in 'plain' format
Enter PEM pass phrase:
Failed to create bundle: failed to sign bundle: failed to parse key file '/home/user/fapl-dev-certs/ee-cube/private/ee-cube.key': while reading strings
140324263220032:error:0906406D:PEM routines:PEM_def_callback:problems getting password:../openssl-1.1.1l/crypto/pem/pem_lib.c:59:
140324263220032:error:0906A068:PEM routines:PEM_do_header:bad password read:../openssl-1.1.1l/crypto/pem/pem_lib.c:434:
WARNING: exit code 1 from a shell command.

It's almost a certainty there are more things wrong with what I'm doing, this is the first time I'm playing with RAUC/yocto in general. I just can't get past this error to start whack-a-moleing the next errors.

I've looked around but I'm unable to find the variable to put this file in.

Thanks, and apologies if I've missed something obvious

Attempting to Integrate

Hello,

I am following your README and I have added rauc to my image. When I go to build I get the error
ERROR: Layer rauc is not compatible with the core layer which only supports these series: hardknott (layer is compatible with langdale)

I am using Yocto from NXP and my distro is hardknott. Can anyone explain what is happening here?

rauc_1.10 does not support building without the 'service' PACKAGECONFIG opt-in feature

Context

I am building v1.10 of the rauc package using the meta-rauc kirkstone upstream recipe (meta-rauc/recipes-core/rauc/rauc_1.10.bb). I am only interested in using the "json" opt-in feature of the rauc package.

Problem

In order to only use the "json" feature, I have specified the following:

PACKAGECONFIG:pn-rauc ?= "json"

As a result, the rauc package has failed to build on the do_package stage with the following error:

ERROR: rauc-1.10-r0 do_package: Didn't find service unit 'rauc.service', specified in SYSTEMD_SERVICE:rauc-service. 
ERROR: Logfile of failure stored in: .../rauc/1.10-r0/temp/log.do_package.4099807
ERROR: Task (.../poky/../meta-rauc/recipes-core/rauc/rauc_1.10.bb:do_package) failed with exit code '1'

The error seems to be that bitbake has failed to find the rauc.service file within the systemd service directory. After looking at the rauc recipes within meta-rauc, it seems like the shared rauc bitbake classes do not check which PACKAGECONFIG options have been set. Regarding the error, the following lines withihn meta-rauc/recipes-core/rauc/rauc-target.inc are always set regardless of whether the "service" opt-in feature has been provided in PACKAGECONFIG

PACKAGES =+ "${PN}-service"
SYSTEMD_SERVICE:${PN}-service = "rauc.service"
SYSTEMD_PACKAGES += "${PN}-service"
RDEPENDS:${PN}-service += "dbus"

Possible Solution

These bitbake variables could be updated to first check whether the 'service' feature was specified in PACKAGECONFIG as such:

SYSTEMD_SERVICE:${PN}-service = "${@bb.utils.contains('PACKAGECONFIG','service','${PN}-service','',d)}"

rauc 1.0 does not build on sumo branch

Since commit d6360ed, the rauc 1.0 recipe no longer builds on sumo:

[...]
Applying patch add_squashfs_to_raw_handler_v4.patch
patching file src/update_handler.c
Hunk #1 FAILED at 1329.
1 out of 1 hunk FAILED -- rejects in file src/update_handler.c
Patch add_squashfs_to_raw_handler_v4.patch does not apply (enforce with -f)
ERROR: rauc-1.0-r0 do_patch: Function failed: patch_do_patch

Yocto: No instructions for creating a bundle with a Post-install Hook

Hello together,

at the moment I am trying to create a bundle with a post-install hook.
But there I can not find any example for this purpose in the documentation...

That is my actual try:
My update-bundle.bb:

`DESCRIPTION = "RAUC bundle generator"

inherit bundle

RAUC_BUNDLE_COMPATIBLE = "RaspberryPi4"
RAUC_BUNDLE_VERSION = "v20200703"
RAUC_BUNDLE_DESCRIPTION = "RAUC Demo Bundle"
RAUC_BUNDLE_SLOTS = "rootfs" 
RAUC_SLOT_rootfs = "core-image-minimal"
RAUC_SLOT_rootfs[fstype] = "ext4"


RAUC_KEY_FILE = "${THISDIR}/files/development-1.key.pem"
RAUC_CERT_FILE = "${THISDIR}/files/development-1.cert.pem"


RAUC_BUNDLE_HOOKS[file] = "${THISDIR}/files/hook.sh"
RAUC_BUNDLE_HOOKS[hooks] = "post-install"`

bitbake update-bundle fails now with:

FileNotFoundError: [Errno 2] No such file or directory: '/home/xxx/poky-gatesgarth/build-dir/tmp/work/raspberrypi3-poky-linux-gnueabi/update-bundle/1.0-r0//home/xxx/poky-gatesgarth/customlayers/meta-smarthome/meta-rauc-raspberrypi/recipes-core/bundles/files/hook.sh'

The update with rauc generally works for me.
But I can not get work a hook.sh file after the update.
=> I need it to copy configuration files from the currently active slot to the new active slot

Can you give me a link to an example?
Or give me some advice what I have to do here?

Thank you very much!

Alex

Depedency glib-2.0 built without libmount on Yocto zeus/dunfell

RAUC depends on glib being compiled with libmount to be able to set mountdir= correctly. This is especially needed when /proc/mounts lists /dev/root as the root file system.

The Yocto default is to include libmount unless overridden, but because Yocto used to use a meson cross file with the name linux-$libc (linux-gnueabi in my case), we failed the host_system == 'linux' check in glib's meson and glib was compiled without libmount.

For releases after, there is already a general meson fix in master. I have posted patches to fix glib-2.0 build on zeus and dunfell. Older releases may be affected as well.

Question: Do we want to include this glib-2.0 patch in meta-rauc as well? How to avoid clash when the patch lands in oe-core? Just give it the same name?

Using meta-rauc for Intel 64 bit machine with UEFI secure boot

Hi everyone,

I am currently building a yocto genericx86-64 machine for an Intel 64 bit machine with UEFI secure boot and would like to use meta-rauc as the system update mechanism.

However I encountered a an issue that I am not able to see .raucb bundle deployed in the deploy dir and I also don't see the do_bundle is called anywhere in the log.

Here is the update-bundle.bb

inherit bundle

RAUC_BUNDLE_COMPATIBLE = "generic86-64"
RAUC_BUNDLE_VERSION = "v2021-12-01"

RAUC_BUNDLE_SLOTS = "efi rootfs"

RAUC_SLOT_rootfs = "ipc-core-image"

RAUC_SLOT_efi = "bootimg-efi"
RAUC_SLOT_efi[type] = "boot"

RAUC_IMAGE_FSTYPE = "ext4"

RAUC_KEY_FILE = "${THISDIR}/files/development-1.key.pem"
RAUC_CERT_FILE = "${THISDIR}/files/development-1.cert.pem"

the system.conf

[system]
compatible=generic86-64
bootloader=efi
statusfile=/data/central-status.raucs
bundle-formats=-plain

[slot.efi.0]
device=/dev/sda1

[slot.rootfs.0]
device = /dev/sda2
type = ext4
bootname=A

[slot.rootfs.1]
device = /dev/sda3
type = ext4
bootname=B

I am new at yocto and at RAUC. would be nice if someone can help to point at which direction I need to look at.

Thank you!!

do_bundle/do_deploy is slow when using Casync

The do_bundle and subsequently do_deploy step are very slow and they seems to take quite a few minutes, I am not sure about the reason why it's slow.

My basic testing suggests that running casync make is a quick task, so I wonder what takes all that time ?

Include arbitrary files in the bundle

In a custom post-install hook embedded in a rauc bundle, I'm trying to install specific files that require specific treatment (in this specific case, the bootloader itself).

I initially tried to declare it as a "virtual" slot in RAUC_BUNDLE_SLOTS of type file. I was successfully able to package an arbitrary file from the deploy dir as "somefile.img" at the root of the bundle. This also create the corresponding declaration in the manifest.

Unfortunately, the current live system does not have the corresponding virtual slot declaration in its system.conf file and fails to install the bundle, which is expected.

I solved this with a do_fetch_append (see below) In the bundle recipe, with the related code in the main slot post-install hook:

python do_fetch_append() {
    bootloader_name = 'bootloader'
    deploy_dir = d.expand("${DEPLOY_DIR_IMAGE}")
    bundle_dir = d.expand("${S}/bundle")

    shutil.copytree(
        os.path.join(deploy_dir, bootloader_name),
        os.path.join(bundle_dir, bootloader_name),
    )
}

Maybe we could design a better way to embed any arbitrary files/folder inside a rauc bundle using meta-rauc. It could look like:

RAUC_BUNDLE_FILES = "file1 file2 ... fileN"

Which would copy files from the deploy directory to the bundle.

If this looks good to you, I can work on this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.