Hi,
I have integrated mender into the Yocto project for the SAMA5D3. The project is based on dunfell. I am using u-boot from mender. Yocto project is creating ubimg with the following volumes:
[rootfsA]
mode=ubi
image=(I have removed this line )
vol_id=0
vol_size=103168KiB
vol_type=dynamic
vol_name=rootfsa
[rootfsB]
mode=ubi
image=(I have removed this line )
vol_id=1
vol_size=103168KiB
vol_type=dynamic
vol_name=rootfsb
[data]
mode=ubi
image=(I have removed this line )
vol_id=2
vol_size=16MiB
vol_type=dynamic
vol_name=data
[u-boot-env-1]
mode=ubi
image=(I have removed this line )
vol_id=3
vol_size=4063232
vol_type=dynamic
vol_name=u-boot-env-1
[u-boot-env-2]
mode=ubi
image=(I have removed this line )
vol_id=4
vol_size=4063232
vol_type=dynamic
vol_name=u-boot-env-2
I see that all the volumes are present in /dev:
root@sama5d3-xplained:~# ls -l /dev/ubi*
crw------- 1 root root 246, 0 Jan 1 2007 /dev/ubi0
crw------- 1 root root 246, 1 Jan 1 2007 /dev/ubi0_0
crw------- 1 root root 246, 2 Jan 1 2007 /dev/ubi0_1
crw------- 1 root root 246, 3 Jan 1 2007 /dev/ubi0_2
crw------- 1 root root 246, 4 Jan 1 2007 /dev/ubi0_3
crw------- 1 root root 246, 5 Jan 1 2007 /dev/ubi0_4
crw------- 1 root root 10, 62 Jan 1 2007 /dev/ubi_ctrl
However I see that only ubi0_0 and ubi0_2 are mounted:
root@sama5d3-xplained:~# mount
ubi0_0 on / type ubifs (rw,relatime,assert=read-only,ubi=0,vol=0)
devtmpfs on /dev type devtmpfs (rw,relatime,size=116160k,nr_inodes=29040,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /var/volatile type tmpfs (rw,relatime)
ubi0_2 on /data type ubifs (rw,relatime,assert=read-only,ubi=0,vol=2)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=24972k,mode=700)
The issue with this setup is that the mender artifact (I am also building it using the Yocto project) is failing when it tries to update the uboot env volumes (ubi0_3 and ubi0_4) since they are not available. I needed to ask if this is an expected behaviour? More confusing to me is why aren’t these volumes mounted by default if the mender artifact updation process needs to write into these volumes.