cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create bootfs, vendorfs, userfs and rootfs files?

DMårt
Lead

I have compiled.

  • Optee
  • TF-A
  • U-boot
  • Linux

And it seems to work well. I have also tried to implement a pre-made OpenSTLinux from the Source files. And it seems to work well too. I haven't got any terminal up and running. I can only see the display output of messages when I start it up.

Notice that the kernel comes from STM32MP157 and before the kernel startup, it's from STM32MP151. That's why you see that the MAC address is not set, but once linux kernel is started, you can see inside the log that the MAC address is set to "56:bf:8f:58:f8:31".

https://pastebin.com/QTV4qbHr

I need to create bootfs, vendorfs, userfs and rootfs.ext4, so what should I do next? Should I create empty .ext4 files and then mount the .ext4 files and later fill them with...?

 

 

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer
1 ACCEPTED SOLUTION

Accepted Solutions
Erwan SZYMANSKI
ST Employee

Hello @DMårt ,
You can use different strategy to setup you File System partitions. 

1) The cleanest one
As it is done for OpenSTLinux, you can choose to use Yocto to generate your entire image, including BSP with your own software component (your own version of the Kernel, U-boot, OP-TEE ...) and designing yourself the content of your bootfs, rootfs .. The 4 partitions are created by ST files/rules provided in Yocto directly.

2) The simplest one
As you said you already have all your components built, you can take an example Starter Package from ST, replacing all the components by your own ones, keeping only the bootfs, rootfs, vendorfs and userfs intact. Then, once mounted, you can tune them for your purposes. 

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Erwan SZYMANSKI
ST Employee

Hello @DMårt ,
You can use different strategy to setup you File System partitions. 

1) The cleanest one
As it is done for OpenSTLinux, you can choose to use Yocto to generate your entire image, including BSP with your own software component (your own version of the Kernel, U-boot, OP-TEE ...) and designing yourself the content of your bootfs, rootfs .. The 4 partitions are created by ST files/rules provided in Yocto directly.

2) The simplest one
As you said you already have all your components built, you can take an example Starter Package from ST, replacing all the components by your own ones, keeping only the bootfs, rootfs, vendorfs and userfs intact. Then, once mounted, you can tune them for your purposes. 

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

@Erwan SZYMANSKI 

Then I know that I need to use a third party software to build the Linux distro, Meanwhile STM32CubeIDE is only used for (in MP case) compile tf-a, u-boot, Linux kernel and OP-tee.

 

Thank you. That clarifies much.

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer

@Erwan SZYMANSKI 

Can I have some guidance about what do download and run to build bootfs, vendorfs, userfs and roots?

I have successfully created tfa-a, U-boot, kernel and optee and I have successfully flash my eMMC with those and they can be successfully booted at the startup.

 

This  was only made with STM32CubeIDE + the SDK + Sources plugin.

 

So the last step is to create the Linux distribution package. I guessing that the kernel from STM32CubeIDE must be implemented inside the OpenSTLinux distro ?

 

So, where do I start? I'm expecting a software to download and compile and then implement the compiled kernel. Am I right ?

 

I have seen the STM32MP I Distribution Package where I can download a modified Yocto Project from ST and the build it with bitbake.

 

But that does not explain how I can implement my Linux kernel into Yocto.

 

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer