I am new to Balena and Yocto linux development and could use some help.
My company is evaluating Balena OS for the Edge device in our IOT POC.
We have an UpBoard that we are currently using but expect to have to run custom hardware soon.
Downloading the Balena OS image from the web-site and flashing it to the UpBoard works great, but at some point we expect we will need to build a custom image and I wanted to see if I could build the Balena OS UpBoard image from source and I ran into several issues.
I ran the following process and hit the following issues:
git clone GitHub - balena-os/balena-up-board: Balena support for UP board
./balena-yocto-scripts/build/barys -m up-board
ERROR: ./git/balena-up-board/build/tmp/deploy/images/up-board/grub-efi-bootx64.efi is an invalid path referenced in BALENA_BOOT_PARTITION_FILES.
ERROR: ./build/tmp/deploy/images/up-board/grubenv is an invalid path referenced in BALENA_BOOT_PARTITION_FILES.
ERROR: balena-image-1.0-r0 do_resin_boot_dirgen_and_deploy: ./build/tmp/deploy/images/up-board/grub.cfg_internal is an invalid path referenced in BALENA_BOOT_PARTITION_FILES.
cp: cannot stat ‘./build/tmp/deploy/licenses/balena-image-up-board-20220301154440/image_license.manifest’: No such file or directory
I was able to work around the issues by copying files from other directories in the build system but I doubt this sort of hack should be necessary.
Is there a Yocto setup that I am missing?
Once the image built and I used Balena Etcher, it did seem to load correctly on my UpBoard but I was not sure what next steps need to be configured to allow it to register to my fleet?
Hi @bytengale, welcome to the Forums. You are correct, you should not have to manually intervene and copy files to those directories, so something is broken here. I’ll get with the team and see what we can determine, then report back to you. Thanks!
@bytengale Ok, I was able to confirm that the Up Board repos do indeed build fine, but a colleague noticed one possible issue in your setup. Your
git clone command does not include the
--recursive, which is needed to bring in then necessary submodules.
So, try a
git clone --recursive https://github.com/balena-os/balena-up-board.git and then your subsequent
./balena-yocto-scripts/build/barys -m up-board. Hopefully that should fix it!
I saw your ticket and wanted to also share that there are a few ways to support your custom hardware (once you get to that point):
If you have folks on your team who are familiar with Yocto (which it seems you might!), then you could build and maintain it yourself using our “build your own” instructions.
If you have a good relationship with the manufacturer, the manufacturer may be willing to port the board to balenaOS and keep it updated for you.
If neither of the above options are available, and no other boards meet your need, you can also consider our Custom Device Support service, which is a paid service during which we onboard the device for you and maintain it for a monthly fee.
We honestly prefer not to do the last option, as it results in non-scalable work for us, but it is of course an option if you need it.
Let us know if you have any questions about the above, or further questions about getting your upboard working!
I’m facing the same problem. How can is solve this. I just need to add some wifi-dongle drivers to the system, but just cloning en building already give problems.
ERROR: balena-image-1.0-r0 do_resin_boot_dirgen_and_deploy: /home/rafs/balena-up-board/build/tmp/deploy/images/up-board/grub-efi-bootx64.efi is an invalid path referenced in BALENA_BOOT_PARTITION_FILES.
ERROR: balena-image-1.0-r0 do_resin_boot_dirgen_and_deploy: Execution of ‘/home/rafs/balena-up-board/build/tmp/work/up_board-poky-linux/balena-image/1.0-r0/temp/run.do_resin_boot_dirgen_and_deploy.26672’ failed with exit code 1:
Generating work directory for resin-boot partition…
Handling grub-efi-bootx64.efi:/EFI/BOOT/bootx64.efi .
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /home/rafs/balena-up-board/build/tmp/work/up_board-poky-linux/balena-image/1.0-r0/temp/log.do_resin_boot_dirgen_and_deploy.26672
ERROR: Task (/home/rafs/balena-up-board/build/…/layers/meta-balena/meta-balena-common/recipes-core/images/balena-image.bb:do_resin_boot_dirgen_and_deploy) failed with exit code ‘1’
If you’re just looking to add wifi drivers, you might just need to test them by building the kernel module (GitHub - balena-os/kernel-module-build: Example project for building an OOT kernel module in balena) and then if they are working as expected, submit a pull-request to the GitHub repo for that board (if you’re also using the UpBoards, then it would be this one: GitHub - balena-os/balena-up-board: Balena support for UP board).
Let us know if we’ve understood your question correctly!