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 BOOT ERROR KERNEL PANIC

Part Number: AM625

HI TI team,

Im trying to boot the emmc from sd card .I followed the procedure as mentioned in the attachment for your reference. While booting the emmc Im encountering kernel panic.Im including the kernelpanic doc with this also

U-Boot SPL 2021.01-g2ee8efd654 (Feb 24 2023 - 05:37:51 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
SPL initial stack usage: 13424 bytes
Trying to boot from MMC1
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Loading Environment from MMC... OK
init_env from device 9 not supported!
Starting ATF on ARM64 core...

NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
NOTICE:  BL31: Built : 05:33:19, Feb 24 2023

U-Boot SPL 2021.01-g2ee8efd654 (Feb 24 2023 - 05:36:12 +0000)
SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
Trying to boot from MMC1
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted


U-Boot 2021.01-g2ee8efd654 (Feb 24 2023 - 05:36:12 +0000)

SoC:   AM62X SR1.0 GP
Model: Texas Instruments AM625 SK
EEPROM not available at 0x50, trying to read at 0x51
Reading on-board EEPROM at 0x51 failed 1
DRAM:  2 GiB
MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
Loading Environment from MMC... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
EEPROM not available at 0x50, trying to read at 0x51
Reading on-board EEPROM at 0x51 failed 1
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0(part 0) is current device
SD/MMC found on device 0
Failed to load 'boot.scr'
** Unrecognized filesystem type **
18862592 bytes read in 109 ms (165 MiB/s)
57533 bytes read in 4 ms (13.7 MiB/s)
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 000000008feee000, end 000000008fffffff ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.10.168-rt83-gc1a1291911 (oe-user@oe-host) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209) #1 SMP PREEMPT_RT Fri Feb 24 05:50:07 UTC 2023
[    0.000000] Machine model: Texas Instruments AM625 SK
[    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
[    0.000000] printk: bootconsole [ns16550a0] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created DMA memory pool at 0x000000009c800000, size 3 MiB
[    0.000000] OF: reserved mem: initialized node ipc-memories@9c800000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x000000009cb00000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node m4f-dma-memory@9cb00000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x000000009cc00000, size 14 MiB
[    0.000000] OF: reserved mem: initialized node m4f-memory@9cc00000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x000000009da00000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node r5f-dma-memory@9da00000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x000000009db00000, size 12 MiB
[    0.000000] OF: reserved mem: initialized node r5f-memory@9db00000, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000080000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x000000009c7fffff]
[    0.000000]   node   0: [mem 0x000000009c800000-0x000000009e6fffff]
[    0.000000]   node   0: [mem 0x000000009e700000-0x000000009e77ffff]
[    0.000000]   node   0: [mem 0x000000009e780000-0x000000009fffffff]
[    0.000000]   node   0: [mem 0x00000000a0000000-0x00000000ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff]
[    0.000000] On node 0 totalpages: 524288
[    0.000000]   DMA zone: 8192 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 524288 pages, LIFO batch:63
[    0.000000] cma: Reserved 512 MiB at 0x00000000dd000000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] psci: SMC Calling Convention v1.2
[    0.000000] percpu: Embedded 18 pages/cpu s35392 r8192 d30144 u73728
[    0.000000] pcpu-alloc: s35392 r8192 d30144 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 root=PARTUUID=344e7b40-01 rw rootfstype=ext4 rootwait
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1456212K/2097152K available (11008K kernel code, 1204K rwdata, 4272K rodata, 1792K init, 438K bss, 116652K reserved, 524288K cma-reserved)
[    0.000000] Unable to handle kernel paging request at virtual address ffff800112e61c50
[    0.000000] Mem abort info:
[    0.000000]   ESR = 0x96000005
[    0.000000]   EC = 0x25: DABT (current EL), IL = 32 bits
[    0.000000]   SET = 0, FnV = 0
[    0.000000]   EA = 0, S1PTW = 0
[    0.000000] Data abort info:
[    0.000000]   ISV = 0, ISS = 0x00000005
[    0.000000]   CM = 0, WnR = 0
[    0.000000] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000082f01000
[    0.000000] [ffff800112e61c50] pgd=00000000fffff003, p4d=00000000fffff003, pud=0000000000000000
[    0.000000] Internal error: Oops: 96000005 [#1] PREEMPT_RT SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.10.168-rt83-gc1a1291911 #1
[    0.000000] Hardware name: Texas Instruments AM625 SK (DT)
[    0.000000] pstate: 20000085 (nzCv daIf -PAN -UAO -TCO BTYPE=--)
[    0.000000] pc : +0x1c91f8/0x1270000
[    0.000000] lr : +0x1cbc44/0x1270000
[    0.000000] sp : ffff8000110d3cd0
[    0.000000] x29: ffff8000110d3cd0 x28: ffff8000111e5200
[    0.000000] x27: 0000000000000010 x26: 0000000000000000
[    0.000000] x25: 0000000000000000 x24: ffff00007fb93c28
[    0.000000] x23: 0000000000000000 x22: 0000000000000000
[    0.000000] x21: 0000000000000000 x20: 00000000000000c0
[    0.000000] x19: ffff00007fb93c38 x18: 0000000000000002
[    0.000000] x17: 0000000000012000 x16: ffff8000111e6000
[    0.000000] x15: 0000000000000000 x14: 0000000000000000
[    0.000000] x13: 000000000000000a x12: ffff8000111e56d0
[    0.000000] x11: ffff00007fb93c38 x10: 000000000000000c
[    0.000000] x9 : 0000000000000000 x8 : 0000000000000000
[    0.000000] x7 : ffff800112e61c50 x6 : ffff8000111e56d0
[    0.000000] x5 : ffff800010af1c78 x4 : ffff8000110d3de7
[    0.000000] x3 : 0000000000000000 x2 : 0000000101c7c580
[    0.000000] x1 : 000000000000000a x0 : 00000000101c7c58
[    0.000000] Call trace:
[    0.000000]  +0x1c91f8/0x1270000
[    0.000000]  +0x1ced90/0x1270000
[    0.000000]  +0x1ea0fc/0x1270000
[    0.000000]  +0x1eee0c/0x1270000
[    0.000000]  +0xf21cc0/0xf575bc
[    0.000000]  +0xf265a4/0xf575bc
[    0.000000]  +0xf10dd8/0xf575bc
[    0.000000] Code: 9b2a1445 d503201f 937c7c02 8b0200c7 (f86268c2)
[    0.000000] ---[ end trace 0000000000000001 ]---
[    0.000000] Kernel panic - not syncing:
[    0.000000] Attempted to kill the idle task!
[    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---

  • The boot procedure is enclosed here . Also the schematics for custom board is also enclosed here which is same as TI's AM625 Evaluation board

    EMMC boot Procedure :
    
    Legends:
    Target Term
    Host Term
    Target Uboot Term
    
    When device is running in SD card boot :
    1. Erase the EMMC fully from Uboot prompt.
    
    # mmc dev 0 0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    
    # mmc read ${loadaddr} 0x7fffffff 1
    MMC read: dev # 0, block # 2147483647, count 1 ... MMC: block number 0x80000000 exceeds max(0xe90000)
    0 blocks read: ERROR
     # mmc erase 0 0xe90000
    MMC erase: dev # 0, block # 0, count 15269888 ... 15269888 blocks erased: OK
    This will erase the primary partition
    Erase the secondary partition if aany...
    # mmc dev 0 2
    switch to partitions #2, OK
    mmc0(part 2) is current device
    # mmc erase 0 0x4000
    MMC erase: dev # 0, block # 0, count 16384 ... 1set6384 blocks erased: OK
    Now Emmc is erased.
    Boot   or Power cycle
    From Host pc transfer tiboot3.bin, tispl.bin u-boot.img to opt folder in Target
    To create Opt folder in Target :
    Once target is booted.Type these in Target terminal.
    # CD //
    # mkdir opt
    # ls
    # ifconfig eth0 <ip address>
    to see the directories listed.
    Under Host Terminal:
    To transfer File to Target,
    tiboot3.bin, tispl.bin u-boot.img- Take a copy from booted SD card
    tisdk-default-image-am62xx-evm.tar.xz is available under the SDK installed Dir/ filesystem
    
    
    Connect the Lan cable between Traget and Host
    # sudo scp tiboot3.bin root@192.168.27.2://opt     here 192.168.27.2 is target IP and   192.168.27.1 is base IP.
    Similarly copy   tispl.bin u-boot.img and Linux file system
    # sudo scp tispl.bin root@192.168.27.2://opt
    # sudo scp u-boot.img root@192.168.27.2://opt
    # sudo scp tisdk-default-image-am62xx-evm.tar.xz root@192.168.27.2://opt
    Now all the required files are copied into the Target.
    
    In Target :
    # ls -l /dev/mmcblk*
    brw-rw---- 1 root disk 179, 32 Nov 18 18:55 /dev/mmcblk0
    brw-rw---- 1 root disk 179, 64 Aug 10 22:07 /dev/mmcblk0boot0
    brw-rw---- 1 root disk 179, 96 Aug 10 22:07 /dev/mmcblk0boot1
    crw------- 1 root root 237,  0 Aug 10 22:07 /dev/mmcblk0rpmb
    brw-rw---- 1 root disk 179,  0 Aug 10 22:07 /dev/mmcblk1
    brw-rw---- 1 root disk 179,  1 Aug 10 22:07 /dev/mmcblk1p1
    brw-rw---- 1 root disk 179,  2 Aug 10 22:07 /dev/mmcblk1p2
    This will list the partitions available in SD card and eMMC.
    # echo 0 > /sys/block/mmcblk0boot0/force_ro
    Copy the files to emmc boot sector:
    # dd if=tiboot3.bin of=/dev/mmcblk0boot0 seek=0
    # dd if=tispl.bin of=/dev/mmcblk0boot0 seek=1024
    # dd if=u-boot.img of=/dev/mmcblk0boot0 seek=5120
    # fdisk /dev/mmcblk0
    Command window will open:
    Enter “p” to display current partitions
    enter “d” first to delete existing partitions
    Enter “n” to create a new partition
    Now give the default values
    Enter “w” to write the partition table to disk and exit
    
    Now check the partition table.
    # ls -l /dev/mmcblk0*
    brw-rw---- 1 root disk 179, 32 Nov 16 02:02 /dev/mmcblk0
    brw-rw---- 1 root disk 179, 64 Nov 16 02:01 /dev/mmcblk0boot0
    brw-rw---- 1 root disk 179, 96 Nov 16 01:44 /dev/mmcblk0boot1
    brw-rw---- 1 root disk 179, 33 Nov 16 02:02 /dev/mmcblk0p1
    crw------- 1 root root 237,  0 Nov 16 01:44 /dev/mmcblk0rpmb
    
    # sudo mkfs.ext4 /dev/mmcblk0p1         // Create ext4 filesystem.
    If in case of problem :
    unmount the device
    # sudo umount /dev/mmcblk0p1
    # sudo mkfs.ext4 /dev/mmcblk0p1
    
    then copy the rootfile system.
    # mkdir -p /mnt/temp
    # mount -t ext4 /dev/mmcblk0p1 /mnt/temp
    # cd /mnt/temp
    # tar xf  //opt/ <Linux image file copied from the host>
    # cd ..
    # umount temp
    # reboot
    
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Hit any key to stop autoboot:  2
    
    stop in uboot prompt
    In the Uboot term :
    => mmc partconf 0 1 1 1
    => mmc bootbus 0 2 0 0
      
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Hit any key to stop autoboot:  2
    In the Uboot term :
    ==> setenv mmcdev 0
    => setenv bootpart 0
    => saveenv
    Power cycle, remove the SD , boot the linux from eMMC.
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    AMX62X_RTOS_20231010_SCHEMATIC.pdf

    Regards,

    Lokesh R,

    Indra Insignia.

  • Hi TI Team,

    The EMMC boot comparision between custom board and eval board is enclosed in this document for your reference

    Customboard_vs_EvalBoard.pdf

    Regards,

    Lokesh B,

    Indra Insignia.

  • Please expect delayed response on your question due to our domain expert is out of office this week.

  • Hi Lokesh,

    The kernel boot log shows kernel crash happens in the very early of the kernel boot process. The issue could be DDR related.

    Let me route your query to our DDR expert to check on the DDR config and hardware design first.

  • Hi Bin ,

    Previously I have attached the schematics and comparison of EMMC in eval board vs custom board for your reference .Kindly share this to DDR expert as well and share the thread link in this chat .Thanks in advance.  

    Thanks and Regards,

    Lokesh R,

    Indra Insignia.

  • HI Bin ,

    For SD card boot it is working perfectly fine in custom board . So I think the problem is not with DDR. Kindly once verify it .

    Thanks and Regards,

    Lokesh R,

    Indra Insignia.

  • Hi Lokesh,

    If SD card boot works fine, it doesn't seem to be DDR related.

    I am taking back the ownership of this thread, and will look into it.

  • Hi Bin,

    Kindly Share your mail id ,I will share the SI reports ,Schematics and other feasible documents for your reference .Thanks in advance

    Regards,

    Lokesh,

    Indra Insignia. 

  • Hi Lokesh,

    I have sent you e2e friendship request. Once you accept it, I can provide my email address.

  • I accept your request please send your mail id asap.

  • Hi Bin,

    I want to know how to reduce the emmc clock  frequency 

    Thanks and Regards,

    Lokesh,

    Indra Insignia

  • Hi Lokesh,

    The device tree file k3-am62-main.dtsi, node sdhci0 defines all the property ti,otap-del-sel-* which corresponding each eMMC speed mode. Deleting any of the ti,otap-del-sel-* lines will disable the corresponding eMMC speed mode.

  • HI Bin ,

    I have sent the design files and all the supporting files in mail.

    Thanks and Regards,

    Lokesh,

    Indra Insignia.

  • Hi Lokesh,

    I don't think I received your email. Nothing in my Junk folder either.