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.

SK-AM62B-P1: How and what is flashed in which part of the emmc?

Part Number: SK-AM62B-P1

I wanted to flash custom images into the images of the evk,which have the following components:

  • A boot patition
    • tiboot3.bin
    • tispl.bin
    • u-boot.img
    • uboot.env
  • A ext4 partition in the user data area containing
    • Linux Kernel image
    • Linux DTB
    • Linux file system

So,I was wondering,if I can do so with these guides,because they're more inclined towards .appimage files:
1.https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/latest/exports/docs/api_guide_am62x/EXAMPLES_DRIVERS_SBL_EMMC_LINUX_MULTISTAGE.html
2.https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/latest/exports/docs/api_guide_am62x/SBL_BOOTING_LINUX_EMMC.html

Also,which parts go where ,with respect to this diagram:

+---------+---------+--------+----------------------------------+
|  boot0  |  boot1  |  rpmb  |          User Data Area          |
+---------+---------+--------+----------------------------------+


All suggestions are welcome,thanks in advance

  • Dear Prashant,

    Thank you for the guides,but is there any way you can flash the emmc using uart,instead of sd card ?

    Regards,

    Shreyan

  • Dear Prashant,
    I followed the instructions,and flashed into the board using the python script,and it did so without any errors,but even then the evk doesn't boot up via emmc,would you mind suggesting where I could've gone wrong?

    I tried in all the modes,uart,ospi and emmc but it doesn't boot up.

    Regards,

    Shreyan

  • Hi Shreyan,

    I followed the instructions,and flashed into the board using the python script,

    Could you please share these flashing logs?

    Regards,

    Prashant



  • Here are the logs,I've used the same script and uart mode to flash,and I'm using emmc boot mode to boot it through a serial port. The board is a brand new one and doesn't have anything else,are are there any additional steps to take?
    Regards,

    Shreyan

  • Hi Shreyan,

    You have used the operation "--operation=flash" which flashes to OSPI. Please use "--operation=flash-emmc"

    # Flash tiboot3.bin
    --file=<path to file>/tiboot3.bin --operation=flash-emmc --flash-offset=0x0
    
    # Flash tispl.bin
    --file=<path to file>/tispl.bin --operation=flash-emmc --flash-offset=0x80000
    
    # Flash u-boot.img
    --file=<path to file>/u-boot.img --operation=flash-emmc --flash-offset=0x280000
    

    Regards,

    Prashant

  • Dear Prashant,

    I did flash it,but the uboot isn't able to find the kernel,and this is what I tried via the u-boot:

    setenv mmcdev 0
    setenv bootpart 0:2
    boot


    I even tried
    setenv mmcdev 0
    setenv bootpart 0
    boot
    
    


    It shows this instead:

    U-Boot SPL 2023.04-gb0d717b732 (Dec 06 2023 - 15:11:45 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    SPL initial stack usage: 13384 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    NOTICE:  BL31: Built : 09:34:15, Aug 24 2023
    
    U-Boot SPL 2023.04-gb0d717b732 (Dec 06 2023 - 15:11:45 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    SPL initial stack usage: 1856 bytes
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1:1
    Error: could not access storage.
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    
    
    U-Boot 2023.04-gb0d717b732 (Dec 06 2023 - 15:11:45 +0000)
    
    SoC:   AM62X SR1.0 HS-FS
    Model: Texas Instruments AM625 SK
    EEPROM not available at 80, trying to read at 81
    Board: AM62B-SKEVM-P1 rev A
    DRAM:  2 GiB
    Core:  72 devices, 32 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial
    Out:   serial
    Err:   serial
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 
    => setenv mmcdev 0
    => setenv bootpart 0
    => boot
    switch to partitions #0, OK
    mmc0(part 0) is current device
    SD/MMC found on device 0
    Failed to load 'boot.scr'
    Failed to load 'uEnv.txt'
    ## Error: "main_cpsw0_qsgmii_phyinit" not defined
    Failed to load '/boot/Image'
    Failed to load '/boot/dtb/ti/k3-am625-sk.dtb'
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    Bad Linux ARM64 Image magic!
    switch to partitions #0, OK
    mmc0(part 0) is current device
    Scanning mmc 0:1...
    MMC: no card present
    No EFI system partition
    No EFI system partition
    Failed to persist EFI variables
    BootOrder not defined
    EFI boot manager: Cannot load any image
    MMC: no card present
    starting USB...
    Bus usb@31100000: generic_phy_get_bulk : no phys property
    Register 1000840 NbrPorts 1
    Starting the controller
    USB XHCI 1.10
    scanning bus usb@31100000 for devices... 1 USB Device(s) found
           scanning usb for storage devices... 0 Storage Device(s) found
    
    Device 0: unknown device
    ethernet@8000000port@1 Waiting for PHY auto negotiation to complete........
    U-Boot SPL 2023.04-gb0d717b732 (Dec 06 2023 - 15:11:45 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    SPL initial stack usage: 13384 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    NOTICE:  BL31: Built : 09:34:15, Aug 24 2023
    
    U-Boot SPL 2023.04-gb0d717b732 (Dec 06 2023 - 15:11:45 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
    SPL initial stack usage: 1856 bytes
    MMC: no card present
    ** Bad device specification mmc 1 **
    Couldn't find partition mmc 1:1
    Error: could not access storage.
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    
    
    U-Boot 2023.04-gb0d717b732 (Dec 06 2023 - 15:11:45 +0000)
    
    SoC:   AM62X SR1.0 HS-FS
    Model: Texas Instruments AM625 SK
    EEPROM not available at 80, trying to read at 81
    Board: AM62B-SKEVM-P1 rev A
    DRAM:  2 GiB
    Core:  72 devices, 32 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial
    Out:   serial
    Err:   serial
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0 
    => 
    


    What do you suggest I do?

    Regards,
    Shreyan

  • Hi,

    Can you please share the output of the following command run from the U-Boot prompt

    => mmc dev 0 0
    => mmc part
    

  • Dear Prashant,

    => mmc dev 0 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    => mmc part
    
    Partition Map for MMC device 0  --   Partition Type: DOS
    
    Part    Start Sector    Num Sectors     UUID            Type
      1     2048            32768           0d0c5ad5-01     0e Boot
      2     34816           31045632        0d0c5ad5-02     83
    

    This is the output
    Regards,
    Shreyan

  • Thanks. So, the eMMC is already partitioned.

    Can you now run the following command to see if the second partition contains a rootfs

    => ls mmc 0:2
    => ls mmc 0:2 /boot
    => ls mmc 0:2 /boot/dtb/ti

  • They aren't showing anything,I don't think it does

  • If these commands are not showing anything then you haven't yet flashed Linux Rootfs in the eMMC. If the Linux Rootfs is flashed correctly, you should see the output similar to the following where Linux Rootfs is flashed in partition 1

    verify-emmc-partition-before-booting-linux.md
    ## How to verify eMMC partition content before booting Linux Kernel
    ```
    => mmc part
    
    Partition Map for MMC device 0  --   Partition Type: EFI
    
    Part    Start LBA       End LBA         Name
            Attributes
            Type GUID
            Partition GUID
      1     0x00000022      0x01da3fde      "rootfs"
            attrs:  0x0000000000000000
            type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
            guid:   51342c80-6801-457b-928a-72c4a6a00d7a
    => ls mmc 0:1
    <DIR>       4096 .
    <DIR>       4096 ..
    <DIR>      16384 lost+found
    <DIR>       4096 bin
    <DIR>       4096 boot
    <DIR>       4096 dev
    <DIR>       4096 etc
    <DIR>       4096 home
    <DIR>       4096 lib
    <SYM>         19 linuxrc
    <DIR>       4096 media
    <DIR>       4096 mnt
    <DIR>       4096 proc
    <DIR>       4096 run
    <DIR>       4096 sbin
    <DIR>       4096 srv
    <DIR>       4096 sys
    <DIR>       4096 tmp
    <DIR>       4096 usr
    <DIR>       4096 var
    => ls mmc 0:1 /boot
    <DIR>       4096 .
    <DIR>       4096 ..
    <DIR>       4096 EFI
    <SYM>         29 Image
            19376640 Image-6.1.80-ti-g2e423244f8c0
    <DIR>       4096 dtb
    <SYM>         32 fitImage
             8408718 fitImage-6.1.80-ti-g2e423244f8c0
    => ls mmc 0:1 /boot/dtb/ti
    <DIR>       4096 .
    <DIR>       4096 ..
                1990 k3-am625-beagleplay-csi2-ov5640.dtbo
                1990 k3-am625-beagleplay-csi2-tevi-ov5640.dtbo
                2882 k3-am625-beagleplay-lincolntech-lcd185-panel.dtbo
               61115 k3-am625-beagleplay.dtb
                1116 k3-am625-sk-dmtimer-pwm.dtbo
                 872 k3-am625-sk-ecap-capture.dtbo
                1969 k3-am625-sk-lincolntech-lcd185-panel.dtbo
                1116 k3-am625-sk-mcspi-loopback.dtbo
                2462 k3-am625-sk-microtips-mf101hie-panel.dtbo
                1406 k3-am625-sk-microtips-mf103hie-lcd2.dtbo
                1636 k3-am625-sk-pwm.dtbo
                2360 k3-am625-sk-rpi-hdr-ehrpwm.dtbo
               59546 k3-am625-sk.dtb
                1915 k3-am62x-sk-csi2-imx219.dtbo
                1886 k3-am62x-sk-csi2-ov5640.dtbo
                1886 k3-am62x-sk-csi2-tevi-ov5640.dtbo
                2131 k3-am62x-sk-csi2-v3link-fusion.dtbo
                 936 k3-am62x-sk-eqep.dtbo
                1345 k3-am62x-sk-hdmi-audio.dtbo
                 478 k3-am62x-sk-hdmi-disable-fastboot.dtbo
                4232 k3-am62x-sk-lpm-wkup-sources.dtbo
                2192 k3-am62x-sk-mcan.dtbo
    => 
    ```
    

    Please refer to the following guide for flashing Linux:

    SD card: https://dev.ti.com/tirex/explore/node?node=A__AdNWBqCVds4ZSqU9osT1tQ__AM62-ACADEMY__uiYMDcq__LATEST

    DFU: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1127618/faq-sk-am62-how-to-flash-emmc-using-usb-dfu-on-am62x-sk-e2

  • Dear Prashant,

    The guide you've sent is for flashing via sd card,is there any way to do the same via uart?
    Regards,

    Shreyan

  • is there any way to do the same via uart?

    Flashing Linux via UART is not at all feasible. It will take you many hours to do that.

    I already shared the DFU flashing FAQ. You can follow that.

  • Dear Prashant,

    Thank you for your time and efforts.
    Regards,

    Shreyan