cancel
Showing results for 
Search instead for 
Did you mean: 

Missing bootfs Partition in Yocto TSV Image Layout

Piratkin
Associate II

Hi, I am trying to create an image for writing to NAND memory.

The problem is that when generating a TSV file using Yocto, I get a layout without a bootfs partition.
In this case, it is unclear how to load the Linux kernel and the DeviceTree.
Can someone explain to me why the bootfs is excluded from the image layout file (TSV) and how to handle this situation?

I can try to add this file to the image, but I am confused because this partition is missing even in the examples.
Maybe there's a reason for this that I'm not aware of.

I would greatly appreciate any help.

17 REPLIES 17

@Piratkin ,
In your U-Boot console, can you give the output of : 
U-boot $> ls ubi ubi0:boot
U-boot $> ls ubi ubi0:rootfs /boot

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.

I've checked this several times when testing the image.
The /boot directory is present, but it's empty.
I'm using the same script to create the image, slightly modified for my needs, but there can't be an error in it since I've compared the fragments included in the image.
Moreover, there's only one UBIFS image, so it's quite straightforward.

It seems like there should be a separate bootfs partition in the image, but there isn't.
The documentation linked specifies that bootfs should be included in multivolume.ubifs (the contents of bootfs and not itself, of course).
However, bootfs.ubi is created but not used, which looks like a bug or an error.
Otherwise, it doesn't make sense to create this image:

 

 

st-image-boot-test-stm32mp135d-20240522072918_nand_4_256.bootfs.ubi

 

 

 

 

I've looked through the whole rootfs and there are no boot files and yes, I've checked /boot too

Hello @Piratkin ,
I just take back the files that are generated on OpenSTLinux v5, thanks to yocto, and just to compare with what you can see on your side : 

The st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi generated and present in the TSV file is the analog of your test-image-stm32mp135d_nand_4_256_multivolume.ubi.

When I check the content of this file :

 

PC $> ubireader_extract_images ./st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
PC $> cd ubifs-root/
PC $> cd st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi/
PC $> ubireader_extract_files img-697060950_vol-boot.ubifs
PC $> cd ubifs-root/
PC $> ls

Output :

boot.scr.uimg                   stm32mp135f-dk.dtb               stm32mp157c-ev1.dtb              stm32mp157f-dk2-m4-examples.dtb
mmc0_extlinux                   stm32mp157a-dk1.dtb              stm32mp157c-ev1-m4-examples.dtb  stm32mp157f-ed1.dtb
mmc1_extlinux                   stm32mp157a-ev1.dtb              stm32mp157d-dk1-a7-examples.dtb  stm32mp157f-ev1-a7-examples.dtb
nand0_extlinux                  stm32mp157c-dk2-a7-examples.dtb  stm32mp157d-dk1.dtb              stm32mp157f-ev1.dtb
splash_landscape.bmp            stm32mp157c-dk2.dtb              stm32mp157d-dk1-m4-examples.dtb  stm32mp157f-ev1-m4-examples.dtb
splash_portrait.bmp             stm32mp157c-dk2-m4-examples.dtb  stm32mp157d-ev1.dtb              uImage
st-image-resize-initrd          stm32mp157c-ed1.dtb              stm32mp157f-dk2-a7-examples.dtb
stm32mp135f-dk-a7-examples.dtb  stm32mp157c-ev1-a7-examples.dtb  stm32mp157f-dk2.dtb

 

So it seems that all the information are well placed. I will check which part of Yocto do it so you can clearly compare with the normal situation.

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.

@Piratkin ,
Can you show me the content of this file that you have in your subfolder ? 

ubinize_nand_4_256_multivolume-test-image-stm32mp135d.cfg

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.

You are right, the files can be extracted, so they must be in the multivolume.rootfs.ubi image.

I probably made a mistake somewhere.

Thank you for your support!!!

@Piratkin ,
No problem, I hope that you will find the root cause. Do not hesitate to share a little word here if you find it.

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.

Yes, of course, here it is:

[stm32mp135d]$ cat ubinize_nand_4_256_multivolume-test-image-stm32mp135d-20240523113348.cfg
[U-Boot-env-1]
mode=ubi
vol_id=0
vol_type=dynamic
vol_name=uboot_config
vol_size=256KiB
[U-Boot-env-2]
mode=ubi
vol_id=1
vol_type=dynamic
vol_name=uboot_config_r
vol_size=256KiB
[st-image-bootfs]
mode=ubi
image=/yocto/build/tmp/deploy/images/stm32mp135d/st-image-bootfs-test-stm32mp135d-20240523113348_nand_4_256.bootfs.ubifs
vol_id=2
vol_type=dynamic
vol_name=boot
vol_size=67840KiB
[st-image-vendorfs]
mode=ubi
image=/yocto/build/tmp/deploy/images/stm32mp135d/st-image-vendorfs-test-stm32mp135d-20240523113348_nand_4_256.vendorfs.ubifs
vol_id=3
vol_type=dynamic
vol_name=vendorfs
vol_size=18688KiB
[ubifs]
mode=ubi
image=/yocto/build/tmp/work/stm32mp135d-test-linux-gnueabi/test-image/1.0-r0/deploy-test-image-image-complete/test-image-stm32mp135d-20240523113348_nand_4_256.rootfs.ubifs
vol_id=4
vol_type=dynamic
vol_name=rootfs
vol_size=1754368KiB
[st-image-userfs]
mode=ubi
image=/yocto/build/tmp/deploy/images/stm32mp135d/st-image-userfs-test-stm32mp135d-20240523113348_nand_4_256.userfs.ubifs
vol_id=5
vol_type=dynamic
vol_name=userfs
vol_flags=autoresize