Unable to enable read-only-rootfs

I am trying to switch rootfs to read-only using method described on How to implement a Read-Only Rootfs (Linux) | Toradex Developer Center. As I am using Verdin iMX8M Plus, I should apply fix for alsa-state, but unfortunately it seems that content of meta-custom/recipes-bsp/alsa-state/alsa-state.bbappend is wrong:

pkg_postinst_${PN}_mx8m_tdx () {

pkg_postinst_ontarget_${PN}_mx8m_tdx () {


Creating this file results in following error:

ERROR: ParseError at /home/dev/oe-core/build/../layers/meta-xxx/recipes-bsp/alsa-state/alsa-state.bbappend:7: unparsed line: 'do_install_append_mx8'
ERROR: Parsing halted due to errors, see error messages above

Well, do_install_append_mx8 seems to be unfinished line. Also, previous lines (pkg_postinst...) use old override syntax that was used before Yocto 3.4 (honister), see release notes for details.

Looking at meta-toradex-nxp/recipes-bsp/alsa-state/alsa-state.bbappend for reference, I assume that my .bbappend file should look like this:

pkg_postinst:${PN}:mx8m-generic-bsp:tdx () {

pkg_postinst_ontarget:${PN}:mx8m-generic-bsp:tdx () {

As far as I understand it, it should disable (well, create empty) functions pkg_postinst and pkg_postinst_ontarget. The former one is empty in meta-toradex-nxp layer already, the latter one should be the culprit of the issue (as _ontarget task will be done after creating read-only rootfs, on target device), but those changes do not make any difference.

Also, I have no idea if there should be any changes to do_install function (as the last line of proposed file suggests) or not. It does not make any sense to me, I have no idea what could original idea behind that page in developer center be.


  • Verdin iMX8MP Q 4GB WB IT V1.1A
  • Yocto layers synced today to refs/tags/6.5.0
    • DISTRO_VERSION = "6.5.0-devel-20240328151402+build.0"

Please advice. I have gut feeling that it is something trivial, but I am not able to figure out how I should write that .bbappend file.


I have found the cause of the issue. My meta layer had lower priority than meta-toradex-nxp, so the changes were never applied. After changing the priorities, it seems that .bbappend with following content is enough:

pkg_postinst_ontarget:${PN}:mx8m-generic-bsp:tdx () {

This will simply just disable pkg_postinst_ontarget task, so everything can be done during build.

Anyway, if anyone from Toradex could update the developer center page to include correct instructions, that would be great. Thanks!

Hello @egm.chmelar,

Welcome to the Toradex Community!

Thanks for posting the solution to your problem.
The developer website page you mentioned is outdated, we will update it with the correct information.

Best Regards,