Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: AM625 EMMC partitioning from u-boot.

Part Number: AM625

I am working on am62xx based custom board. I got u-boot source code ported and verified for custom board from other vendor with 08.05.00.00 sdk.

I got a board with a rootfs on EMMC flash with single partition.

I need to create a partition schema to support RFS Upgrade, which contains for partitions (boot, rootfs1,rootfs2,Upgrade).

I did a USB DFU boot and fallowing below steps to create two partitions (i.e Boot, Rootfs). 

software-dl.ti.com/.../UG-Memory.html

=> setenv uuid_gpt_disk 714a8708-1c94-4c89-97a7-b2f2ad5256e1
=> setenv uuid_gpt_rootfs 10b6fe01-dfcd-4efd-baad-ea9a256d4dc5

=> gpt write mmc 0 ${partitions}
Writing GPT: success!

mmc part  command not showing the newly created partions but showing old partition.  
=> mmc part

Partition Map for MMC device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000022      0x01d59fde      "rootfs"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   10b6fe01-dfcd-4efd-baad-ea9a256d4dc5
=>       

if  i do mmc erase  and created partitions again still showing old partition.

Need help in creating emmc partitions from u-boot. 

How to update/expand dfu_alt_info_emmc env variable to update emmc using dfu tool from host.

  • Hello,
    software-dl.ti.com/.../UG-Memory.html
    did you run all cmds as listed in sequence?
    Best,
    -Hong

  • yes i am fallowing all the commands in sequence. I am not seeing two partions with mmc part command.      

    Am62xx based custom board is already having one rootfs image. 

  • Hello,
    Some customization would be needed for creating multiple partitions within eMMC UDA via "gpt...". Here is one reference.
    github.com/.../README.gpt
    Please note that "gpt..." is maintained by community, not TI.
    Best,
    -Hong

  • Hong,

    Can you provide me any reference  i.e e2e forum/link that provides some sample commands to do so.

    Regards,

    Siva.

  • Hi Hong,

    please help me on

    How to update/expand dfu_alt_info_emmc env variable as per my current partition schema.

    Regards,

    Siva.

  • Hong,

    I did below changes in "include/configs/am62x_evm.h" file.

     /* Linux partitions */ \
            "uuid_disk=${uuid_gpt_disk};" \
            "name=boot,size=100Mib,bootable,uuid=${uuid_gpt_boot};" \
            "name=rootfs_A,size=2000Mib,uuid=${uuid_gpt_rootfs_A};" \
            "name=rootfs_B,size=2000Mib,uuid=${uuid_gpt_rootfs_B};" \
            "name=Upgrade,size=0,uuid=${uuid_gpt_Up};" \

    in  configs/am62x_evm_a53_defconfig, Added flag CONFIG_RANDOM_UUID=y.

    After rebuilding and loading u-boot binaries i can clearly see the updated env variables.

    => gpt write mmc 0 $partitions
    Writing GPT: Partition list incomplete
    error!

    => printenv uuid_gpt_disk    
    uuid_gpt_disk=46c418bb-5012-7f40-ab73-f7c32aa8c29d
    => printenv uuid_gpt_rootfs_A
    uuid_gpt_rootfs_A=49755608-dd92-9540-b380-d95e542d35b7
    => printenv uuid_gpt_rootfs_B
    uuid_gpt_rootfs_B=8008da4e-aa2e-f34b-990e-eb43adde2f67
    => printenv uuid_gpt_Up
    uuid_gpt_Up=7190bce0-7326-a74d-9a4c-cf36b405d034
    =>

    please review my changes and let us know what was going wrong.

  • Some customization would be needed for creating multiple partitions within eMMC UDA via "gpt...". Here is one reference.
    github.com/.../README.gpt
    Please note that "gpt..." is maintained by community, not TI.

    We don't have out-of-box examples from TI SDK on your request. You'd carry out customization work for your user case.

  • Hong,

    In  "include/configs/am62x_evm.h" file, mentioned size as -1 in my last partiton. I replaced ';' with '\0'.

    /* Linux partitions */ \
            "uuid_disk=${uuid_gpt_disk};" \
            "name=boot,size=100Mib,bootable,uuid=${uuid_gpt_boot};" \
            "name=rootfs_A,size=2000Mib,uuid=${uuid_gpt_rootfs_A};" \
            "name=rootfs_B,size=2000Mib,uuid=${uuid_gpt_rootfs_B};" \
            "name=Upgrade,size=-1,uuid=${uuid_gpt_Up};\0"  

    Removed below one as i am getting build error.

    -       /* Android partitions */ \
    -       "partitions_android=" \
    -       "uuid_disk=${uuid_gpt_disk};" \
    -       "name=bootloader,start=5M,size=8M,uuid=${uuid_gpt_bootloader};" \
    -       "name=tiboot3,start=4M,size=1M,uuid=${uuid_gpt_tiboot3};" \
    -       "name=uboot-env,start=13M,size=512K,uuid=${uuid_gpt_env};" \
    -       "name=misc,start=13824K,size=512K,uuid=${uuid_gpt_misc};" \
    -       "name=boot_a,size=40M,uuid=${uuid_gpt_boot_a};" \
    -       "name=boot_b,size=40M,uuid=${uuid_gpt_boot_b};" \
    -       "name=dtbo_a,size=8M,uuid=${uuid_gpt_dtbo_a};" \
    -       "name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b};" \
    -       "name=vbmeta_a,size=64K,uuid=${uuid_gpt_vbmeta_a};" \
    -       "name=vbmeta_b,size=64K,uuid=${uuid_gpt_vbmeta_b};" \
    -       "name=super,size=4608M,uuid=${uuid_gpt_super};" \
    -       "name=metadata,size=16M,uuid=${uuid_gpt_metadata};" \
    -       "name=persist,size=32M,uuid=${uuid_gpt_persist};" \
    -       "name=userdata,size=-,uuid=${uuid_gpt_userdata}\0"

    With this changes i can get the required partition schema.

    => mmc part

    Partition Map for MMC device 0  --   Partition Type: EFI

    Part    Start LBA       End LBA         Name
            Attributes
            Type GUID
            Partition GUID
      1     0x00000022      0x00032021      "boot"
            attrs:  0x0000000000000004
            type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            guid:   d9b7d8e1-df34-7746-ac2c-312abec431fb
      2     0x00032022      0x0041a021      "rootfs_A"
            attrs:  0x0000000000000000
            type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            guid:   9f7b99fe-d45c-6441-9914-05975efd4b84
      3     0x0041a022      0x00802021      "rootfs_B"
            attrs:  0x0000000000000000
            type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            guid:   f689013d-872a-0347-8362-c581699d379f
      4     0x00802022      0x01d59fde      "Upgrade"
            attrs:  0x0000000000000000
            type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            guid:   a1c10cf6-17f9-8b4e-b179-7363bfb4f687

    Now i want send & write all the binaries to the respective partitons using dfu utility.

    How to update below env variable to do so.

    printenv dfu_alt_info_mmc
    dfu_alt_info=boot part 0 1;rootfs part 0 2;MLO fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1"
    

    Regards,

    Siva.

  • Hello Siva,
    You'll need to start with "dfu_alt_info_emmc", and customize it for flashing eMMC via DFU.
    Best,
    -Hong

  • Is is it possible to create a fat/ext4 partition from uboot?

    In include/environment/ti/k3_dfu.h

    #define DFU_ALT_INFO_MMC \
            "dfu_alt_info_mmc=" \
            "boot part 1 1;" \
            "rootfs part 1 2;" \
            "tiboot3.bin fat 1 1;" \
            "tispl.bin fat 1 1;" \
            "u-boot.img fat 1 1;" \
            "uEnv.txt fat 1 1;" \
            "sysfw.itb fat 1 1\0"

    can i update the same as per my partiton to DFU_ALT_INFO_MMC

    #define DFU_ALT_INFO_MMC \
            "dfu_alt_info_mmc=" \
            "boot part 0 1;" \
            "rootfs_A part 0 2;" \

            "rootfs_B part 0 2;" \       
            "tiboot3.bin fat 0 1;" \
            "tispl.bin fat 0 1;" \
            "u-boot.img fat 0 1;" \
            "uEnv.txt fat 0 1;" \
            "sysfw.itb fat 0 1\0"

    I tried this but dfu-util fails. My understanding was created a partition using gpt but not filesystem based.

    If not possible, if linux comes up can make it as fat partition atleast at boot up.

  • You'll need to start with "dfu_alt_info_emmc", and customize it for flashing eMMC via DFU.

    It is "dfu_alt_info_emmc"