Custom build for beaglebone not working

Raspberrypi3 custom build guide in https://www.balena.io/os/docs/custom-build/ builds ok, although some package downloads had checksum failures which forced me to manually wget them in to the downloads folder and keep rebuilding (no idea why or if there is another way to fix this).

My question however, is I want to do build a custom beaglebone image. There is a balenaos repository for beaglebone at https://github.com/balena-os/balena-beaglebone, unfortunately though the meta-rust package keeps failing (error on unpacking crate)

Any ideaā€™s on how to resolve would be most welcome.

HI, can you show me the full error message please?

Hi wrboyce, here is the error, do you need the log file too? Iā€™m new to Yocto, but maybe itā€™s possible to use my working Yocto build and replace the rpi3 bsp with beaglebone and rebuild?

./balena-yocto-scripts/build/barys -m beaglebone
Building JSON manifestā€¦
audited 3 packages in 1.148s
found 0 vulnerabilities

ā€¦Done


| |__ __ | | ___ _ __ __ _ / _ / |
| ā€™
\ / | |/ _ \ '_ \ / _ | | | _

| |
) | (
| | | / | | | (| | || |) |
|
./ _,|_|_|| ||_,|___/|____/


Resin specific images available:
resin-image
resin-image-flasher

BeagleBoard-XM (EXPERIMENTAL) : MACHINE=beagleboard-xm bitbake resin-image BeagleBone Green (EXPERIMENTAL) : MACHINE=beaglebone-green bitbake resin-image-flasher
BeagleBone Green Wireless (EXPERIMENTAL) : MACHINE=beaglebone-green-wifi bitbake resin-image-flasher BeagleBone Black : MACHINE=beaglebone bitbake resin-image-flasher
PocketBeagle (EXPERIMENTAL) : $ MACHINE=beaglebone-pocket bitbake resin-image

[000000005][LOG]BalenaOS build initialized in directory: build.
[000000005][LOG]Run build for beaglebone: MACHINE=beaglebone bitbake resin-image-flasher
[000000005][LOG]This might take a while ā€¦
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
Loading cache: 100% |########################################################################################################################################################################| Time: 0:00:01
Loaded 3409 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = ā€œ1.40.0ā€
BUILD_SYS = ā€œx86_64-linuxā€
NATIVELSBSTRING = ā€œuniversalā€
TARGET_SYS = ā€œarm-poky-linux-gnueabiā€
MACHINE = ā€œbeagleboneā€
DISTRO = ā€œbalena-osā€
DISTRO_VERSION = ā€œ2.46.1ā€
TUNE_FEATURES = ā€œarm armv7a vfp thumb neon callconvention-hardā€
TARGET_FPU = ā€œhardā€
meta
meta-poky = ā€œHEAD:cb26830f765f03309c0663352cc5849491271be8ā€
meta-oe
meta-filesystems
meta-networking
meta-python = ā€œHEAD:2d088d252624b19df384aecc434d23afb636178fā€
meta-ti = ā€œHEAD:727411f95ef1f66034beac08702f21b30a1b84c9ā€
meta-balena-common
meta-balena-thud = ā€œmaster:f2295d2b9fc9b8993b7264a5144a7051184ee61cā€
meta-balena-beaglebone = ā€œmaster:a8518cfd2c410ee1fe7bdc16f00e839f92be6c43ā€
meta-rust = ā€œHEAD:84710b341be53cc2af13ecc8ae87773cf84687bfā€

Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:06
Sstate summary: Wanted 1136 Found 2 Missed 1134 Current 248 (0% match, 18% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: glibc-locale-2.28-r0 do_package: Function failed: do_prep_locale_tree (log file is located at /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/temp/log.do_package.13365)
ERROR: Logfile of failure stored in: /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/temp/log.do_package.13365
Log data follows:
| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [ā€™/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-devtools/binutils/binutils-cross_2.31.bb:do_populate_sysrootā€™, ā€˜virtual:native:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb:do_populate_sysrootā€™, ā€˜/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-core/glibc/cross-localedef-native_2.28.bb:do_populate_sysrootā€™, ā€˜virtual:native:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysrootā€™, ā€˜virtual:native:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb:do_populate_sysrootā€™]
| NOTE: Installed into sysroot:
| NOTE: Skipping as already exists in sysroot: [ā€˜binutils-cross-armā€™, ā€˜dwarfsrcfiles-nativeā€™, ā€˜cross-localedef-nativeā€™, ā€˜pseudo-nativeā€™, ā€˜rpm-nativeā€™, ā€˜automake-nativeā€™, ā€˜libtool-nativeā€™, ā€˜quilt-nativeā€™, ā€˜autoconf-nativeā€™, ā€˜gnu-config-nativeā€™, ā€˜systemd-systemctl-nativeā€™, ā€˜make-nativeā€™, ā€˜gcc-cross-initial-armā€™, ā€˜bison-nativeā€™, ā€˜gperf-nativeā€™, ā€˜libgcc-initialā€™, ā€˜linux-libc-headersā€™, ā€˜glibc-initialā€™, ā€˜texinfo-dummy-nativeā€™, ā€˜zlib-nativeā€™, ā€˜flex-nativeā€™, ā€˜elfutils-nativeā€™, ā€˜bzip2-nativeā€™, ā€˜file-nativeā€™, ā€˜pkgconfig-nativeā€™, ā€˜libarchive-nativeā€™, ā€˜xz-nativeā€™, ā€˜python3-nativeā€™, ā€˜nss-nativeā€™, ā€˜popt-nativeā€™, ā€˜gettext-minimal-nativeā€™, ā€˜db-nativeā€™, ā€˜dbus-nativeā€™, ā€˜m4-nativeā€™, ā€˜mpfr-nativeā€™, ā€˜gmp-nativeā€™, ā€˜libmpc-nativeā€™, ā€˜e2fsprogs-nativeā€™, ā€˜lzo-nativeā€™, ā€˜gdbm-nativeā€™, ā€˜openssl-nativeā€™, ā€˜readline-nativeā€™, ā€˜sqlite3-nativeā€™, ā€˜nspr-nativeā€™, ā€˜expat-nativeā€™, ā€˜util-linux-nativeā€™, ā€˜attr-nativeā€™, ā€˜ncurses-nativeā€™]
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function do_package
| DEBUG: Executing python function package_get_auto_pr
| DEBUG: Python function package_get_auto_pr finished
| DEBUG: Executing python function perform_packagecopy
| DEBUG: Python function perform_packagecopy finished
| DEBUG: Executing python function split_and_strip_files
| DEBUG: Python function split_and_strip_files finished
| DEBUG: Executing python function fixup_perms
| DEBUG: Python function fixup_perms finished
| DEBUG: Executing python function package_do_split_locales
| DEBUG: No locale files in this package
| DEBUG: Python function package_do_split_locales finished
| DEBUG: Executing python function populate_packages
| DEBUG: Executing python function package_do_split_gconvs
| NOTE: preparing tree for binary locale generation
| DEBUG: Executing shell function do_prep_locale_tree
| tar: i18n: Cannot stat: No such file or directory
| tar: Exiting with failure status due to previous errors
| gzip: /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/locale-tree//usr/share/i18n/charmaps/*gz.gz: No such file or directory
| WARNING: /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/temp/run.do_prep_locale_tree.13365:1 exit 1 from ā€˜gunzip $iā€™
| DEBUG: Python function package_do_split_gconvs finished
| DEBUG: Python function populate_packages finished
| DEBUG: Python function do_package finished
| ERROR: Function failed: do_prep_locale_tree (log file is located at /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/temp/log.do_package.13365)
ERROR: Task (/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-core/glibc/glibc-locale_2.28.bb:do_package) failed with exit code ā€˜1ā€™
NOTE: Tasks Summary: Attempted 967 tasks of which 956 didnā€™t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-core/glibc/glibc-locale_2.28.bb:do_package
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
[000000259][LOG]Build for beaglebone failed. Check failed log in build/tmp/log/cooker/beaglebone .
[000000259][LOG]If build for beaglebone succeeded, final image should have been generated here:
[000000259][LOG] build/tmp/deploy/images/beaglebone/resin-image-flasher-beaglebone.resinos-img
[000000259][LOG]Done.

From the error message and a cursory look, Iā€™m guessing you are hitting a bug that is fixed upstream by this patch

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=ff9739af25707c0a88e8b5af247de727440197bc

Iā€™m guessing we happen to not hit this issue in our build machines.

Can you check if the contents of that patch are in your layers/poky folder?

Hi, yes the patch is already there.

That is strange. The build error looks pretty much what the patch should be addressing.

What distribution are you building on? Have you installed all the base packages required as listed in

https://www.yoctoproject.org/docs/2.2/yocto-project-qs/yocto-project-qs.html#the-linux-distro

We have a rough wip dockerfile that makes it easy to build balenaOS inside a container but its quite raw.

Now to debug and narrow down the error to the exact recipe, you could try cleaning and rebuilding just the package. But this starts getting into Yocto internals
e.g.

balena-beaglebone$ source layers/poky/oe-init-build-env
balena-beaglebone$ MACHINE=beaglebone bitbake -c cleanall glibc-locale
balena-beaglebone$ MACHINE=beaglebone bitbake glibc-locale

I think its a mismatch between what machine you are building on. Sometimes subtle things like keyboard layout and locale affect things. e.g. japanese languages etc.

Dockerfile is usually safest.

Thanks again for your help! I am building on Ubuntu 16.04.1
I am rebuilding glibc-locale, will update shortly.

Itā€™s interesting why the raspberrypi3 doesnā€™t fail with the same issue.
Could you share the dockerfile to try?

The build failed with the following:
MACHINE=beaglebone bitbake glibc-locale
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
Loading cache: 100% |#################################################################################| Time: 0:00:07
Loaded 3409 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = ā€œ1.40.0ā€
BUILD_SYS = ā€œx86_64-linuxā€
NATIVELSBSTRING = ā€œuniversalā€
TARGET_SYS = ā€œarm-poky-linux-gnueabiā€
MACHINE = ā€œbeagleboneā€
DISTRO = ā€œbalena-osā€
DISTRO_VERSION = ā€œ2.46.1ā€
TUNE_FEATURES = ā€œarm armv7a vfp thumb neon callconvention-hardā€
TARGET_FPU = ā€œhardā€
meta
meta-poky = ā€œHEAD:cb26830f765f03309c0663352cc5849491271be8ā€
meta-oe
meta-filesystems
meta-networking
meta-python = ā€œHEAD:2d088d252624b19df384aecc434d23afb636178fā€
meta-ti = ā€œHEAD:727411f95ef1f66034beac08702f21b30a1b84c9ā€
meta-balena-common
meta-balena-thud = ā€œmaster:f2295d2b9fc9b8993b7264a5144a7051184ee61cā€
meta-balena-beaglebone = ā€œmaster:a8518cfd2c410ee1fe7bdc16f00e839f92be6c43ā€
meta-rust = ā€œHEAD:84710b341be53cc2af13ecc8ae87773cf84687bfā€

Initialising tasks: 100% |############################################################################| Time: 0:00:03
Sstate summary: Wanted 66 Found 58 Missed 8 Current 0 (87% match, 0% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: glibc-locale-2.28-r0 do_package: Function failed: do_prep_locale_tree (log file is located at /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/temp/log.do_package.2507)
ERROR: Logfile of failure stored in: /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/temp/log.do_package.2507
Log data follows:
| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are [ā€˜virtual:native:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb:do_populate_sysrootā€™, ā€˜virtual:native:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-devtools/dwarfsrcfiles/dwarfsrcfiles.bb:do_populate_sysrootā€™, ā€˜/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-devtools/binutils/binutils-cross_2.31.bb:do_populate_sysrootā€™, ā€˜/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-core/glibc/cross-localedef-native_2.28.bb:do_populate_sysrootā€™, ā€˜virtual:native:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysrootā€™]
| NOTE: Installed into sysroot: [ā€˜rpm-nativeā€™, ā€˜dwarfsrcfiles-nativeā€™, ā€˜elfutils-nativeā€™, ā€˜dbus-nativeā€™, ā€˜db-nativeā€™, ā€˜libarchive-nativeā€™, ā€˜nss-nativeā€™, ā€˜bzip2-nativeā€™, ā€˜file-nativeā€™, ā€˜popt-nativeā€™, ā€˜python3-nativeā€™, ā€˜expat-nativeā€™, ā€˜e2fsprogs-nativeā€™, ā€˜lzo-nativeā€™, ā€˜nspr-nativeā€™, ā€˜sqlite3-nativeā€™, ā€˜openssl-nativeā€™, ā€˜gdbm-nativeā€™, ā€˜readline-nativeā€™, ā€˜util-linux-nativeā€™, ā€˜attr-nativeā€™, ā€˜ncurses-nativeā€™]
| NOTE: Skipping as already exists in sysroot: [ā€˜binutils-cross-armā€™, ā€˜cross-localedef-nativeā€™, ā€˜pseudo-nativeā€™, ā€˜autoconf-nativeā€™, ā€˜quilt-nativeā€™, ā€˜gnu-config-nativeā€™, ā€˜libtool-nativeā€™, ā€˜automake-nativeā€™, ā€˜gcc-cross-initial-armā€™, ā€˜make-nativeā€™, ā€˜linux-libc-headersā€™, ā€˜systemd-systemctl-nativeā€™, ā€˜bison-nativeā€™, ā€˜gperf-nativeā€™, ā€˜libgcc-initialā€™, ā€˜glibc-initialā€™, ā€˜xz-nativeā€™, ā€˜gettext-minimal-nativeā€™, ā€˜pkgconfig-nativeā€™, ā€˜texinfo-dummy-nativeā€™, ā€˜zlib-nativeā€™, ā€˜flex-nativeā€™, ā€˜m4-nativeā€™, ā€˜mpfr-nativeā€™, ā€˜gmp-nativeā€™, ā€˜libmpc-nativeā€™]
| DEBUG: sed -e ā€˜s:^[^/]*/:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/recipe-sysroot-native/:gā€™ /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-components/x86_64/rpm-native/fixmepath /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-components/x86_64/elfutils-native/fixmepath /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-components/x86_64/dbus-native/fixmepath /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-components/x86_64/python3-native/fixmepath /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-components/x86_64/e2fsprogs-native/fixmepath /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-components/x86_64/nspr-native/fixmepath /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-components/x86_64/openssl-native/fixmepath /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-components/x86_64/ncurses-native/fixmepath | xargs sed -i -e ā€˜s:FIXMESTAGINGDIRTARGET:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/recipe-sysroot-native:gā€™ -e ā€˜s:FIXME_COMPONENTS_DIR:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-components:gā€™ -e ā€˜s:FIXME_HOSTTOOLS_DIR:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/hosttools:gā€™ -e ā€˜s:FIXME_PKGDATA_DIR:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/pkgdata/beaglebone:gā€™ -e ā€˜s:FIXME_PSEUDO_LOCALSTATEDIR:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/pseudo/:gā€™ -e ā€˜s:FIXME_LOGFIFO:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/temp/fifo.2507:gā€™
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function do_package
| DEBUG: Executing python function package_get_auto_pr
| DEBUG: Python function package_get_auto_pr finished
| DEBUG: Executing python function perform_packagecopy
| DEBUG: Python function perform_packagecopy finished
| DEBUG: Executing python function split_and_strip_files
| DEBUG: Python function split_and_strip_files finished
| DEBUG: Executing python function fixup_perms
| DEBUG: Python function fixup_perms finished
| DEBUG: Executing python function package_do_split_locales
| DEBUG: No locale files in this package
| DEBUG: Python function package_do_split_locales finished
| DEBUG: Executing python function populate_packages
| DEBUG: Executing python function package_do_split_gconvs
| NOTE: preparing tree for binary locale generation
| DEBUG: Executing shell function do_prep_locale_tree
| tar: i18n: Cannot stat: No such file or directory
| tar: Exiting with failure status due to previous errors
| gzip: /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/locale-tree//usr/share/i18n/charmaps/*gz.gz: No such file or directory
| WARNING: /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/temp/run.do_prep_locale_tree.2507:1 exit 1 from ā€˜gunzip $iā€™
| DEBUG: Python function package_do_split_gconvs finished
| DEBUG: Python function populate_packages finished
| DEBUG: Python function do_package finished
| ERROR: Function failed: do_prep_locale_tree (log file is located at /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/glibc-locale/2.28-r0/temp/log.do_package.2507)
ERROR: Task (/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-core/glibc/glibc-locale_2.28.bb:do_package) failed with exit code ā€˜1ā€™
NOTE: Tasks Summary: Attempted 435 tasks of which 426 didnā€™t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/poky/meta/recipes-core/glibc/glibc-locale_2.28.bb:do_package
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

ok, so I changed some of the repository commits (to thud branch) and it built ok (see below). I will now try a balenaos build. May take a while as I need to delete the raspberrypi build to make suffienct disk space available

MACHINE=beaglebone bitbake glibc-locale
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
Parsing recipes: 100% |###############################################################################| Time: 0:03:47
Parsing of 2413 .bb files complete (0 cached, 2413 parsed). 3412 targets, 443 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = ā€œ1.40.0ā€
BUILD_SYS = ā€œx86_64-linuxā€
NATIVELSBSTRING = ā€œuniversalā€
TARGET_SYS = ā€œarm-poky-linux-gnueabiā€
MACHINE = ā€œbeagleboneā€
DISTRO = ā€œbalena-osā€
DISTRO_VERSION = ā€œ2.46.1ā€
TUNE_FEATURES = ā€œarm armv7a vfp thumb neon callconvention-hardā€
TARGET_FPU = ā€œhardā€
meta
meta-poky = ā€œthud:f3dfec8aaeedec2820cd316f51a15231b876053fā€
meta-oe
meta-filesystems
meta-networking
meta-python = ā€œthud:446bd615fd7cb9bc7a159fe5c2019ed08d1a7a93ā€
meta-ti = ā€œthud:29737b15a1ce855d43083babe6a0f6c50c9b4027ā€
meta-balena-common
meta-balena-thud = ā€œmaster:f2295d2b9fc9b8993b7264a5144a7051184ee61cā€
meta-balena-beaglebone = ā€œmaster:a8518cfd2c410ee1fe7bdc16f00e839f92be6c43ā€
meta-rust = ā€œHEAD:84710b341be53cc2af13ecc8ae87773cf84687bfā€

Initialising tasks: 100% |############################################################################| Time: 0:00:03
Sstate summary: Wanted 29 Found 24 Missed 5 Current 37 (82% match, 92% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 439 tasks of which 432 didnā€™t need to be rerun and all succeeded.

Summary: There were 2 WARNING messages shown.

Doing a balenaos build failed, this time with a different error:

./balena-yocto-scripts/build/barys -d -m beaglebone
Building JSON manifestā€¦
audited 3 packages in 1.027s
found 0 vulnerabilities

ā€¦Done


| |__ __ | | ___ _ __ __ _ / _ / |
| ā€™
\ / | |/ _ \ '_ \ / _ | | | _

| |
) | (
| | | / | | | (| | || |) |
|
./ _,|_|_|| ||_,|___/|____/


Resin specific images available:
resin-image
resin-image-flasher

BeagleBoard-XM (EXPERIMENTAL) : MACHINE=beagleboard-xm bitbake resin-image BeagleBone Green (EXPERIMENTAL) : MACHINE=beaglebone-green bitbake resin-image-flasher
BeagleBone Green Wireless (EXPERIMENTAL) : MACHINE=beaglebone-green-wifi bitbake resin-image-flasher BeagleBone Black : MACHINE=beaglebone bitbake resin-image-flasher
PocketBeagle (EXPERIMENTAL) : $ MACHINE=beaglebone-pocket bitbake resin-image

[000000004][LOG]BalenaOS build initialized in directory: build.
[000000004][LOG]Run build for beaglebone: MACHINE=beaglebone bitbake resin-image-flasher
[000000004][LOG]This might take a while ā€¦
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer balena-beaglebone should set LAYERSERIES_COMPAT_balena-beaglebone in its conf/layer.conf file to list the core layer names it is compatible with.
Parsing recipes: 100% |###############################################################################| Time: 0:00:51
Parsing of 2413 .bb files complete (0 cached, 2413 parsed). 3412 targets, 443 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = ā€œ1.40.0ā€
BUILD_SYS = ā€œx86_64-linuxā€
NATIVELSBSTRING = ā€œuniversalā€
TARGET_SYS = ā€œarm-poky-linux-gnueabiā€
MACHINE = ā€œbeagleboneā€
DISTRO = ā€œbalena-osā€
DISTRO_VERSION = ā€œ2.46.1ā€
TUNE_FEATURES = ā€œarm armv7a vfp thumb neon callconvention-hardā€
TARGET_FPU = ā€œhardā€
meta
meta-poky = ā€œthud:f3dfec8aaeedec2820cd316f51a15231b876053fā€
meta-oe
meta-filesystems
meta-networking
meta-python = ā€œthud:446bd615fd7cb9bc7a159fe5c2019ed08d1a7a93ā€
meta-ti = ā€œthud:29737b15a1ce855d43083babe6a0f6c50c9b4027ā€
meta-balena-common
meta-balena-thud = ā€œmaster:f2295d2b9fc9b8993b7264a5144a7051184ee61cā€
meta-balena-beaglebone = ā€œmaster:a8518cfd2c410ee1fe7bdc16f00e839f92be6c43ā€
meta-rust = ā€œHEAD:84710b341be53cc2af13ecc8ae87773cf84687bfā€

Initialising tasks: 100% |############################################################################| Time: 0:00:02
Sstate summary: Wanted 1324 Found 260 Missed 1064 Current 60 (19% match, 23% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_IP_NF_TARGET_LOG=m in the kernel configs failed for misc.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_USB_SERIAL_GENERIC=m in the kernel configs failed for usb-serial.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_CRYPTO_LZO=m in the kernel configs failed for zram.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_IPV4=y in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_INET=y in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_ARP=y in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NFT_TPROXY=m in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NF_TPROXY_IPV6=m in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NFT_SOCKET=m in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NFT_CONNLIMIT=m in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_IPV6=y in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NFT_OSF=m in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_SET=m in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NFT_TUNNEL=m in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NF_TABLES_NETDEV=y in the kernel configs failed for nf_tables.
WARNING: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_kernel_resin_checkconfig: Checking for CONFIG_NF_TPROXY_IPV4=m in the kernel configs failed for nf_tables.
ERROR: os-config-1.1.1-r0 do_unpack: Unpack failure for URL: ā€˜https://crates.io/api/v1/crates/failure/0.1.5/downloadā€™. Unpack command PATH="/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/layers/poky/scripts:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/os-config/1.1.1-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/os-config/1.1.1-r0/recipe-sysroot/usr/bin/crossscripts:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/os-config/1.1.1-r0/recipe-sysroot-native/usr/sbin:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/os-config/1.1.1-r0/recipe-sysroot-native/usr/bin:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/os-config/1.1.1-r0/recipe-sysroot-native/sbin:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/os-config/1.1.1-r0/recipe-sysroot-native/bin:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/layers/poky/bitbake/bin:/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/hosttools" tar -xz --no-same-owner -f /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/downloads/failure-0.1.5.crate -C /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/os-config/1.1.1-r0/cargo_home/bitbake failed with return value 2
ERROR: os-config-1.1.1-r0 do_unpack: Function failed: base_do_unpack
ERROR: Logfile of failure stored in: /home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/tmp/work/armv7at2hf-neon-poky-linux-gnueabi/os-config/1.1.1-r0/temp/log.do_unpack.13759
ERROR: Task (/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/meta-balena/meta-balena-common/recipes-core/os-config/os-config_1.1.1.bb:do_unpack) failed with exit code ā€˜1ā€™
NOTE: Tasks Summary: Attempted 1605 tasks of which 1053 didnā€™t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/paulevans/Yocto_Project_Beaglebone/balena-beaglebone/build/ā€¦/layers/meta-balena/meta-balena-common/recipes-core/os-config/os-config_1.1.1.bb:do_unpack
Summary: There were 18 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
[000001051][LOG]Build for beaglebone failed. Check failed log in build/tmp/log/cooker/beaglebone .
[000001051][LOG]If build for beaglebone succeeded, final image should have been generated here:
[000001051][LOG] build/tmp/deploy/images/beaglebone/resin-image-flasher-beaglebone.resinos-img
[000001051][LOG]Done.

Hi,

These intermittent things are quite strange.

ERROR: os-config-1.1.1-r0 do_unpack: Unpack failure for URL: ā€˜https://crates.io/api/v1/crates/failure/0.1.5/downloadā€™. Unpack command

This one particularly looks like a network issue to me. Could be on your end or could be upstream. Did you retry?

The WIP Dockerfiles are https://github.com/alexgg/docker-balena and https://github.com/richbayliss/balenaos-builder

Regards,
ZubairLK

Hi ZubairLK, I retried several times, it wouldnā€™t surprise me if it was our network here.
I will try the dockerfiles, thank you so much for that!

Regards,
Paul

Hi ZubairLK, success!!! I now have a beaglebone balenaos image to try. Thank you very much for your help.

Regards,
Paul

Hi Paul

Glad to hear that your problem was sorted!

Kind regards
Alida

Ok, the good news is after flashing, the device shows up in balena cloud. However after a very short time (60s), the device goes offline. Looking at the serial port, it says received sigterm from pid 1 and does a system shutdown. Maybe because no containers running yet?

oops, my mistake! I left the SD card in after flashing. Now itā€™s ok.

Keep us posted if you experience any other problems!

Thank you Alida. Just one query if itā€™s appropriate to ask here. Iā€™m curious about how my Balena login picks up my device when the only thing I appear to have given the image before flashing it is configured it with an app name. If that was the case, I would expect to see other peopleā€™s devices popping up if for example I just called the app ā€˜MyAppā€™.

Regards,
Paul

Hi Paul

When you create an image for your application (using the cli or the dashboard), that image is configured specifically for the application, which exists under your user account. (A provisioning api key is created in the backed, which is unique to that image, and with this key, the device is allowed to register in that specific application.) It therefore will not matter if many users have apps called ā€œMyAppā€, since your ā€œMyAppā€ app is associated with your user account, and the image you downloaded only allows the device to be register in this specific one.

I hope this is useful.

Kind regards
Alida

Hi Alida,
Thanks for that, thatā€™s very helpful indeed.

Kind regards,
Paul