meta-balena layer failed to initialize

so i have been using meta-balena layer in yocto layer but getting following errors. sdcard has partition boot, root which are automatically created when i flash .sdcard image of yocto build in to sdcard. then i manually created other partitions as shown here but i am still getting error.

How can i start resin-state partition mount service to start all balena services.
[FAILED] Failed to start Resin state partition mount service.
See ‘systemctl status resin-state.service’ for details.
[DEPEND] Dependency failed for Bind mount for /home/root/.docker.
[DEPEND] Dependency failed for Balena Application Container Engine.
[DEPEND] Dependency failed for Bind mount for /etc/openvpn.
[DEPEND] Dependency failed for OpenVPN.
[DEPEND] Dependency failed for Resin reset OS state.
[DEPEND] Dependency failed for Bind mount for /var/lib/NetworkManager.
[DEPEND] Dependency failed for Bind mount for /etc/NetworkManager/conf.d.
[DEPEND] Dependency failed for NetworkManage…ration fragments from config.json.
[DEPEND] Dependency failed for Bind mount for /var/lib/chrony.
[DEPEND] Dependency failed for Bind mount for /home/root/.rnd.
[DEPEND] Dependency failed for Bind mount for /etc/resin-supervisor.
[DEPEND] Dependency failed for Balena supervisor.
[DEPEND] Dependency failed for Bind mount for /home/root/.ssh.
[DEPEND] Dependency failed for OS SSH keys.
[DEPEND] Dependency failed for Bind mount for /var/lib/systemd.
[DEPEND] Dependency failed for Bind mount fo…NetworkManager/system-connections.
[DEPEND] Dependency failed for Resin network configure service.
[DEPEND] Dependency failed for Bind mount for /etc/hostname.
[DEPEND] Dependency failed for Resin Hostname Configuration.
[DEPEND] Dependency failed for Avahi mDNS/DNS-SD Stack.
[DEPEND] Dependency failed for Bind mount for /var/lib/bluetooth.
[DEPEND] Dependency failed for Bind mount for /etc/udev/rules.d.
[DEPEND] Dependency failed for udev rules configuration from config.json.
[DEPEND] Dependency failed for Bind mount for /etc/ssh/hostkeys.
[DEPEND] Dependency failed for OpenSSH Key Generation.
[DEPEND] Dependency failed for Bind mount for /etc/docker.
[DEPEND] Dependency failed for Resin persistent logs.
Starting udev Kernel Device Manager…
[FAILED] Failed to start Resin active root partition mount service.
See ‘systemctl status mnt-sysroot-active.service’ for details.
[DEPEND] Dependency failed for Balena rollback checks health.
[FAILED] Failed to start Resin boot partition mount service.
See ‘systemctl status resin-boot.service’ for details.
[DEPEND] Dependency failed for redsocks transparent proxy redirector.
[DEPEND] Dependency failed for Resin proxy configuration service.
[DEPEND] Dependency failed for Balena device UUID.
[DEPEND] Dependency failed for Prepare OpenVPN.
[DEPEND] Dependency failed for Config.json path watch.
[DEPEND] Dependency failed for Balena rollback checks altboot.
[DEPEND] Dependency failed for OS configuration update service.
[DEPEND] Dependency failed for OS configuration device key service.

Hi, what meta-balena version you are building with? And for what board are you building it?

i am using the latest development branch. and then i saw other examples like balena-beaglebone and then checked out that commit which was using by beaglebone.
and i am compiling it for my phyboard-segin-imx6ul-2 board.
and i am following getting-started guide of building image. but i am not finding appropriate documentation so that i am refrencing through raspberry pi and beaglebone like boards which i have for porting. i find it very difficult to port for a board.
i have the bsp layer and i tried to add meta-balena layer it is now successfully compiling but i am having an issue while booting the board.

is there any provision on forum which can help me to port the balena for my board. it seems difficult to port. i have familiar with yocto but still not able to do it
Please help. because i have resource limitations i can’t use raspberry pi and beaglebone board they have several limitations and other boards are also not available in my country so i am porting for which i have.

I am also getting this error when i was first compiling

ERROR: resin-image-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: [‘busybox’]
ERROR: resin-image-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/ubuntu/phytec/build/tmp/work/ruggedboard_imx6ul-phytec-linux-gnueabi/resin-image/1.0-r0/temp/log.do_rootfs.12303
ERROR: Task (/home/ubuntu/phytec/sources/poky/…/meta-balena-stock/meta-balena-common/recipes-core/images/resin-image.bb:do_rootfs) failed with exit code ‘1’

SO i removed read-only-rootfs from resin-image.bb

IMAGE_FEATURES_append = "
${@bb.utils.contains(‘DISTRO_FEATURES’, ‘development-image’, ‘debug-tweaks’, ‘’, d)}
splash
ssh-server-openssh
read-only-rootfs
"

it was able to compile but then i got this errors

[    4.447639] devtmpfs: mounted
[    4.462731] Freeing unused kernel memory: 1024K
1970/01/01 00:00:04 could not get mounts:open /proc/self/mountinfo: no such file or directory
[    4.944229] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[    4.944229] 
[    4.953480] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[    4.953480]

Hi @kishanjoshi just zooming back out a bit to a high level question, is this the board you are trying to support https://www.phytec.in/product/single-board-computer/phyboard-segin/ ? From the specs I see that the Full version there only has 512 MB SLC NAND, 512 MB DDR3L RAM. Unfortunately I think this board is probably under spec for running balenaOS. We require at least 4GB of disk storage for balenaOS to run correctly.

Actually it is based on that board not certainly that. the build system is same but the actual specs are just change. since we currently using that board with its example images which is running fine with both the board. currently we are not booting it from nand we have 64GB Class 10 Memory card and variant is still vary in terms of ram . So basically it is fine in terms of hardware specs. we used meta-balena layer all the partitions are done. compiled successfully but still not sure why this error comes up. it started after adding meta-balena layer and i also added required flags in the layer which i made meta-balena-phytec. it seems like it is not able to find rootfs or some package is missing to be added in resin-image. i search around the forum but i found only one post which is now out dated so i started this thread. so there may be some flags which are missing. i go through all the docs but there is nothing which is explained in detail in getting started guide

Ah okay, good to know! In that case it does sound like the specs are suitable. I have asked some of our OS/yocto gurus to have a look and see if they can help. From what I know, disabling the RO filesystem is probably not a good way to go, so hopefully they will have some better ideas to help your build progress

Hi, just to clarify a little, have you been following this guide? https://github.com/balena-os/meta-balena/blob/development/contributing-device-support.md
If not, can you please double check with the guide to see if there’s anything you may have missed?