Home/Support/Support Forum/Fail to build digi-yocto with read-only-rootfs
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Fail to build digi-yocto with read-only-rootfs

+1 vote
I used digi-yocto 2.6 to build a embedded system for connect core imx6ulsbc board.
I want to this build have READ-ONLY-ROOTFS, so i do:
-Step1: Add EXTRA_IMAGE_FEATURES += "read-only-rootfs" to conf/local.conf
-Step2: Add this line to /meta/classes/core-image.bbclass:

FEATURE_PACKAGES_read-only-rootfs = "packagegroup-core-read-only-rootfs"

-> and core-image.bbclass like bellow

FEATURE_PACKAGES_x11 = "packagegroup-core-x11"
FEATURE_PACKAGES_x11-base = "packagegroup-core-x11-base"
FEATURE_PACKAGES_x11-sato = "packagegroup-core-x11-sato"
FEATURE_PACKAGES_tools-debug = "packagegroup-core-tools-debug"
FEATURE_PACKAGES_eclipse-debug = "packagegroup-core-eclipse-debug"
FEATURE_PACKAGES_tools-profile = "packagegroup-core-tools-profile"
FEATURE_PACKAGES_tools-testapps = "packagegroup-core-tools-testapps"
FEATURE_PACKAGES_tools-sdk = "packagegroup-core-sdk packagegroup-core-standalone-sdk-target"
FEATURE_PACKAGES_nfs-server = "packagegroup-core-nfs-server"
FEATURE_PACKAGES_nfs-client = "packagegroup-core-nfs-client"
FEATURE_PACKAGES_ssh-server-dropbear = "packagegroup-core-ssh-dropbear"
FEATURE_PACKAGES_ssh-server-openssh = "packagegroup-core-ssh-openssh"
FEATURE_PACKAGES_hwcodecs = "${MACHINE_HWCODECS}"
FEATURE_PACKAGES_read-only-rootfs = "packagegroup-core-read-only-rootfs"

-> But if i build by bitbake this file wrong

-Step3: If i remove step2, and i build by: bitbake dey-image-qt, this is my error:


ERROR: dey-image-qt-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only:

ERROR: dey-image-qt-1.0-r0 do_rootfs: Function failed: do_rootfs

ERROR: Logfile of failure stored in: /tmp/work/ccimx6ulsbc-dey-linux-gnueabi/dey-image-qt/1.0-r0/temp/log.do_rootfs.20079

ERROR: Task (/sources/meta-digi/meta-digi-dey/recipes-core/images/dey-image-qt.bb:do_rootfs) failed with exit code '1'

NOTE: Tasks Summary: Attempted 4331 tasks of which 10 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/sources/meta-digi/meta-digi-dey/recipes-core/images/dey-image-qt.bb:do_rootfs

So, i check this error on google and forum but nothing.

Somebody can help me this error, or how to build read-only-rootfs by digi-yocto?

Thanks so much!
asked Jun 29 in Linux by heenry New to the Community (1 point)

Please log in or register to answer this question.

1 Answer

0 votes
This is not something that we support in DEY. There are several packages that rely on a writable rootfs to work properly.

There is standard support in Yocto for this, see:

https://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#creating-a-read-only-root-filesystem

However, making this work still means that each package will need to support a read-only filesystem. Some of them support this, others would need manual patching.

Our recipes for those packages use certain logic to change things in configuration files at runtime, so they require rw access to the rootfs.

This allows us, for example, to write a unique Wi-Fi AP name for each device, using its MAC address.

You can dig into the recipes of these packages and customize them for your needs, avoiding any post installation action that meta-digi does.
answered Jun 30 by LeonidM Veteran of the Digi Community (3,622 points)
...