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: Increase BOOT0 and BOOT1 partition in EMMC

Part Number: AM625

Hello TI Experts,

In our custom design board of AM625x, we have EMMC BOOT0 and BOOT1 partition in 2 MB which is not sufficient and must be at least 4MB as per the below thread:
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1200265/processor-sdk-j721e-minimum-emmc-boot-partition-size?tisearch=e2e-sitesearch&keymatch=change%252520boot%252520partition%252520emmc#

How can I increase my board EMMC BOOT partition?

Thanks,

Anil

  • Hello Anil,
    eMMC boot partition size is pre-configured by eMMC vendor. The boot partition size is defined by eMMC read only EXTCSD[226] register as listed below:
    Boot Partition size = 128Kbytes × BOOT_SIZE_MULT

    For example, on TI AM62x-SK board, the eMMC boot partition size for boot0/boot1: 31.5 MiB

    For tight eMMC boot partition size, it is necessary to
    1/. optimize (reduce) the binary size of tiboot3.bin/tispl.bin/u-boot.img, plus
    2/. adjust the binary layout within the eMMC boot partition after the binary size optimizations.
    Here is an FAQ on <How to customize eMMC and OSPI flash layout for SPL/u-boot booting with TI AM62x Linux SDK>.
    e2e.ti.com/.../faq-am62x-how-to-customize-emmc-and-ospi-flash-layout-for-spl-u-boot-booting-with-ti-am62x-linux-sdk
    Best,
    -Hong

    @u-boot
    => mmc info
    Device: mmc@fa10000
    Manufacturer ID: 13
    OEM: 14e
    Name: S0J56 
    Bus Speed: 200000000
    Mode: HS200 (200MHz)
    Rd Block Len: 512
    MMC version 5.1
    High Capacity: Yes
    Capacity: 14.8 GiB
    Bus Width: 8-bit
    Erase Group Size: 512 KiB
    HC WP Group Size: 8 MiB
    User Capacity: 14.8 GiB WRREL
    Boot Capacity: 31.5 MiB ENH
    RPMB Capacity: 4 MiB ENH
    Boot area 0 is not write protected
    Boot area 1 is not write protected
    
    @kernel
    root@am62xx-evm:~# dmesg |grep mmcblk0
    [    1.556292] mmcblk0: mmc0:0001 S0J56X 14.8 GiB
    [    1.561017] mmcblk0boot0: mmc0:0001 S0J56X partition 1 31.5 MiB
    [    1.569938] mmcblk0boot1: mmc0:0001 S0J56X partition 2 31.5 MiB
    [    1.586684] mmcblk0rpmb: mmc0:0001 S0J56X partition 3 4.00 MiB, chardev (237:0)

  • Thank you Hong for your reply.

    Really sorry for the late reply. 

    Is there any way we can bypass the BOOT partition and boot EMMC from the main partition by making two partitions p1 and p2 inside emmc just like SD CARD?

    Thanks and Regards,

    Anil Patel

  • Hello Anil,
    For most of embedded system with eMMC, the commonly eMMC usage:
    - eMMC boot partitions (boot0/boot1): bootloader (i.e. u-boot)
    - UDA: rootFS, which can be further partitioned depending on user case, i.e. read-only rootFS, writeable FS etc...
    Booting from eMMC boot partition is the default eMMC boot option in TI Linux SDK:
    software-dl.ti.com/.../UG-Memory.html

    With the above being said, it is doable to boot from eMMC UDA, but there're extra work you'll need to modify as necessary yourself...
    1/. partition UDA, i.e. partition#1 (FAT/raw) for u-boot binaries, partition#2 for rootFS...
    2/. refer to <5.4.4 eMMC Boot> in AM62x TRM on BOOTMODE pins setup in order for ROM to load tiboot3.bin from eMMC UDA (FAT/raw).
    3/. modify u-boot code as necessary to have R5-SPL load A53 u-boot binaries (tispl.bin, u-boot.img), i.e. 
    git.ti.com/.../am642_init.c
    git.ti.com/.../spl_mmc.c

    Best,
    -Hong