Hello Mender Community!
I am working on integrating the Radxa Compute Module 3 with Mender. I am using yocto kirkstone.
In the base project, I use the meta-radxa repo (I use a version that is converted to kirkstone), which is using the radxa/u-boot 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.
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
Here you can also find the boot.cmd and kas.yml 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:
- 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.
- 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.
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.
1 Like
@gregszalay please check: Preliminary radxa support · nandra/meta-mender-community@96d3dde · GitHub
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:
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"
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
@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.
@gregszalay please check this branch: GitHub - nandra/meta-mender-community at radxa-cm3-io
Please not that this change is necessary in meta-radxa in order to login using serial console:
--- 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"
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, but hopefully moved to the official repo soon-ish.
Greetz,
Josef
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.
1 Like