Orange-pi-zero

Hello to everyone.
I’m trying to use meta-mender-core on the orange-pi-zero.

[user@localhost build]$ bitbake-layers show-layers
NOTE: Starting bitbake server...
layer                 path                                      priority
==========================================================================
meta                  /yoctoproject/warriorVersion/poky/meta  5
meta-poky             /yoctoproject/warriorVersion/poky/meta-poky  5
meta-yocto-bsp        /yoctoproject/warriorVersion/poky/meta-yocto-bsp  5
meta-oe               /yoctoproject/warriorVersion/meta-openembedded/meta-oe  6
meta-sunxi            /yoctoproject/warriorVersion/meta-sunxi  10
meta-mender-core      /yoctoproject/warriorVersion/meta-mender/meta-mender-core  6
meta-mender-demo      /yoctoproject/warriorVersion/meta-mender/meta-mender-demo  10

in my conf/local.conf, as suggested in the documentation i added:
MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"

When i bitbake the image i get this error:

ERROR: grub-efi-native-2.02-r0 do_compile: oe_runmake failed
ERROR: grub-efi-native-2.02-r0 do_compile: Function failed: do_compile

ERROR: Logfile of failure stored in: /yoctoproject/warriorVersion/build/tmp/work/x86_64-linux/grub-efi-native/2.02-r0/temp/log.do_compile.31086
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 8
| make: *** No targets specified and no makefile found.  Stop.
| ERROR: oe_runmake failed
| WARNING: /yoctoproject/warriorVersion/build/tmp/work/x86_64-linux/grub-efi-native/2.02-r0/temp/run.do_compile.31086:1 exit 1 from 'exit 1'
| ERROR: Function failed: do_compile (log file is located at /yoctoproject/warriorVersion/build/tmp/work/x86_64-linux/grub-efi-native/2.02-r0/temp/log.do_compile.31086)
ERROR: Task (virtual:native:/yoctoproject/warriorVersion/poky/meta/recipes-bsp/grub/grub-efi_2.02.bb:do_compile) failed with exit code '1'

So, even if i configura that i don’t want to use grub, meta-mender use that.

Someone can help me?

Can you pls try to run bitbake -e | grep ^MENDER_FEATURES to see the list of features?

[user@localhost build]$ MACHINE=orange-pi-zero bitbake -e core-image-minimal | grep “^MENDER_FEATURES”
MENDER_FEATURES_DISABLE=" mender-grub mender-image-uefi"
MENDER_FEATURES_ENABLE=" mender-uboot mender-image-sd mender-grub mender-image mender-image-uefi mender-install mender-systemd mender-growfs-data "

MENDER_FEATURES_ENABLE and DISABLE actually end up in DISTRO_FEATURES, so you will need to search for that instead of MENDER_FEATURES.

[user@localhost build]$ MACHINE=orange-pi-zero bitbake -e core-image-minimal | grep “^DISTRO_FEATURES”
DISTRO_FEATURES=“acl alsa argp bluetooth ext2 ipv4 ipv6 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 ${DISTRO_FEATURES_LIBC} largefile opengl ptest multiarch wayland vulkan systemd pulseaudio bluez5 gobject-introspection-data ldconfig mender-uboot mender-image-sd mender-image mender-install mender-systemd mender-growfs-data”
DISTRO_FEATURES_BACKFILL=“pulseaudio sysvinit bluez5 gobject-introspection-data ldconfig mender-uboot mender-image-sd mender-grub mender-image mender-image-uefi mender-install mender-systemd mender-growfs-data systemd”
DISTRO_FEATURES_BACKFILL_CONSIDERED=" sysvinit mender-grub mender-image-uefi sysvinit"
DISTRO_FEATURES_DEFAULT=“acl alsa argp bluetooth ext2 ipv4 ipv6 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11”
DISTRO_FEATURES_FILTER_NATIVE=“api-documentation”
DISTRO_FEATURES_FILTER_NATIVESDK=“api-documentation”
DISTRO_FEATURES_NATIVE=“x11 ipv6 xattr”
DISTRO_FEATURES_NATIVESDK=“x11”

I deleted the tmp folder and re-run bitbake.
Now bitbake finish without errors.
I will wait till i’m sure everything works fine before i close this thread.
For now, thank you very much to @kacf and even more thank you to @MarekBelisko for this : https://www.yoctoproject.org/pipermail/yocto/2018-January/039576.html

1 Like

I have to correct my previously message… bitbake doesn’t finish without errors.
I would like to have mender working on the orange-pi-zero with yocto warrior but it seams to be impossible for me.

