cancel
Showing results for 
Search instead for 
Did you mean: 

Help with st-image-core shrinking

Eldam
Senior

Hello ST Team!

I'm trying to setup a simple headless distribution (with last available kit from ST), using st-image-core as a basis:

"DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh"

followed by:

"bitbake st-image-core"

It compiles fine, and i can test on my DK2.

So I modified <builddir>/local.conf to include:

IMAGE_INSTALL_append = " python3-requests"

IMAGE_INSTALL_append = " python3-spidev"

and to remove some package:

DISTRO_FEATURES_remove = " alsa gstreamer splashscreen kde pulseaudio" in order to get a thinner distro.

All is fine at this step.

Unfornately i'm trying to remove 'packagegroup-st-demo" or "m4projects-stm32mp1-userfs" "linux-examples-stm32mp1-userfs"

using the same methods, with no success! By the way it would be cool to remove unused partition too (/usr/local/)

1) May someone could tell me what is the correct way to do this?

2) When it successfuly compiles, i see an "uInitrd" thing in the /boot partition and i'm not sure what to do with it. My Linux knowledge is not best as i would hope, so i'd like to remove it too.

(in order to have the closest approaching distribution regarding the Starter package)

3)And last question, regarding "extlinux.conf":

with my last made distrib, i see the following (lines truncated):

"APPEND root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200"

If i compare it with DK2-Starter kit, we have:

"APPEND root=/dev/mmcblk0p6 rootwait rw console=ttySTM0,115200"

-->What is the magic number?

-->How can i set it like the StarterKit "extLinux.conf"?

Voilà, lot of questions,

Answering should help me to get out of this Innsmouth fog.

Have nice Holidays!

3 REPLIES 3
Bernard PUEL
ST Employee

Hello,

If you want to create your distribution (downsized), you can start from st-image-core and downgrade what you don't require (like you did).

This image (./meta-st-openstlinux/recipes-st/images/st-image-core.bb) should allow you to run most of the peripherals of ST boards. "packagegroup-st-demo" is not in st-core-image and other packet are not features, that's why you probably have issue.

But you can choose also some openembedded images (core image or core minimal image) where you will need to add features related to ST boards.

Now if Yocto stuff is not your favorite, you may also use buildroot to manage smaller distribution with more "predictive" way (see https://bootlin.com/blog/building-a-linux-system-for-the-stm32mp1-basic-system/).

The starter package content is the exact content of the st-image-weston distribution. So it is not a minimalist content.

Hsn
Associate III

I am also trying the same thing. For me the St-image-core build without any problem. But when i ran the image in my board i am only able to see the spalsh screen but nothing else. Can you please help why is this so? and also if i would like to use the core-image-minimal which packages from STM32 should i add in order to get the minimal working OS like BSP etc??

Hello @Hsn​ ,

When you say you are not able to see the splash screen, are you able to use the shell prompt to be sure the kernel is starting ? Normally the demo package is removed in the st-image-core that's why you cannot be in the "demo menu" after booting.

I am not sure to understand exactly what you need because the st-image-core is already the minimal working OS that you can get. You can add the package "packagegroup-st-demo" if this is what you meant.

Armand