# Is there any mender support for friendlyelec nanopi R5S device?

**URL:** <https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [April 17, 2023, 2:25am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767 "2023-04-17T02:25:59Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![chezgi](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/chezgi/32/1887_2.png) [@chezgi](https://hub.mender.io/u/chezgi)\
**Post date:** [April 17, 2023, 2:25am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/1 "2023-04-17T02:25:59Z")

</div>

i want to use nanopi r5s device, but its partition layout and final image creation process is confusing.  
it’s official image has 9 partitions that has diffrent partitions for kernel, dtb.

how can i use mender in this device?  
is such partitioning can be used by mender?  
or can i use mender partitioning for this device?

thanks

---

<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 17, 2023, 8:16am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/2 "2023-04-17T08:16:53Z")

</div>

Hi @chezgi,

Thanks for reaching out! What means are you planning to create the image? Looking at the [wiki](https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R5S), there seems to be no Yocto support, and I also could not spot anything in the various Rockchip-related public layers.

Once you have decided upon a strategy to proceed, you can look into integration details. I’m pretty sure the high partition count is just a particular design decision and you can replace it with a much simpler scheme.

The integration of Mender requires a bit of bootloader integration to do the A/B strategy, so you need a way to get that into your build at least. On top, Mender _prefers_ to have kernel and devicetree on the rootfs partition to make it self-contained for a system update. You can work around that, but its always error-prone and reduces the features you can use, so definitely discouraged.

Generally speaking, the support is best when going the Yocto route, probably you can get started by looking at [meta-rockchip](https://git.yoctoproject.org/meta-rockchip/about/) and [meta-mender-rockchip](https://github.com/mendersoftware/meta-mender-community/tree/kirkstone/meta-mender-rockchip). The latter requires bumping to `kirkstone` too, though. Maybe I can help with that.

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 17, 2023, 9:30am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/3 "2023-04-17T09:30:38Z")

</div>

I have meta-mender-rockchip updated to kirkstone as I’m currently working on support for rk3328 (rock-pi-e board) and push it shortly.

Quick look at meta-rockchip show that r5s device is not supported by mainline. Use proprietary u-boot can be tricky. Which layers do you use for building image ATM? 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 17, 2023, 10:22am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/4 "2023-04-17T10:22:25Z")

</div>

