# Radxa Compute Module 3

**URL:** <https://hub.mender.io/t/radxa-compute-module-3/5785>\
**Category:** Yocto Project\
**Created:** [April 24, 2023, 10:42am UTC](https://hub.mender.io/t/radxa-compute-module-3/5785 "2023-04-24T10:42:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregszalay](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/gregszalay/32/1895_2.png) [@gregszalay](https://hub.mender.io/u/gregszalay)\
**Post date:** [April 24, 2023, 10:42am UTC](https://hub.mender.io/t/radxa-compute-module-3/5785/1 "2023-04-24T10:42:50Z")

</div>

Hello Mender Community!

I am working on integrating the [Radxa Compute Module 3](https://wiki.radxa.com/Rock3/CM) with Mender. I am using yocto kirkstone.

In the base project, I use the [meta-radxa](https://github.com/radxa/meta-radxa) repo (I use a version that is converted to kirkstone), which is using the [radxa/u-boot](https://github.com/radxa/u-boot/tree/stable-4.19-rock3) u-boot fork. I am able to build a working gpt image and flash it to emmc. I flash the standard SPL bin file + the created \*-gpt.img file and it works fine.

Then I started to integrate u-boot using these [example patches](https://github.com/yannickadam/rockpi4-mender-integration-scripts).  
For the sake of easier development, instead of patches, I created a custom u-boot fork that includes all the mender u-boot changes. So. here you can see all the u-boot integration I have done: [Stable 4.19 rock3 mender by gregszalay · Pull Request #1 · gregszalay/u-boot · GitHub](https://github.com/gregszalay/u-boot/pull/1/files)

Here you can also find the [boot.cmd](https://github.com/gregszalay/u-boot/blob/stable-4.19-rock3-mender/boot.cmd.example) and [kas.yml](https://github.com/gregszalay/u-boot/blob/stable-4.19-rock3-mender/kas.yml.example) files I use in the project.

With these u-boot changes and yocto configurations, I am able to build. The output is a .img file (which is coming from the meta-radxa layer, without Mender) and a .gptimg which is coming from the Mender layer and contains all partitions.

My issue is that:

1. The original .img image is booted to some extent (it can be seen on my local network), but I cannot access it. I think it is stuck in the u-boot stage. Maybe this is understandable since this image contains the new mender u-boot but still has the old gpt partitions.
2. The new .gptimg image does not boot at all.

I suspect that there is something wrong with the offsets in the .gptimg. Maybe the SPL doesn’t seem to find u-boot.

It is my first time working with a Radxa board and my first Mender board integration.

Any ideas, insights, links would be much appreciated.

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [April 24, 2023, 10:55am UTC](https://hub.mender.io/t/radxa-compute-module-3/5785/2 "2023-04-24T10:55:57Z")

</div>

Hi @gregszalay. I’m also looking into having rock-pi-e using meta-radxa layer to be booted with mender extensions. I also can build an image but just idbloader starts and fails to boot as it complains it cannot find u-boot and other partitions. I’m currently looking into it and keep you posted. Thanks.

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [April 24, 2023, 7:36pm UTC](https://hub.mender.io/t/radxa-compute-module-3/5785/3 "2023-04-24T19:36:44Z")

</div>

@gregszalay please check: [Preliminary radxa support · nandra/meta-mender-community@96d3dde · GitHub](https://github.com/nandra/meta-mender-community/commit/96d3ddef5c5acd9e0e49b7b0d8016581aed14aea)

I’ve booted rockpi-e using meta-radxa and those small fixes mender enabled image. Which layer do you use meta-radxa or forked meta-rockchip? If you need I can give a hand with integrating to rockpi cm3 module.

And this is snippet for kas I’ve used:

```auto
local_conf_header:
  mender: |
    MENDER_ARTIFACT_NAME ?= "release-1"
    MENDER_FEATURES_ENABLE:append = " mender-uboot mender-image mender-client-install mender-image-gpt"
    MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi"

    MENDER_UBOOT_STORAGE_INTERFACE = "mmc"
    MENDER_UBOOT_STORAGE_DEVICE = "1"
    IMAGE_CLASSES += "radxa-sdimg"
    IMAGE_BOOT_FILES:append = "boot.scr"

    IMAGE_FSTYPES:remove = "mender.bmap rockchip-gpt-img"

    # we must shift ENV_OFFSET and default one conflict with u-boot
    # move to 4M instead of default 8M
    MENDER_PARTITION_ALIGNMENT = "4161536"
    BOOTENV_SIZE = "0x4000"

```

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [April 25, 2023, 8:42am UTC](https://hub.mender.io/t/radxa-compute-module-3/5785/4 "2023-04-25T08:42:15Z")

</div>

Hi @MarekBelisko,

Thanks for the interesting work. Any particular reason why this went into a separate layer, though? I think this could be perfectly folded into `meta-mender-rockchip`.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [April 25, 2023, 9:13am UTC](https://hub.mender.io/t/radxa-compute-module-3/5785/5 "2023-04-25T09:13:13Z")

</div>

@TheYoctoJester it can go to meta-rockchip also but for me it was easier not to mess up and it’s kind of proof-of-concept ;). Also meta-radxa have only dunfell support and it’s kind of not properly maintained. I’ll try to add it to proper layer bit later ;). Thanks.

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [May 12, 2023, 5:30am UTC](https://hub.mender.io/t/radxa-compute-module-3/5785/6 "2023-05-12T05:30:40Z")

</div>

@gregszalay please check this branch: [GitHub - nandra/meta-mender-community at radxa-cm3-io](https://github.com/nandra/meta-mender-community/tree/radxa-cm3-io)

Please not that this change is necessary in meta-radxa in order to login using serial console:

```auto
--- a/conf/machine/radxa-cm3-io-rk3566.conf
+++ b/conf/machine/radxa-cm3-io-rk3566.conf
@@ -10,7 +10,7 @@ require conf/machine/include/soc-family.inc
 PREFERRED_PROVIDER_virtual/kernel = "linux-radxa-cm3-io"
 PREFERRED_VERSION_linux-rockchip = "4.19"

-SERIAL_CONSOLES = "1500000;ttyS2"
+SERIAL_CONSOLES = "1500000;ttyFIQ0"
 KERNEL_IMAGETYPE = "Image"
 KBUILD_DEFCONFIG = "rockchip_linux_defconfig"

```

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [May 12, 2023, 12:28pm UTC](https://hub.mender.io/t/radxa-compute-module-3/5785/7 "2023-05-12T12:28:18Z")

</div>

Hi @MarekBelisko,

Thanks for the update! What is your general gut feeling concerning the board support? Shall we try to get it into `meta-mender-community`, so I can add it to the autobuilds? Those are currently located at [Actions · TheYoctoJester/meta-mender-community · GitHub](https://github.com/TheYoctoJester/meta-mender-community/actions), but hopefully moved to the official repo soon-ish.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [May 12, 2023, 12:47pm UTC](https://hub.mender.io/t/radxa-compute-module-3/5785/8 "2023-05-12T12:47:59Z")

</div>

I’ll first post PR to meta-radxa, clean it up and then post PR for meta-mender-community so we should have it working 😉 in autobuilds. Thanks.
