Facing issue in booting Balena OS

Generally we’d recommend checking things with a web search, Yocto is a very widely documented project (and pretty big too, so we cannot document everything). Have asked our device support team as well to chime in with any further points, though, but that will likely happen a little while later.

There’s also our “How to build your own image” page on the balenaOS site that might be helpful for getting an actual image out of the process: https://www.balena.io/os/docs/custom-build/

Okay so just to confirm I can’t add a custom_overlay ( i.e. a DTBO file ) on the current Host OS provided by the Balena.

I need to build an image to make the custom dtbo usable. as spanceac mentioned here:

My speculation for the reason that you don’t see the dtbo file there, is the way we use aufs to mount the rootfs and is not an u-boot bug.

If you want your dtbo in the /boot/overlays folder you need to create your own build.

Clone this repo:
https://github.com/balena-os/balena-beaglebone.

Patch this recipe to add your overlay source:
https://github.com/balena-os/balena-beaglebone/blob/master/layers/meta-balena-beaglebone/recipes-kernel/linux/bb-org-overlays.bb.

Then you can build an image and use it on your board and your dtbo should be usable.

Regards!

Also is it possible if I enable device support someone from Balena support team verify the problem?

Thanks for the Response.

Hey @Sharvin26,

Hi,

Enabling support access can’t help us solve this problem because we can’t access your board’s u-boot console because your board is not booted.

We need to have the OS booted for support access.

I created an example on how to add your custom dtbo to the build. Let’s assume you have a dts named: your_custom.dts.

  1. Add your dts file in this folder from the cloned repo layers/meta-resin-beaglebone/recipes-kernel/linux/bb-org-overlays

  2. Add in layers/meta-resin-beaglebone/recipes-kernel/linux/bb-org-overlays.bb recipe this patch:

--- a/layers/meta-resin-beaglebone/recipes-kernel/linux/bb-org-overlays.bb
+++ b/layers/meta-resin-beaglebone/recipes-kernel/linux/bb-org-overlays.bb
@@ -15,6 +15,7 @@ SRC_URI = " \
     file://BB-CAN0-00A0.dts \
     file://BB-I2C2N-00A0.dts \
     file://SDS-CAPE-00A0.dts \
+    file://your_custom.dts \
     "
 
 S = "${WORKDIR}/git"
@@ -28,6 +29,7 @@ do_compile_prepend () {
     cp ${WORKDIR}/BB-CAN0-00A0.dts ${S}/src/arm/
     cp ${WORKDIR}/BB-I2C2N-00A0.dts ${S}/src/arm/
     cp ${WORKDIR}/SDS-CAPE-00A0.dts ${S}/src/arm/
+    cp ${WORKDIR}/your_custom.dts ${S}/src/arm/
 }
  1. Now build:
    ./balena-yocto-scripts/build/barys -m beaglebone -b my_custom_bbb_build

After build finishes, in the folder my_custom_bbb_build/tmp/deploy/images/beaglebone you will find an image that you should flash it to the SD card.
The image name should be of type: resin-image-beaglebone.resinos-img and it’s a symlink to a bigger file.

If you want, you can create a PR with steps 2 and 3 in the github repo and this way your dtbo will always be in the official Balena images and you will not need to do your custom builds.

Correction: I wanted to say to create a PR with steps 1 and 2, not 2 and 3

If creating the PR is a problem to you, just send us the dts contents and we will PR it for you

Thanks for the detail explanation. I’ll test this and inform you about the PR as per the results

Ok we’re waiting for your reply

Right now I am building the Image. Once it is done I’ll test it and then I’ll send the PR.

Hey I am getting issue while Building the system:

ERROR: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_fetch: Fetcher failure: Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-hjBTuCq9KU"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/user/Desktop/Balena_OS/balena-beaglebone/layers/poky/scripts:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot/usr/bin/crossscripts:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/usr/sbin:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/usr/bin:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/sbin:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/bin:/home/user/Desktop/Balena_OS/balena-beaglebone/layers/poky/bitbake/bin:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/hosttools"; export HOME="/home/user"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror git://github.com/beagleboard/linux.git /home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/downloads/git2/github.com.beagleboard.linux.git --progress failed with exit code 128, output:
Cloning into bare repository '/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/downloads/git2/github.com.beagleboard.linux.git'...
remote: Enumerating objects: 385, done.        
remote: Counting objects: 100% (385/385), done.        
remote: Compressing objects: 100% (134/134), done.        
fatal: read error: Connection timed out7), 1.03 GiB | 102.00 KiB/s      
fatal: early EOF
fatal: index-pack failed

ERROR: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_fetch: Fetcher failure for URL: 'git://github.com/beagleboard/linux.git;protocol=git;tag=4.14.53-ti-r62;nobranch=1'. Unable to fetch URL from any source.
ERROR: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/temp/log.do_fetch.10893
ERROR: Task (/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/../layers/meta-balena-beaglebone/recipes-kernel/linux/linux-beagleboard_4.14.bb:do_fetch) failed with exit code '1'

Any idea what might be going wrong?

Note: I am using Ubuntu 16.04 LTS and also I am not running the service as root. I am running it as normal user and docker also has been added to that group. Also all the dependencies have been installed.

hey @Sharvin26,

It’s very good that you use Ubuntu 16.04.
As well, is good that you run the build as a normal user and not root.

This seems like a networking issue.
You received a timeout when trying to pull the sources to build the kernel.

Make sure that your Internet connection is good and try again.

Also, you could PR the change without doing the build yourself. Our CI system will automatically create a build from your PR.

Regards!

Okay I’ll send the PR. Thanks

I have submitted the PR can you please confirm if it’s right or any changes are needed?

Thanks

Thanks for the PR @Sharvin26 , I have added some of the team as reviewers there and they will comment on the PR if there are any changes needed. Thanks again!

Your welcome. Glad to contribute.

hey @Sharvin26,

Your commit contents looks good but some changes are needed in the name.

Left you comments in gh.

Regards!

Thanks for informing. I have updated the commit text.

Hello, @spanceac I wanted to confirm if the changes in PR are available to download for Balena OS for Beaglebone?

Hi @Sharvin26,

I will deploy today to staging environment and you can download the image from there.

I will let you know when it’s ready.

Hey @Sharvin26,

You can now download from https://dashboard.balena-staging.io/ the v2.33.0+rev2 image which contains your dtbo.

Regards!

After we will run our test suite this image will be available in production dashboard also.