I get this error:

[demo@localhost build]$ MACHINE=orange-pi-zero bitbake core-image-minimal
Loading cache: 100% |##########################################################################################################################################################################################################| Time: 0:00:00
Loaded 2239 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = “1.42.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “arm-poky-linux-gnueabi”
MACHINE = “orange-pi-zero”
DISTRO = “poky”
DISTRO_VERSION = “2.7.2”
TUNE_FEATURES = “arm armv7ve vfp thumb neon callconvention-hard”
TARGET_FPU = “hard”
meta
meta-poky
meta-yocto-bsp = “HEAD:d0f73121551dc98f6924cd77952bf9ebf5ef3dd7”
meta-oe = “warrior:a24acf94d48d635eca668ea34598c6e5c857e3f8”
meta-sunxi = “warrior:345cd0d0237bdacd129a941dba5075cc07f31e6f”
meta-mender-core
meta-mender-demo = “HEAD:9650b37762443f01cf694deb1e00417751a2a719”

Initialising tasks: 100% |#####################################################################################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 136 Found 119 Missed 17 Current 854 (87% match, 98% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: u-boot-2_v2018.09+gitAUTOINC+f88b6facb8-r0 do_mender_uboot_auto_configure: Function failed: do_mender_uboot_auto_configure (log file is located at /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/temp/log.do_mender_uboot_auto_configure.18843)
ERROR: Logfile of failure stored in: /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/temp/log.do_mender_uboot_auto_configure.18843
Log data follows:
| DEBUG: Executing shell function do_mender_uboot_auto_configure
| If at any point you get an unexpanded variable, there is probably an argument
| you haven’t given.
| + SUB_X=-x
| + set -u
| + rm -rf /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/tmp-src
| ++ dirname /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/tmp-src
| + mkdir -p /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0
| + cp -r /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/git /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/tmp-src
| + cd /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/tmp-src
| + make ‘HOSTCC=gcc -DMENDER_AUTO_PROBING’ ‘CC=arm-poky-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/recipe-sysroot -DMENDER_AUTO_PROBING’ orangepi_zero_defconfig
| HOSTCC scripts/basic/fixdep
| HOSTCC scripts/kconfig/conf.o
| YACC scripts/kconfig/zconf.tab.c
| LEX scripts/kconfig/zconf.lex.c
| HOSTCC scripts/kconfig/zconf.tab.o
| HOSTLD scripts/kconfig/conf
| #
| # configuration written to .config
| #
| + grep -q ‘^tools-all: *env\b’ Makefile
| + grep -q ‘^tools-all: envtools\b’ Makefile
| + ENV_TARGET=envtools
| + ‘[’ -z envtools ‘]’
| + bash -x /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/uboot_auto_patch.sh --patch-config-file
| + UBI=0
| +++ dirname /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/uboot_auto_patch.sh
| ++ readlink -f /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0
| + SCRIPT_DIR=/run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0
| + ‘[’ -z --patch-config-file ‘]’
| + ‘[’ --patch-config-file = -h ‘]’
| + ‘[’ --patch-config-file = --help ‘]’
| + set -e
| + ‘[’ --patch-config-file = --patch-config-file ‘]’
| + ‘[’ 1 -gt 1 ‘]’
| + sed -i -e 's/^[ \t]
#[ \t]*define[ \t]CONFIG_FILE\b./#define CONFIG_FILE “fw_env.config”/’ tools/env/fw_env.h tools/env/fw_env_private.h
| + exit 0
| + make ‘HOSTCC=gcc -DMENDER_AUTO_PROBING’ ‘CC=gcc -DMENDER_AUTO_PROBING’ envtools
| scripts/kconfig/conf --syncconfig Kconfig
| CHK include/config.h
| UPD include/config.h
| CFG u-boot.cfg
| GEN include/autoconf.mk
| GEN include/autoconf.mk.dep
| CFG spl/u-boot.cfg
| GEN spl/include/autoconf.mk
| CHK include/config/uboot.release
| UPD include/config/uboot.release
| CHK include/generated/version_autogenerated.h
| UPD include/generated/version_autogenerated.h
| CHK include/generated/timestamp_autogenerated.h
| UPD include/generated/timestamp_autogenerated.h
| LD tools/env/built-in.o
| HOSTCC tools/env/crc32.o
| HOSTCC tools/env/ctype.o
| HOSTCC tools/env/env_attr.o
| HOSTCC tools/env/env_flags.o
| HOSTCC tools/env/fw_env.o
| HOSTCC tools/env/linux_string.o
| AR tools/env/lib.a
| HOSTCC tools/env/fw_env_main.o
| HOSTLD tools/env/fw_printenv
| STRIP tools/env/fw_printenv
| ++ printf %d 0x20000
| + dd if=/dev/zero of=fake-env.txt count=1 bs=131072
| 1+0 records in
| 1+0 records out
| 131072 bytes (131 kB, 128 KiB) copied, 9.3795e-05 s, 1.4 GB/s
| + cat
| + mkdir -p fw_printenv.lock
| + ret=0
| + tools/env/fw_printenv -l fw_printenv.lock
| Warning: Bad CRC, using default environment
| + rm -rf fw_printenv.lock
| + ‘[’ 0 -ne 0 ‘]’
| + make ‘HOSTCC=gcc -DMENDER_AUTO_PROBING’ ‘CC=arm-poky-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/recipe-sysroot -DMENDER_AUTO_PROBING’ cmd/version.o
| CHK include/config/uboot.release
| CHK include/generated/version_autogenerated.h
| UPD include/generated/version_autogenerated.h
| CHK include/generated/timestamp_autogenerated.h
| UPD include/generated/timestamp_autogenerated.h
| CC lib/asm-offsets.s
| CHK include/generated/generic-asm-offsets.h
| UPD include/generated/generic-asm-offsets.h
| CC arch/arm/lib/asm-offsets.s
| CHK include/generated/asm-offsets.h
| UPD include/generated/asm-offsets.h
| SHIPPED scripts/dtc/pylibfdt/libfdt.i
| PYMOD scripts/dtc/pylibfdt/_libfdt.so
| scripts/dtc/pylibfdt/libfdt_wrap.c:149:11: fatal error: Python.h: No such file or directory
| 149 | # include <Python.h>
| | ^~~~~~~~~~
| compilation terminated.
| error: command ‘gcc’ failed with exit status 1
| make[3]: *** [scripts/dtc/pylibfdt/Makefile:27: scripts/dtc/pylibfdt/_libfdt.so] Error 1
| make[2]: *** [scripts/Makefile.build:434: scripts/dtc/pylibfdt] Error 2
| make[1]: *** [scripts/Makefile.build:434: scripts/dtc] Error 2
| make: *** [Makefile:508: scripts] Error 2
| WARNING: /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/temp/run.do_mender_uboot_auto_configure.18843:1 exit 2 from ‘env BUILDCC="gcc " ./uboot_auto_configure.sh --config=$MENDER_UBOOT_MACHINE --src-dir=/run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/git --tmp-dir=/run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/tmp-src --kconfig-fragment=/run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/git/mender_Kconfig_fragment --debug’
| ERROR: Function failed: do_mender_uboot_auto_configure (log file is located at /run/media/demo/Data/yoctoproject/warriorVersion/build/tmp/work/orange_pi_zero-poky-linux-gnueabi/u-boot/2_v2018.09+gitAUTOINC+f88b6facb8-r0/temp/log.do_mender_uboot_auto_configure.18843)
ERROR: Task (/run/media/demo/Data/yoctoproject/warriorVersion/meta-sunxi/recipes-bsp/u-boot/u-boot_2018.09.bb:do_mender_uboot_auto_configure) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 3092 tasks of which 3091 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/run/media/demo/Data/yoctoproject/warriorVersion/meta-sunxi/recipes-bsp/u-boot/u-boot_2018.09.bb:do_mender_uboot_auto_configure
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
[demo@localhost build]$

I tried to use meta-mender-community/meta-mender-sunxi; i manage to compile without errors but the image doesn’t start (i think because the u-boot is written in a wrong position but i’m not sure about this):
[root@localhost ~]# fdisk -l /dev/sda
Disk /dev/sda: 14,9 GiB, 15931539456 bytes, 31116288 sectors
Disk model: STORAGE DEVICE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb5c72dd6

Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sda1 * 49152 81919 32768 16M c W95 FAT32 (LBA)
/dev/sda2 81920 524287 442368 216M 83 Linux
/dev/sda3 524288 966655 442368 216M 83 Linux
/dev/sda4 966656 1228799 262144 128M 83 Linux

I don’t know how to go on with trying or studying…

So first attempt was using meta-sunxi and second meta-mender-community? I added support for this board and was working fine. Let me refresh it with warrior. I’ll get back to you. Thanks.

Oh, it would be really cool.

Thank you very much.