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.

AM6548:How to run Coretex-A on LINUX with no SD card inserted.

Part Number: AM6548

I would like to know how to run Coretex-A on LINUX with no SD card inserted.

When I booted using the SD card created according to the procedure described in the guide below, I was able to confirm that it was working on LINUX.
However, when I remove the SD card, it doesn't seem to work on LINUX.

 Getting_Started_Guide(software-dl.ti.com/.../Overview_Getting_Started_Guide.html)
   1.1. Getting Started Guide
   1.2. Building the SDK

  • Hi,

    If you remove the SD card, then you will need to do two things:

    1. Prepare the boot and rootfs with the alternate boot media
    2. Switch the boot modes and then try to boot.

    This procedure is documented in the SDK documentation.

    It is invalid to expect that the board will boot Linux if the SD card is removed.

    Regards

    Karthik

  • Hello Karthik,

    Thank you for your reply.

    Is it the Getting_Started_Guide "3.1. U-Boot" that describes the procedure? Or is it "6.1.6. How to Flash Linux System from U-boot"?

    I would like to know the document file name and chapter that describes the procedure.

  • Hi,

    This would be an appropriate section to start looking further. You can try to get to the u-boot prompt to begin with:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_U-Boot.html#booting-mlo-and-u-boot-from-emmc-boot-partition

    Regards

    Karthik

  • Hello Karthik,

    Thank you for your reply.

    After performing the steps in Chapter 3.1.1.6.6, the negotiation was not completed. Also, partition switching fails.
    Please tell me what to do.

    => dhcp
    cpsw_nuss@046000000 Waiting for PHY auto negotiation to complete.................user interrupt!
    phy_startup failed
    => mmc dev 1 1
    switch to partitions #1, ERROR

  • Hi,

    I pointed you to booting with eMMC but now you are booting with TFTP, so I'm not sure which boot media you booted from and what you are attempting to try now? Can you please share details on what you have tried?

    Regards

    Karthik

  • Hello Karthik,

    Thank you for your reply.

    I was able to create an SD card according to the procedure in Chapter 1.1.4 and run A-Core on LINUX from the SD card inserted in the evaluation board (AM65x IDK).


    Is it possible to run A-Core on LINUX from the evaluation board (AM65x IDK) without an SD card?
    If that is possible, please teach me how to do it.

  • Hi,

    There are several options, it depends on what you are looking for.

    Since you already have the SD card prepared, you can boot with the SD card and then write to the eMMC and then you can boot from eMMC (without the SD card).

    I already pointed you to this link to explore further - this should help you.

    Please try it out: http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_U-Boot.html#booting-mlo-and-u-boot-from-emmc-boot-partition 

    Regards

    Karthik

  • Hello Karthik,

    Thank you for your reply.

    Booted with an SD card and performed the steps in Chapter 3.1.1.6.7 on the u-boot prompt.
    When I restarted after that, I was able to start from eMMC, but the following error was displayed.
    What can I do to avoid this error?

    --------------------------------------------------------------------------------
    U-Boot SPL 2020.01-gf9b0d030d3 (Aug 10 2020 - 17:47:39 +0000)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    Trying to boot from MMC1
    Starting ATF on ARM64 core...

    NOTICE: BL31: v2.3():07.00.00.005-dirty
    NOTICE: BL31: Built : 17:03:45, Aug 10 2020

    U-Boot SPL 2020.01-gf9b0d030d3 (Aug 10 2020 - 17:11:07 +0000)
    SYSFW ABI: 3.0 (firmware rev 0x0014 '20.04.1-v2020.04a (Terrific Lla')
    Detected: AM6-IDKAPPEVM rev E4
    Detected: SER-PCIE2LEVM rev E3
    Trying to boot from MMC1


    U-Boot 2020.01-gf9b0d030d3 (Aug 10 2020 - 17:11:07 +0000)

    SoC: AM65X SR2.0
    Model: Texas Instruments AM654 Base Board
    Board: AM6-COMPROCEVM rev E3
    DRAM: 4 GiB
    MMC: sdhci@4f80000: 0, sdhci@04FA0000: 1
    Loading Environment from MMC... OK
    In: serial
    Out: serial
    Err: serial
    Detected: AM6-IDKAPPEVM rev E4
    Detected: SER-PCIE2LEVM rev E3
    Net: eth0: cpsw_nuss@046000000
    Hit any key to stop autoboot: 0
    SD/MMC found on device 1
    ## Error: "setup_mmc" not defined
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    Bad Linux ARM64 Image magic!
    =>
    --------------------------------------------------------------------------------

    The BOOT switch of IDK is set as follows.

    Bootmode 0:ON
    Bootmode 1:OFF
    Bootmode 2:ON
    Bootmode 3:ON
    Other than those above :OFF

  • Hi Tomitama,

    Looking at the error message above, it seems like you didn't flash the rootfs and kernel.

    Can you please make sure that you do that and also you need update the bootargs in the dtb to point to the eMMC instead of the SDcard boot.

    Regards

    Karthik

  • Hello Karthik,

    Thank you for your reply.

    Please tell me in detail how to flash rootfs and kernel and how to update dtb's bootargs to point to eMMC instead of SD card boot.

  • Hi Tomitama,

    Are you using the latest SDK - can you please confirm the version?

    I will try to give you the instructions with the same SDK as the starting point.

    Regards

    Karthik

  • Hello Karthik,

    Thank you for your reply.

    I am using the following SDK.

    ti-processor-sdk-linux-am65xx-evm-07_00_01_06

  • Hi Tomitama,

    Thanks, we will try this and come back to you latest by Monday.

    Regards

    Karthik

  • Hi Tomitama,

    I do not have a am65xx EVM handy but I haven't validated the instructions - but they should work for you.

    So as I understand that you have the boot0 partition of the eMMC flashed and now we are looking at flashing the file system to the eMMC user partition:

    eMMC layout:
    
               boot0 partition (8 MB)                        user partition
       0x0+----------------------------------+      0x0+-------------------------+
          |     tiboot3.bin (512 KB)         |         |                         |
     0x400+----------------------------------+         |                         |
          |       tispl.bin (2 MB)           |         |                         |
    0x1400+----------------------------------+         |        rootfs           |
          |       u-boot.img (4 MB)          |         |                         |
    0x3400+----------------------------------+         |                         |
          |      environment (128 KB)        |         |                         |
    0x3500+----------------------------------+         |                         |
          |   backup environment (128 KB)    |         |                         |
    0x3600+----------------------------------+         |                         |
          |          sysfw (1 MB)            |         |                         |
    0x3E00+----------------------------------+         +-------------------------+

    -1-

    The first step when you are able to boot to u-boot from eMMC boot0 is to create a software partition for the rootfs in eMMC.

    for this, halt at u-boot when booting from eMMC and run the below:

    gpt write mmc 0 ${partitions}

    -2-

    Now you need to flash the filesystem to eMMC user partition. There are multiple ways to do this but the easiest would be to use the SD card.

    Power cycle the board and change the bootmode to SD boot mode - boot to kernel from SD card.

    Here you should be able to see ls -la /dev/mmcblk0p1 device - this is the rootfs partition of the eMMC.

    umount /run/media/*
    mkdir /mnt/sd-rootfs
    mount /dev/mmcblk1p2 /mnt/sd-rootfs
    mkdir /mnt/emmc-rootfs
    mount /dev/mmcblk0p1 /mnt/emmc-rootfs
    cp -r /mnt/sd-rootfs/* /mnt/emmc-rootfs
    sync
    umount /mnt/*

    -3-

    Now remove the SD card, change back the bootmode to eMMC boot mode and halt at u-boot. Now we need to modify the environment to pick up the file system from eMMC rootfs.

    TARGET => env default -f -a
    TARGET => setenv mmcdev 0
    TARGET => setenv bootpart 0
    TARGET => saveenv
    
    TARGET => boot

    Let me know if with this you are able to boot to the kernel.

    Regards,

    Karan

  • Hello Karan,

    Thank you for your reply.


    When I executed "mount /dev/mmcblk0p1 /mnt/emmc-rootfs" on the 5th line of 2, the following error occurred.

    "wrong fs type, bad option, bad superblock on /dev/mmcblk0p1, missing codepage or helper program, or other error."

    What should I do?

  • Hi,

    Can you post the output of the below from the kernel when you boot from SD card?

    dmesg | grep mmcblk

    And also for:

    fdisk -l

    Regards,

    Karan

  • Hi,

    Also, you after you post the above - you can also try to make the /dev/mmcblk0p1 an ext4 fs.

    mkfs.ext4 -L "rootfs" /dev/mmcblk0p1

    Regards,

    Karan

  • Hello Karan,

    Thank you for your reply.

    The output was as follows.
    -------------------------------------------------------------------------------
    root@am65xx-evm:/# dmesg | grep mmcblk
    [ 3.012700] mmcblk0: mmc0:0001 S0J56X 14.8 GiB
    [ 3.017555] mmcblk0boot0: mmc0:0001 S0J56X partition 1 31.5 MiB
    [ 3.024713] mmcblk0boot1: mmc0:0001 S0J56X partition 2 31.5 MiB
    [ 3.030871] mmcblk0rpmb: mmc0:0001 S0J56X partition 3 4.00 MiB, chardev (240:0)
    [ 3.072592] mmcblk0: p1
    [ 4.448281] mmcblk1: mmc1:aaaa SA08G 7.40 GiB
    [ 4.457366] mmcblk1: p1 p2
    [ 4.737963] EXT4-fs (mmcblk1p2): recovery complete
    [ 4.743653] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 6.404203] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
    root@am65xx-evm:/#
    -------------------------------------------------------------------------------
    root@am65xx-evm:/# fdisk -l
    Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram12: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram13: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram14: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/ram15: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 65536 bytes
    I/O size (minimum/optimal): 65536 bytes / 65536 bytes


    Disk /dev/mmcblk0: 14.84 GiB, 15913189376 bytes, 31080448 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: EEC09A2C-0D6F-40E4-ADC2-B6D99030973E

    Device Start End Sectors Size Type
    /dev/mmcblk0p1 34 31080414 31080381 14.8G Microsoft basic data


    Disk /dev/mtdblock0: 512 KiB, 524288 bytes, 1024 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock1: 2 MiB, 2097152 bytes, 4096 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock2: 4 MiB, 4194304 bytes, 8192 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock3: 128 KiB, 131072 bytes, 256 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock4: 128 KiB, 131072 bytes, 256 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock5: 1 MiB, 1048576 bytes, 2048 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock6: 56 MiB, 58720256 bytes, 114688 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock7: 16 MiB, 16777216 bytes, 32768 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mmcblk1: 7.41 GiB, 7948206080 bytes, 15523840 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x600abb27

    Device Boot Start End Sectors Size Id Type
    /dev/mmcblk1p1 * 2048 129023 126976 62M c W95 FAT32 (LBA)
    /dev/mmcblk1p2 129024 15523839 15394816 7.3G 83 Linux
    root@am65xx-evm:/#
    -------------------------------------------------------------------------------

  • Hello Karan,

    After setting it to ext4fs and continuing the procedure, I was able to boot without an SD card!

    Thank you very much for your teaching.