Please see PR here: [Rockchip kirkstone updates by nandra · Pull Request #336 · mendersoftware/meta-mender-community · GitHub](https://github.com/mendersoftware/meta-mender-community/pull/336)

---

<div class="post-metadata">

**Author:** ![chezgi](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/chezgi/32/1887_2.png) [@chezgi](https://hub.mender.io/u/chezgi)\
**Post date:** [April 17, 2023, 10:58am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/5 "2023-04-17T10:58:05Z")

</div>

i used meta-rockchip and some bbappend files for kernel and uboot in my layer.  
it creates kernel and uboot successfully.  
linux-rockchip\_5.10.bbappend:

```auto

SRC_URI = "git://github.com/friendlyarm/kernel-rockchip.git;protocol=https;nobranch=1;branch=nanopi5-v5.10.y_opt;"
SRCREV = "${AUTOREV}"

```

u-boot-rockchip.bbappend:

```auto

SRC_URI = " \
	git://github.com/friendlyarm/uboot-rockchip.git;protocol=https;branch=nanopi5-v2017.09;\
	git://github.com/JeffyCN/mirrors.git;protocol=https;branch=rkbin;name=rkbin;destsuffix=rkbin; \
"
SRCREV = "${AUTOREV}"

```

machine/nanopi-r5s.conf:

```auto
SOC_FAMILY ?= "rk3568"
PREFERRED_VERSION_linux-rockchip ?= "5.10%"
LINUXLIBCVERSION ?= "5.10-custom%"

require conf/machine/include/rockchip-arm64-common.inc

MALI_GPU := "bifrost-g52"
MALI_VERSION ?= "g2p0"

RK_ISP_VERSION := "2.1"

UBOOT_MACHINE = "nanopi5_defconfig"

RK_WIFIBT_FIRMWARES = ""

MACHINE_EXTRA_RRECOMMENDS:append = " \
	drm-cursor \
"

KERNEL_DEVICETREE = "rockchip/rk3568-nanopi5-rev01.dtb"

```

---

<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 17, 2023, 11:00am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/6 "2023-04-17T11:00:33Z")

</div>

> [@chezgi](#):
>
> meta-rockchip

Which one please? 🙂 See: [[yocto] [meta-rockchip] The various rockchip layers](https://yocto.yoctoproject.narkive.com/xMJhz63e/meta-rockchip-the-various-rockchip-layers)

I think you use Rockchip flavour with custom u-boot + kernel. Then I’ve asked also there: [Mender support · Issue #61 · JeffyCN/meta-rockchip · GitHub](https://github.com/JeffyCN/meta-rockchip/issues/61) 😃

---

<div class="post-metadata">

**Author:** ![chezgi](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/chezgi/32/1887_2.png) [@chezgi](https://hub.mender.io/u/chezgi)\
**Post date:** [April 17, 2023, 11:01am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/7 "2023-04-17T11:01:49Z")

</div>

> **[GitHub - JeffyCN/meta-rockchip: Yocto BSP layer for the Rockchip SOC boards](https://github.com/JeffyCN/meta-rockchip)**
>
> Yocto BSP layer for the Rockchip SOC boards. Contribute to JeffyCN/meta-rockchip development by creating an account on GitHub.

---

<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 17, 2023, 11:11am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/8 "2023-04-17T11:11:11Z")

</div>

As stated in commend on meta-rockchip you would need to use mainline u-boot instead of rockchip one. At least I’m not sure if this would be possible to backport to mainline u-boot.

---

<div class="post-metadata">

**Author:** ![chezgi](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/chezgi/32/1887_2.png) [@chezgi](https://hub.mender.io/u/chezgi)\
**Post date:** [April 17, 2023, 11:14am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/9 "2023-04-17T11:14:29Z")

</div>

> [@chezgi](#):
>
> ```auto
> SRC_URI = " \
> git://github.com/friendlyarm/uboot-rockchip.git;protocol=https;branch=nanopi5-v2017.09;\
> git://github.com/JeffyCN/mirrors.git;protocol=https;branch=rkbin;name=rkbin;destsuffix=rkbin; \
> "
> 
> ```

i used u-boot provided by friendlyarm, and rockchip version not used here.

---

<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 17, 2023, 11:46am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/10 "2023-04-17T11:46:47Z")

</div>

Looks like friendly-arm just forked rockchip u-boot: [uboot-rockchip/Makefile at nanopi4-v2017.09 · friendlyarm/uboot-rockchip · GitHub](https://github.com/friendlyarm/uboot-rockchip/blob/nanopi4-v2017.09/Makefile) (version is same as for rockchip uboot).

---

<div class="post-metadata">

**Author:** ![chezgi](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/chezgi/32/1887_2.png) [@chezgi](https://hub.mender.io/u/chezgi)\
**Post date:** [April 17, 2023, 11:48am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/11 "2023-04-17T11:48:37Z")

</div>

> [@chezgi](#):
>
> `branch=nanopi5-v2017.09`

use `nanopi5-v2017.09` branch for r5s  
This branch is [2399 commits ahead](https://github.com/friendlyarm/uboot-rockchip/compare/nanopi4-v2017.09...nanopi5-v2017.09), [7 commits behind](https://github.com/friendlyarm/uboot-rockchip/compare/nanopi5-v2017.09...nanopi4-v2017.09) nanopi4-v2017.09.

---

<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 17, 2023, 12:19pm UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/12 "2023-04-17T12:19:04Z")

</div>

OK it’s same 2017.09 u-boot

---

<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 18, 2023, 5:58am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/13 "2023-04-18T05:58:15Z")

</div>

@chezgi I’ll try to integrate mender to my radxa board which using same u-boot but earliest next week can start looking into it 😉

---

<div class="post-metadata">

**Author:** ![chezgi](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/chezgi/32/1887_2.png) [@chezgi](https://hub.mender.io/u/chezgi)\
**Post date:** [April 18, 2023, 8:01am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/14 "2023-04-18T08:01:09Z")

</div>

thanks @MarekBelisko, i will wait for it.

---

<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:38pm UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/15 "2023-04-24T19:38:27Z")

</div>

@chezgi please check radxa integration: [Preliminary radxa support · nandra/meta-mender-community@96d3dde · GitHub](https://github.com/nandra/meta-mender-community/commit/96d3ddef5c5acd9e0e49b7b0d8016581aed14aea) You can get some inspiration how to do it for your board.

---

<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, 6:39am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/16 "2023-04-25T06:39:17Z")

</div>

Also this for config: [Radxa Compute Module 3 - #3 by MarekBelisko](https://hub.mender.io/t/radxa-compute-module-3/5785/3)

---

<div class="post-metadata">

**Author:** ![chezgi](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/chezgi/32/1887_2.png) [@chezgi](https://hub.mender.io/u/chezgi)\
**Post date:** [May 29, 2023, 5:32am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/17 "2023-05-29T05:32:24Z")

</div>

thanks @MarekBelisko for your helps,  
I apologize for the late reply.  
I am currently working on another field.  
🙏

---

<div class="post-metadata">

**Author:** ![guptashubham101](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/guptashubham101/32/1967_2.png) [@guptashubham101](https://hub.mender.io/u/guptashubham101)\
**Post date:** [August 9, 2023, 12:52am UTC](https://hub.mender.io/t/is-there-any-mender-support-for-friendlyelec-nanopi-r5s-device/5767/18 "2023-08-09T00:52:46Z")

</div>

Hi, I am using Friendlyelec armhf OS version with these details -  
No LSB modules are available.  
Distributor ID: Ubuntu  
Description: Ubuntu 16.04.5 LTS  
Release: 16.04  
Codename: xenial

I have added few files in this system and trying to create an image of the same OS. Following are the details -  
udev 390M 0 390M 0% /dev  
tmpfs 98M 6.0M 92M 7% /run  
overlay 3.2G 3.0G 37M 99% /  
tmpfs 492M 0 492M 0% /dev/shm  
tmpfs 5.0M 4.0K 5.0M 1% /run/lock  
tmpfs 492M 0 492M 0% /sys/fs/cgroup  
tmpfs 99M 4.0K 99M 1% /run/user/1000  
/dev/mmcblk0p1 60M 13M 43M 23% /media/pi/boot1  
tmpfs 99M 0 99M 0% /run/user/0

I am trying to create the custom image of my OS version but the resultant image is not bootable.  
I am using the following command to create the image = sudo dd if=/dev/mmcblk0 of=/home/myimage.img

Any help would be appreciated.  
Thanks
