Skip to main content
Associate III
August 13, 2025
Solved

Removing examples from userfs

  • August 13, 2025
  • 1 reply
  • 264 views

Hi,

I have seen this post: https://community.st.com/t5/stm32-mpus-embedded-software-and/how-to-clear-the-default-st-image-userfs-remove-examples-and/m-p/735819#M4265 

and added to my st-image-userfs.bbappend:

PACKAGE_INSTALL:remove = "m4projects-stm32mp1-userfs"
PACKAGE_INSTALL:remove = "linux-examples-stm32mp1-userfs"
PACKAGE_INSTALL:remove = "packagegroup-st-demo"

My machine has:

M4_BOARDS = ""
M4COPRO_LIST = "m4fwcoredump"

I want to keep the "coredump" features. I have noticed though, that now the userfs gets populated with bin, etc,var folders - which were not present before. I can't track it down, how to get rid of those or how they are cleaned by m4project recipes. Any hint?

This topic has been closed for replies.
Best answer by OskarM

Ok, I managed to resolve it (or make a dirty fix).

In st-image-paritions.inc is a "reformat_rootfs" function, that does it. There is an issue with this method, that it expects /usr/local to exist and - since it is using "mv" - it fails on empty folder.

The hack is to install a /usr/local manually and add an dummy file, then remove it before deploying the image.

 

1 reply

OskarMAuthorBest answer
Associate III
August 14, 2025

Ok, I managed to resolve it (or make a dirty fix).

In st-image-paritions.inc is a "reformat_rootfs" function, that does it. There is an issue with this method, that it expects /usr/local to exist and - since it is using "mv" - it fails on empty folder.

The hack is to install a /usr/local manually and add an dummy file, then remove it before deploying the image.