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

**URL:** <https://hub.mender.io/t/radxa-zero-with-buildroot-image-and-u-boot-how-achieve-board-integration-and-a-b-partitioning/5769>\
**Category:** Board Integrations\
**Tags:** buildroot, uboot, radxa\
**Created:** [April 17, 2023, 2:00pm UTC](https://hub.mender.io/t/radxa-zero-with-buildroot-image-and-u-boot-how-achieve-board-integration-and-a-b-partitioning/5769 "2023-04-17T14:00:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mister\_kanister](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mister\_kanister](https://hub.mender.io/u/mister_kanister)\
**Post date:** [April 17, 2023, 2:00pm UTC](https://hub.mender.io/t/radxa-zero-with-buildroot-image-and-u-boot-how-achieve-board-integration-and-a-b-partitioning/5769/1 "2023-04-17T14:00:04Z")

</div>

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](https://dietpi.com/#downloadinfo) on it which runs good.  
The [official images](https://wiki.radxa.com/Zero/downloads) 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](https://github.com/radxa/u-boot/tree/radxa-zero-v2021.07). 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](https://hub.mender.io/uploads/short-url/8Y09YRtiPS2Yn3zwptpjpR7sk0p.yaml) (112.3 KB)  
[.config-uboot.yaml](https://hub.mender.io/uploads/short-url/wdUGGlAq6OTnbzg4ryUvBhs27hU.yaml) (33.5 KB)  
[genimage-radxa-zero.cfg.yaml](https://hub.mender.io/uploads/short-url/aha2R9MGEZFYQluFAnFxZvWIlNH.yaml) (266 Bytes)
