# OrangePi Zero Plus2

**URL:** <https://hub.mender.io/t/orangepi-zero-plus2/2623>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [October 6, 2020, 12:23pm UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623 "2020-10-06T12:23:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![chetferry](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@chetferry](https://hub.mender.io/u/chetferry)\
**Post date:** [October 6, 2020, 12:23pm UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623/1 "2020-10-06T12:23:42Z")

</div>

Has anyone tried to integrate Mender into the the OrangePi Zero Plus2?

# Board description

OrangePi Zero Plus2

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/8d55e8f57585dc3b25dad9e641ebd2c2faa92ea5.jpeg)

> **[Orange Pi Zero Plus2 - Orangepi](http://www.orangepi.org/OrangePiZeroPlus2/)**

> **[Xunlong Orange Pi Zero Plus 2 - linux-sunxi.org](https://linux-sunxi.org/Xunlong_Orange_Pi_Zero_Plus_2)**

---

<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:** [October 6, 2020, 12:45pm UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623/2 "2020-10-06T12:45:05Z")

</div>

I have mender running on Pi Zero without issue so I think Plus2 should be supported also if there is in meta-sunxi proper machine. Please check how it’s build for zero: [OrangePi Zero](https://hub.mender.io/t/orangepi-zero/142)

---

<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:** [October 6, 2020, 7:52pm UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623/3 "2020-10-06T19:52:40Z")

</div>

OK proceed how build is described in [OrangePi Zero](https://hub.mender.io/t/orangepi-zero/142) and in command `MACHINE=orange-pi-zero` use `MACHINE=orange-pi-zero-plus2` and it should work. Thanks.

---

<div class="post-metadata">

**Author:** ![chetferry](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@chetferry](https://hub.mender.io/u/chetferry)\
**Post date:** [October 7, 2020, 6:20pm UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623/4 "2020-10-07T18:20:01Z")

</div>

I will give it a try and report back. 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:** [October 7, 2020, 6:31pm UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623/5 "2020-10-07T18:31:44Z")

</div>

OK thanks pls let us know we can then create board integration based on your input 👍

---

<div class="post-metadata">

**Author:** ![chetferry](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@chetferry](https://hub.mender.io/u/chetferry)\
**Post date:** [October 8, 2020, 4:20am UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623/6 "2020-10-08T04:20:27Z")

</div>

I get the following error when attempting to build:

```auto
| GEN ./Makefile
| scripts/kconfig/conf --silentoldconfig Kconfig
| make[2]: *** No rule to make target 'zImage'. Stop.
| Makefile:146: recipe for target 'sub-make' failed
| make[1]: *** [sub-make] Error 2
| Makefile:24: recipe for target '__sub-make' failed
| make: *** [__sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/chet/dev/mender-orangepi/build/tmp/work/orange_pi_zero_plus2-poky-linux/linux-mainline/4.16.13-r0/temp/log.do_compile.10495)

```

If I comment out this line in local.conf

KERNEL\_IMAGETYPE ?= “zImage”

it does successfully build, but I cannot get my board to boot from SD card. It ignores the SD card and boots from emmc. I tried changing local.conf like this also:

```auto
# NanoPi, mmc index differs in U-boot and Linux. This configuration is for uSD.

# MENDER_STORAGE_DEVICE_nanopi-m1-plus = "/dev/mmcblk1"

# MENDER_UBOOT_STORAGE_DEVICE_nanopi-m1-plus = "0"

# NanoPi, uncomment this for eMMC. Remember to remove above!

MENDER_STORAGE_DEVICE_nanopi-m1-plus = "/dev/mmcblk3"

MENDER_UBOOT_STORAGE_DEVICE_nanopi-m1-plus = "1"

```

That did not make a difference. Any suggestions? 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:** [October 8, 2020, 5:27am UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623/7 "2020-10-08T05:27:25Z")

</div>

Please try change:

```auto
KERNEL_IMAGETYPE ?= "uImage"

```

and in `meta-mender-community/meta-mender-sunxi/recipes-bsp/u-boot/files/arm/boot.scr` change to

```auto
run mender_setup;
setenv bootargs console=${console} console=tty1 root=${mender_kernel_root} rootwait panic=10 ${extra}
mmc dev ${mender_uboot_dev}
load ${mender_uboot_root} ${fdt_addr_r} /boot/${fdtfile}
load ${mender_uboot_root} ${kernel_addr_r} /boot/uImage
bootm ${kernel_addr_r} - ${fdt_addr_r}
run mender_try_to_recover

```

and see if it helps. Are you using dunfell release? You can maybe first try to first build an image without mender and check if board boots at all (I had an issue with orangepi zero that u-boot 2020.01 was failing and need patch). Thanks.

---

<div class="post-metadata">

**Author:** ![chetferry](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@chetferry](https://hub.mender.io/u/chetferry)\
**Post date:** [October 9, 2020, 12:56am UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623/8 "2020-10-09T00:56:06Z")

</div>

Similar error if I change zImage to uImage … Any other suggestions? Thanks.

.16.13=/kernel-source/ LD=aarch64-poky-linux-ld.bfd LOADADDR=0x40008000  
| make[2]: \*\*\* No rule to make target ‘uImage’. Stop.  
| Makefile:146: recipe for target ‘sub-make’ failed  
| make[1]: \*\*\* [sub-make] Error 2  
| Makefile:24: recipe for target ‘\_\_sub-make’ failed  
| make: \*\*\* [\_\_sub-make] Error 2  
| ERROR: oe\_runmake failed  
| WARNING: exit code 1 from a shell command.  
| ERROR: Function failed: do\_compile (log file is located at /home/chet/dev/mender-orangepi/build/tmp/work/orange\_pi\_zero\_plus2-poky-linux/linux-mainline/4.16.13-r0/temp/log.do\_compile.15749)

---

<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:** [October 9, 2020, 6:01am UTC](https://hub.mender.io/t/orangepi-zero-plus2/2623/9 "2020-10-09T06:01:59Z")

</div>

Oh this is 64bit architecture. Then `KERNEL_IMAGETYPE=Image` Thanks.
