Skip to main content
Explorer
May 29, 2025
Question

To add a partition in tsv file by edit yocto receipe

  • May 29, 2025
  • 1 reply
  • 439 views

Hi STM:

I'm developing with developer package and want to add a slot like below 

PED 0x12 rootfs2 ENV mmc1 0x44A00000 none

or

PED 0x12 rootfs2 ENV mmc1 0x44A00000 st-image-core-openstlinux-weston-stm32mp13-disco.root2fs.ext4

 

About the second case

I have modified layers/meta-st/meta-st-stm32mp/conf/machine/include/st-machine-flashlayout-stm32mp.inc, add below 

STM32MP_ROOTFS2_LABEL ?= "rootfs2"
STM32MP_ROOTFS2_SIZE ?= "1048576"
STM32MP_ROOTFS2_IMAGE ?= "st-image-root2fs"

PARTITIONS_IMAGES[rootfs2] = "${STM32MP_ROOTFS2_IMAGE},${STM32MP_ROOTFS2_LABEL},,${STM32MP_ROOTFS2_SIZE},FileSystem"

STM32MP_ROOTFS2_PROGRAMMER_NAME ?= "rootfs2"
FLASHLAYOUT_PARTITION_ENABLE:${STM32MP_ROOTFS2_PROGRAMMER_NAME} = "PED"
FLASHLAYOUT_PARTITION_ID:${STM32MP_ROOTFS2_PROGRAMMER_NAME} = "0x15"

STM32MP_ROOTFS2_MOUNTPOINT ?= "/usr/rootfs2"
ST_ROOTFS2 ?= "1"
PARTITIONS_CONFIG[rootfs2] = "${STM32MP_ROOTFS2_IMAGE},${STM32MP_ROOTFS2_LABEL},${STM32MP_ROOTFS2_MOUNTPOINT},${STM32MP_ROOTFS2_SIZE},FileSystem"


PARTITIONS_LIST += "rootfs2"
PARTITIONS_LIST_EFI += "rootfs2"

 

But the tsv file is not generated with below warning

Cannot generate FlashLayout_emmc_stm32mp135f-dk-optee.tsv file: the st-image-root2fs-openstlinux-weston-stm32mp13-disco.rootfs2.ext4 binary for rootfs2 partition is missing in deploy folder

 

Please kindly help to provide any suggest

Many thanks

 

    This topic has been closed for replies.

    1 reply

    Explorer
    May 29, 2025

    Hi STM:

    Update:

    I am trying to generate the rootfs2 image and add below 

    cat layers/meta-st/meta-st-stm32mp/recipes-st/images/st-image-rootfs2.bb

    SUMMARY = "STM32MP rootfs2 Image"
    LICENSE = "MIT"

    include recipes-st/images/st-image-partitions.inc

    IMAGE_NAME_SUFFIX = ".rootfs2"

    # Define to null ROOTFS_MAXSIZE
    IMAGE_ROOTFS_MAXSIZE = ""

    # Add specific package for our image:
    PACKAGE_INSTALL += " \
    "

    But get below error
    WARNING: st-image-rootfs2-1.0-r0 do_image: Not able to locate /etc/build file in image rootfs /build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs
    ERROR: st-image-rootfs2-1.0-r0 do_image: ExecutionError('/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/temp/run.reformat_rootfs.1177898', 1, None, None)
    ERROR: Logfile of failure stored in: /build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/temp/log.do_image.1177898
    Log data follows:
    | DEBUG: Executing python function do_image
    | NOTE: Executing extract_buildinfo ...
    | DEBUG: Executing python function extract_buildinfo
    | WARNING: Not able to locate /etc/build file in image rootfs /build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs
    | DEBUG: Python function extract_buildinfo finished
    | NOTE: Executing systemd_preset_all ...
    | DEBUG: Executing shell function systemd_preset_all
    | DEBUG: Shell function systemd_preset_all finished
    | NOTE: Executing reproducible_final_image_task ...
    | DEBUG: Executing shell function reproducible_final_image_task
    | NOTE: reproducible_final_image_task: mtime set to 1723296920
    | DEBUG: Shell function reproducible_final_image_task finished
    | NOTE: Executing reformat_rootfs ...
    | DEBUG: Executing shell function reformat_rootfs
    | NOTE: Mountpoint found in /build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs
    | NOTE: >>> Remove all files and folder except
    | NOTE: >>> Move contents to /build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs
    | mv: '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/bin' and '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/bin' are the same file
    | mv: '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/etc' and '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/etc' are the same file
    | mv: '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/lib' and '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/lib' are the same file
    | mv: '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/sbin' and '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/sbin' are the same file
    | mv: '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/usr' and '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/usr' are the same file
    | mv: '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/var' and '/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/work/stm32mp13_disco-ostl-linux-gnueabi/st-image-rootfs2/1.0/rootfs/var' are the same file
    | WARNING: exit code 1 from a shell command.
    | DEBUG: Python function do_image finished
    ERROR: Task (/build/jordan/workspace/STM/mp131c_vry/shst2-re1/project_build/layers/meta-st/meta-st-stm32mp/recipes-st/images/st-image-rootfs2.bb:do_image) failed with exit code '1'
    NOTE: Tasks Summary: Attempted 6492 tasks of which 6483 didn't need to be rerun and 1 failed.
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 2 seconds

    Thank you

    ST Employee
    June 3, 2025

    Hello @Jordan_Lin,

     

    This mechanism to build TSV files is usefull for ST to manage SoC/board diversity, but if you use only one TSV file, I would recommand to use an hardcoded TSV file.

    In your manchine, you can add the following lines to point to your TSV file which will be deployed after:

    ENABLE_FLASHLAYOUT_DEFAULT = "1"

    FLASHLAYOUT_DEFAULT_SRC = " \

    files/flashlayouts/optee/myFlashLayout1.tsv \

    files/flashlayouts/optee/myFlashLayout2.tsv \"

       

    BR,

    Christophe

     

    Explorer
    June 5, 2025

    Hi Christophe::

    Thanks for reply

    Would you provide me some advices that which recipe file is proper for me  to add the lines?

    Maybe like below bb file?

    layers/meta-st/meta-st-openstlinux/recipes-core/systemd/systemd-mount-partitions.bb

     

    And i create a new directory like 

    layers/meta-st/meta-st-openstlinux/recipes-core/systemd/files/flashlayouts/optee/

    and put the hardcoded tsv file below it

    Then if the modification is work, the tsv file will occur in below directory?

    build-openstlinuxweston-stm32mp13-disco/tmp-glibc/deploy/images/stm32mp13-disco/flashlayout_st-image-core/optee/

     

    Thank you for help

    Jordan