Radxa Zero with Buildroot image and U-Boot. How achieve board integration and A/B partitioning?

Good day, friends!
We are currently developing an IoT device with a Radxa Zero SBC. The device is somehow passive in its nature and has minimal user interactions. It connects bluetooth devices to the internet.

I’ve created a dev image with buildroot-2022.11. It is mostly functional using the 5.10.145-cip17 Linux kernel.

Device description

Radxa Zero v1.51
Cortex-A53
16 GB eMMC
SKU: RS102-D2E8H

References

You can run DietPi on it which runs good.
The official images are to large and has their flaws.
In the attachment will be a .config of my current buildroot configuration.

The board is using its own U-Boot build that you can find here. I must use radxa-zero-v2021.07 branch.

The boot sequence is like:

  1. ROM code is checking for available devices (USB/SD/eMMC).
  2. Entry point is unpartitioned storage where U-Boot lies.
  3. U-Boot loads Kernel and rootfs

In the attachment is the .config-uboot which describes how the U-Boot image is build. It is build outside of buildroot (github link).
I also will provide a genimge-config which describes the Image structure that is created by genimage in a post-build script in buildroot.

The current problem is that I have absolutely no idea how to integrate mender to be able to make system/OS updates. The mender-client is installed with buildroot and is fully functional and I can make software updates.

For now I assume I will need probably A, B and data partition.

There are several questions.

  1. I would like to stay with U-Boot and and control there which partition will be loaded. How would mender-client interact with U-Boot to choose a partition?
  2. Can I make OS level modifications via software updates? So I omit the A/B partitioning and make OS level modifications via shell scripts. Is it a practice?
  3. Are there tools native to buildroot to achieve such partitioning scheme?
  4. Can I implement some compression to the B partition? How would boot sequence look like?
    .config.yaml (112.3 KB)
    .config-uboot.yaml (33.5 KB)
    genimage-radxa-zero.cfg.yaml (266 Bytes)