cancel
Showing results for 
Search instead for 
Did you mean: 

STMLinux (kirkstone) read-only-rootfs support

GLaure
Senior

Hi,

I am trying to set the rootfs read-only. With other yocto based environments I usually set

EXTRA_IMAGE_FEATURES ?= "read-only-rootfs"

in local.conf.

 

Using OpenSTLinux this results in a build error:

 

ERROR: st-image-userfs-1.0-r0 do_rootfs: Unable to remove packages. Command '['/home/jenkins/Development/SW_APP/nexio_tmp/ost-5.15/build/tmp-glibc/work/stm32mp1_nexio-ostl-linux-gnueabi/st-image-userfs/1.0-r0/recipe-sysroot-native/usr/bin/dpkg', '--admindir=/home/jenkins/Development/SW_APP/nexio_tmp/ost-5.15/build/tmp-glibc/work/stm32mp1_nexio-ostl-linux-gnueabi/st-image-userfs/1.0-r0/rootfs/var/lib/dpkg', '--instdir=/home/jenkins/Development/SW_APP/nexio_tmp/ost-5.15/build/tmp-glibc/work/stm32mp1_nexio-ostl-linux-gnueabi/st-image-userfs/1.0-r0/rootfs', '-P', '--force-depends', 'update-alternatives-opkg']' returned 2:
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin

ERROR: Logfile of failure stored in: /home/jenkins/Development/SW_APP/nexio_tmp/ost-5.15/build/tmp-glibc/work/stm32mp1_nexio-ostl-linux-gnueabi/st-image-userfs/1.0-r0/temp/log.do_rootfs.300025
ERROR: Task (/home/jenkins/Development/SW_APP/nexio_tmp/ost-5.15/layers/meta-st/meta-st-stm32mp/recipes-st/images/st-image-userfs.bb:do_rootfs) failed with exit code '1'

 

I found a similar report in this forum and tried out the suggested change to st-image-core.bb but the build error did not go away.

Is there a working solution?

 

Bye Gunther

1 REPLY 1
GLaure
Senior

My workround: Modifiying /etc/fstab

 

@@ -1,6 +1,6 @@
 # <file system> <mount pt>      <type>  <options>       <dump>  <pass>
 
-/dev/root            /                    auto       defaults,sync         1  1
+/dev/root            /                    auto       noatime,nodiratime,errors=remount-ro,ro         1  1
 LABEL=writeable      /writeable           ext4       rw,auto,defaults,sync,noatime,nodiratime         0  2
 proc                 /proc                proc       defaults              0  0
 devpts               /dev/pts             devpts     mode=0620,gid=5       0  0