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.

AM6442: EMMC boot: SPL: failed to boot from all boot devices

Part Number: AM6442

Tool/software:

Hello all,

 I tried to boot from the EMMC boot partition(mmcblk0boot0), had copied the these 3 files tiboot3, tispl.bin and u-boot.img at the specified boot partition but it exceeded the memory region.
After repowering it is trying to boot from EMMC but getting stuck as shown in the image.
Please let me know the procedure to recover the board

U-Boot SPL 2023.04-g (Feb 07 2024 - 18:06:05 +0000)
EEPROM not available at 0x56, trying to read at 0x57
Reading on-board EEPROM at 0x57 failed -1
SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.8--v09.01.08 (Kool Koala)')
Trying to boot from MMC1
MMC: block number 0x3001 exceeds max(0x2000)
mmc_load_image_raw_sector: mmc block read error
** Partition 1 not valid on device 0 **
spl_register_fat_device: fat register err - -1
spl_load_image_fat: error reading image u-boot.img, err - -1
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

  • Hello,

    The logs suggests the eMMC you are using has only 4MB boot partitions. As such, you would have to adjust the image flash offsets as described in the following FAQ:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1163840/faq-am62x-how-to-customize-emmc-and-ospi-flash-layout-for-spl-u-boot-booting-with-ti-am62x-linux-sdk

    Similar E2E: e2e.ti.com/.../am625-emmc-layout-calculation

    BR, Prashant

  • Hi Prashant,

    Thank you for your quick response.

    I have created a sample emmc layout for our custom board with 4MB boot0 partition I would like you to know clarify me if this is correct

    • And same to be updated in the "am62x_evm_a53_defconfig" parameter "CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1D00" in "am62x_evm_r5_defconfig" parameter "CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1000"
    • And the dfu command would be  dfu_alt_info_emmc "rawemmc raw 0 0x800000 mmcpart 1; \
      rootfs part 0 1; \
      tiboot3.bin.raw raw 0x0 0x800 mmcpart 1; \
      tispl.bin.raw raw 0x800 0xa66 mmcpart 1; \
      u-boot.img.raw raw 0x1266 0xc00 mmcpart 1; \
      u-env.raw raw 0x1f66 0x80 mmcpart 1; \
      u-env.backup.raw raw 0x1fe6 0x80 mmcpart 1"

    Please Let me know if the above modification would be enough to boot from eMMC with 4MB boot partition?

    Also let me know if we change the eMMC part which has the 16MB boot0 partition the default evm image would work?

    Regards,

    Shwetha Nayak

  • Hi Prashant,

    Could you please let me know if we change the eMMC part with boot partition size as 16MB is will the eMMC boot works directly?

    Regards,

    Shwetha Nayak

  • Hi,

    Could you please confirm if we use emmc with 16MB boot partition size will it be able to hold all the files (tiboot3.bin tispl.bin and u-boot.bin along with environment and bck file) and boot normally?

    Regards,

    Shwetha

  • Hello,

    Could you please let me know if we change the eMMC part with boot partition size as 16MB is will the eMMC boot works directly?

    Yes, the images would boot successfully.

    Have you got the images booting with the layout you created for 4MB boot partitions?

    Thanks,

    Prashant

  • Hello Prashant,

    I was able to resole the above issue by changing 
    I changed the am64x_r5_defconfig as shown below parameters 

    CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
    CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400

     and in the am64x_a53_defconfig file the below parametrs

    CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
    CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xC00

    and copied to respective addess and it got booted .
    The address for CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR could be anything within the size of the EMMC boot partition and should copy the tispl.bin and u-boot.img at these particular address respectively.


    One more note: please try to saveenv and copy the .env file in the boot partition after the u-boot.img location, so that it loads the kernel
    but right now I completely moved in scratch_gap kernel , I am able to copy the images to emmc and set the mmc partconf and bootbus and able to see data in the mmcblk0boot0 as below but it is not booting now
     
    => md ${loadaddr} 0x2000
    82000000: f6078230 de058230 010203a0 1e140202  0...0...........
    82000010: ac7432ec 8905a8c7 d7473f0c 8683d3d2  .2t......?G.....
    82000020: 30467dce 2a09060d f7864886 0d01010d  .}F0...*.H......
    82000030: 81300005 300b319d 55030609 02130604  ..0..1.0...U....
    82000040: 0b315355 03060930 0c080455 31585402  US1.0...U....TX1
    82000050: 060d300f 07045503 6144060c 73616c6c  .0...U....Dallas
    82000060: 25302731 04550306 541e0c0a 73617865  1'0%..U....Texas
    82000070: 736e4920 6d757274 73746e65 636e4920   Instruments Inc
    82000080: 6f70726f 65746172 30133164 55030611  orporated1.0...U
    82000090: 0a0c0b04 636f7250 6f737365 13317372  ....Processors1.
    820000a0: 03061130 0c030455 2049540a 70707553  0...U....TI Supp
    820000b0: 3174726f 061b301d 48862a09 010df786  ort1.0...*.H....
    820000c0: 0e160109 70707573 4074726f 632e6974  ....support@ti.c
    820000d0: 1e306d6f 35320d17 34323430 39323431  om0...2504241429
    820000e0: 175a3033 3035320d 31343235 33393234  30Z..25052414293
    820000f0: 81305a30 300b319d 55030609 02130604  0Z0..1.0...U....
    82000100: 0b315355 03060930 0c080455 31585402  US1.0...U....TX1
    82000110: 060d300f 07045503 6144060c 73616c6c  .0...U....Dallas
    82000120: 25302731 04550306 541e0c0a 73617865  1'0%..U....Texas
    82000130: 736e4920 6d757274 73746e65 636e4920   Instruments Inc
    82000140: 6f70726f 65746172 30133164 55030611  orporated1.0...U
    82000150: 0a0c0b04 636f7250 6f737365 13317372  ....Processors1.
    82000160: 03061130 0c030455 2049540a 70707553  0...U....TI Supp
    82000170: 3174726f 061b301d 48862a09 010df786  ort1.0...*.H....
    82000180: 0e160109 70707573 4074726f 632e6974  ....support@ti.c
    82000190: 82306d6f 0d302202 862a0906 0df78648  om0.."0...*.H...
    820001a0: 05010101 02820300 8230000f 82020a02  ..........0.....
    820001b0: bf000102 d849ae14 6bd3727f 48ebcd23  ......I..r.k#..H
    820001c0: 22dc650e 4f0ef24d b5edf682 7cdbddf2  .e."M..O.......|
    820001d0: 596efa91 b6f7d5ff 8a1d04de d995d2cc  ..nY............
    820001e0: c1c4e0d1 ffbf50f8 22910c48 7b4c9a50  .....P..H.."P.L{
    820001f0: 0a96f38b a4b32628 55a9e0d9 3efb1a41  ....(&.....UA..>
    82000200: bf6c275b af71c0ca ee22722f 62250146  ['l...q./r".F.%b
    82000210: 04c73ead b618b1f6 6e12c02c 3e9be20f  .>......,..n...>
    82000220: a8a0a6e5 41034506 1f164e17 84d674a9  .....E.A.N...t..
    82000230: a779d64e a911b810 251f920e f2b17fdd  N.y........%....
    82000240: 68f2b9d1 4b5933d8 cc777d82 23fa9cd1  ...h.3YK.}w....#
    82000250: 8858fbb4 d5eacdf2 752cf216 c362fa2d  ..X.......,u-.b.
    82000260: e06e09c1 b5e07006 62990907 e7e4d6d9  ..n..p.....b....
    82000270: 82c86d6c f7935007 d1edd8e2 9ed0e35f  lm...P......_...
    82000280: d95493cf ce5ddd5f abf16037 7b048a14  ..T._.].7`.....{
    82000290: 7fbaa765 7c4545df ae5ba14b 3d94c64e  e....EE|K.[.N..=
    820002a0: d2874e8c f3a43c94 f2fcda9f 0de77c36  .N...<......6|..
    820002b0: 37425aad d0812af1 67a7a16e ed871e03  .ZB7.*..n..g....
    820002c0: 4a73bb00 a2312868 04a39a82 ff87e8c1  ..sJh(1.........
    820002d0: c1aa7e45 053bd49f 21fd83c7 7fbdfe71  E~....;....!q...
    820002e0: 1916c938 03e60e52 1e1d8d33 cd1c36c9  8...R...3....6..
    820002f0: 29829d4e 2a9bcd88 7b5f6cbe 793ab2b2  N..)...*.l_{..:y
    
     
    what could be the possible boot env variable might be missing ?
  • Hello,

    I see you have created another thread for the latest issue:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1515043/am6442-am6442-emmc-booting-failing

    Let's continue the discussion there.

    Thanks,

    Prashant