Balena-allwinnner fails for orange-pi-lite

I’m attempting to build an orange-pi-lite using the balena-allwinner repo, but I’m getting an error I don’t know how to fix. Has anyone seen this or know how to correct it?

|   HOSTLD  scripts/mod/modpost

| NOTE: make -j 12 HOSTCC=gcc -isystem/home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.17.3-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.17.3-r0/recipe-sysroot-native/usr/lib -L/home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.17.3-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.17.3-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.17.3-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.17.3-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.17.3-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,–allow-shlib-undefined -Wl,–dynamic-linker=/home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E overlay/sun8i-h3-analog-codec.dtbo
| make[2]: *** No rule to make target ‘overlay/sun8i-h3-analog-codec.dtbo’. 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: /home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.17.3-r0/temp/run.do_compile.924:1 exit 1 from ‘exit 1’
| ERROR: Function failed: do_compile (log file is located at /home/builder/Code/Yocto/Balena.io/balena-allwinner/build/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.17.3-r0/temp/log.do_compile.924)

Hi, can you describe what you have tried in details? (what commands you run…)

I checked out the warrior_update branch of the balena-allwinner meta repo (but have also run into this same problem using a 16.04 Docker image on the master/sumo branch) and to the following:

$ source layers/poky/oe-init-build-env

$ MACHINE=orange-pi-lite bitbake linux-mainline

Build Configuration:
BB_VERSION = “1.42.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “arm-poky-linux-gnueabi”
MACHINE = “orange-pi-lite”
DISTRO = “balena-os”
DISTRO_VERSION = “2.41.1”
TUNE_FEATURES = “arm vfp cortexa7 neon vfpv4 callconvention-hard”
TARGET_FPU = “hard”
meta
meta-poky = “HEAD:6d2e12e79211b31cdf5ea824fb9a8be54ba9a9eb”
meta-oe
meta-filesystems
meta-networking
meta-python = “HEAD:3bdbf72e3a4bf18a4a2c7afbde4f7ab773aeded9”
meta-sunxi = “HEAD:345cd0d0237bdacd129a941dba5075cc07f31e6f”
meta-balena-common
meta-balena-warrior = “HEAD:350e17ed76bd6aba481d7b454a408ba67f0911ce”
meta-balena-allwinner = “warrior_update:9dd3fc9efa24f02cb670d4b40366aec0cb09a7bc”
meta-rust = “HEAD:84710b341be53cc2af13ecc8ae87773cf84687bf”

Initialising tasks: 100% |###########################################################################################| Time: 0:00:00
Sstate summary: Wanted 18 Found 7 Missed 11 Current 475 (38% match, 97% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: linux-mainline-4.19.63-r0 do_compile: oe_runmake failed
ERROR: linux-mainline-4.19.63-r0 do_compile: Function failed: do_compile (log file is located at /home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/temp/log.do_compile.31226)
ERROR: Logfile of failure stored in: /home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/temp/log.do_compile.31226
Log data follows:

DEBUG: Executing shell function do_compile
NOTE: make -j 12 HOSTCC=gcc -isystem/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/lib -L/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/lib -Wl,–enable-new-dtags -Wl,-rpath-link,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,–allow-shlib-undefined -Wl,–dynamic-linker=/home/builder/Code/Yocto/Shared/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E uImage CC=arm-poky-linux-gnueabi-gcc -fuse-ld=bfd -fmacro-prefix-map=/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0=/usr/src/debug/linux-mainline/4.19.63-r0 -fdebug-prefix-map=/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0=/usr/src/debug/linux-mainline/4.19.63-r0 -fdebug-prefix-map=/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot= -fdebug-prefix-map=/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/builder/Code/Yocto/Shared/tmp/work-shared/orange-pi-lite/kernel-source=/usr/src/kernel LD=arm-poky-linux-gnueabi-ld.bfd LOADADDR=0x40008000
GEN ./Makefile
scripts/kconfig/conf --syncconfig Kconfig
GEN ./Makefile
Using /home/builder/Code/Yocto/Shared/tmp/work-shared/orange-pi-lite/kernel-source as source for kernel
CC scripts/mod/empty.o
CC scripts/mod/devicetable-offsets.s
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CALL /home/builder/Code/Yocto/Shared/tmp/work-shared/orange-pi-lite/kernel-source/scripts/checksyscalls.sh
CHK include/generated/compile.h
GZIP kernel/config_data.gz
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
Kernel: arch/arm/boot/uImage is ready
NOTE: make -j 12 HOSTCC=gcc -isystem/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/lib -L/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/lib -Wl,–enable-new-dtags -Wl,-rpath-link,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,–allow-shlib-undefined -Wl,–dynamic-linker=/home/builder/Code/Yocto/Shared/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E sun8i-h3-orangepi-lite.dtb
GEN ./Makefile
scripts/kconfig/conf --syncconfig Kconfig
CC scripts/mod/empty.o
CC scripts/mod/devicetable-offsets.s
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
NOTE: make -j 12 HOSTCC=gcc -isystem/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/lib -L/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/lib -Wl,–enable-new-dtags -Wl,-rpath-link,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,–allow-shlib-undefined -Wl,–dynamic-linker=/home/builder/Code/Yocto/Shared/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E overlay/sun8i-h3-analog-codec.dtbo
make[2]: *** No rule to make target ‘overlay/sun8i-h3-analog-codec.dtbo’. Stop.
make[1]: *** [Makefile:146: sub-make] Error 2
make: *** [Makefile:24: __sub-make] Error 2
ERROR: oe_runmake failed
WARNING: /home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/temp/run.do_compile.31226:1 exit 1 from ‘exit 1’
ERROR: Function failed: do_compile (log file is located at /home/builder/Code/Yocto/Shared/tmp/work/orange_pi_lite-poky-linux-gnueabi/linux-mainline/4.19.63-r0/temp/log.do_compile.31226)
ERROR: Task (/home/builder/Code/Yocto/Balena.io/balena-allwinner.warrior/build/…/layers/meta-sunxi/recipes-kernel/linux/linux-mainline_4.19.63.bb:do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 1487 tasks of which 1486 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/builder/Code/Yocto/Balena.io/balena-allwinner.warrior/build/…/layers/meta-sunxi/recipes-kernel/linux/linux-mainline_4.19.63.bb:do_compile
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Hey, we expect the following pull request will fix the issue you’re observing: https://github.com/balena-os/balena-allwinner/pull/84. Can you give the patch a go perhaps and see if it fixes it?

I’ve tried the latest warrior_update branch and am still getting the same error. Trying to merge in the PR into master doesn’t seem to work as it get complaints about the layer compatibility, even after I try to sync submodules.

Commit 2cf0d9452b51b1105675943e98cb05f0cf19fadc seemed to work, but I had to edit a bbappend file to remove a patch conflict:


 diff --git a/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline_%.bbappend b/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline_%.bbappend
index 2e47bb5..d4e57ae 100644
--- a/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline_%.bbappend
+++ b/layers/meta-balena-allwinner/recipes-kernel/linux/linux-mainline_%.bbappend
@@ -2,9 +2,6 @@ inherit kernel-resin
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-mainline:"
-SRC_URI_append = " file://0001-Enable-uart3-for-NanoPi-Neo-Air-used-by-BT.patch \
-"

Glad you got it working. Please keep us updated on your progress :+1: