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.

AM3352: U-Boot is hanging inimage_entry().

Part Number: AM3352

We are using customised TI – SITARA series processor (AM3352ZCZ80, 750MHz)

 processor board for our project and built MLO and Uboot.img with “arm-linux-gnueabihf-” cross compiler.

 

We installed this cross compiler with the help of apt-get in Ubuntu. Not using TI released SDK for building.

 

The current working board having Uboot-2016.03  and Kernel-4.1.11. Now we are trying to upgrade the Uboot to 2021.04 and Kernel to 5.4.y.

 

 

Issue :

      At booting process, SPL reaches jump_to_image_no_args(&spl_image) and hanging in image_entry().

 

The below is working and Non working Boot logs for your reference.

 

Working Uboot Log  - Uboot 2016.03:

 

U-Boot SPL 2016.03 (Jun 23 2021 - 18:20:50)

^^^^ sms spl_board_init - boot-common ^^^^^

^^^^ SMS CONFIG_SPL_NAND_SUPPORT needs to start gpmc_init- source boot-common ^^^^

^^^^ SMS Calls gpmc_init- source mem-common ^^^^

^^^ SMS defined(CONFIG_NAND) || defined(CONFIG_CMD_NAND) - GPMC INIT ^^^^^

^^^^ sms line no 136 in mem-common source ^^^^^

^^^^ sms CONFIG_SPL_I2C_SUPPORT - boot-common ^^^^^

^^^^ sms spl CONFIG_HW_WATCHDOG - boot-common ^^^^^

^^^^ sms spl CONFIG_AM33XX - boot-common ^^^^^

^^^sms AM33xx spl board init in board.c from ARCh/ARM ^^^

^^^^^ SMS CONFIG_SYS_SPL_MALLOC_START

 ^^^^^^spl maaloc start : 0x80a80000

spl maaloc size : 0x1000000

^^^^ SMS CONFIG_SPL_BUILD enabled ^^^^^^

SPL: Print all boot devices

SPL: Boot device 5

SPL: Boot device 0

SPL: Boot device 0

SPL: Boot device 0

SPL: Boot device 0

Trying to boot from NAND

~~~~~~ sms nand boot device : 5 ~~~~~

spl: nand - using hw ecc

nand: selected OMAP_ECC_BCH8_CODE_HW

^^^^^^ SMS Trying to Load U-boot, spl_nand_load_element Function ^^^^^^

^^^^^^ SMS Inside spl_nand_load_element ^^^^^

^^^^^^ Ret value of nand_spl_load_image fun : 0 ^^^^^

^^^^^ this pay load image ^^^^^^

spl: payload image: U-Bo load addr: 0x807fffc0 size: 333344

Name : U-Bo

OS : 17  1155747840

Load Address : 0x807fffc0

Entry Point  : 0x80800000

Size : 333344

Flag : 0

^^^^^^ Ret value of nand_spl_load_image fun After Parsing : 0 ^^^^^

Jumping to U-Boot

loaded - jumping to U-Boot...^^^^^ Jumping to Image No Args ^^^^^^

 

^^^^^ SMS Inside jump_to_image_no_args Function -source boot-common ^^^^^^^^

image OMAP_SRAM_SCRATCH_BOOT_PARAMS : 0x4030b824

SRAM_SCRATCH_SPACE_ADDR : 0X4030b800

image boot params: 0x4030cdcc

image entry point: 0x80800000

initcall: 8082cff9

 

 

U-Boot 2016.03 (Jun 23 2021 - 18:20:50 +0530)

 

initcall: 8080b805

U-Boot code: 80800000 -> 80848A60  BSS: -> 808525D8

initcall: 8080b69d

initcall: 8080b709

       Watchdog enabled

initcall: 8080b6e3

initcall: 8080b829

~~~~~sms i2c init calls ~~~~~ source board_f

I2C:   ready

initcall: 8080b6ed

~~~~~ sms announce dram init source board_f  ~~~~~~~~

DRAM:  initcall: 80800741

^^^^^ sms dram init calls - source emif4^^^

^^^^^ sms dram init calls ram size ^^^

 

Non Working Uboot Log : Uboot-2021.04 :

 

U-Boot SPL 2021.04 (Jun 18 2021 - 20:34:50 +0530)
^^^^ sms spl_board_init - boot-common ^^^^^
^^^^ SMS CONFIG_SPL_NAND_SUPPORT needs to start gpmc_init- source boot-common ^^^^
^^^^ SMS Calls gpmc_init- source mem-common ^^^^
^^^^ sms CONFIG_SPL_I2C_SUPPORT - boot-common ^^^^^
^^^^ sms spl CONFIG_HW_WATCHDOG - boot-common ^^^^^
^^^^ sms spl CONFIG_AM33XX - boot-common ^^^^^
^^^sms AM33xx spl board init in board.c from ARCh/ARM ^^^
^^^^^ SMS CONFIG_SYS_SPL_MALLOC_START
^^^^^^spl maaloc start : 0x80a80000
spl maaloc size : 0x1000000
^^^^ SMS CONFIG_SPL_BUILD enabled
^^^^^^SPL: Print all boot devices
SPL: Boot device 5
SPL: Boot device 0
SPL: Boot device 0
SPL: Boot device 0
SPL: Boot device 0
Trying to boot from NAND
^^^^^^ SMS Jumped into spl_nand_load_image Funtion ^^^^^^^
^^^^^^ SMS Trying to Load U-boot spl_nand_load_element Function ^^^^^^
^^^^^^ Ret value of nand_spl_load_image fun After Parsing : 0 ^^^^^
^^^ Loader Load Image Ret : 0 ^^^^^
^^^ SMS Inside IF Condition SPL BOOT LIST IS: 5 ^^^^
^^^^^ Jumping to Image No Args ^^^^^^
^^^^^ SMS jump_to_image_no_args Fun source boot-common ^^^^^
image OMAP_SRAM_SCRATCH_BOOT_PARAMS : 0x4030b424
SRAM_SCRATCH_SPACE_ADDR : 0x4030b400
image boot params: 0x4030cdcc
image entry point: 0x80800000

attached is some boot , non boot logs for your reference.

my_board.zip

  • Hi Lidong,
    Please note that u-boot 2021.04 is not in the TI SDK release yet.
    When building u-boot with "am335x_evm_defconfig", the generated MLO/u-boot.img are boot-able from NAND on AM335x GP EVM.
    When difference NAND device is used on customer board, customization may be necessary.
    Some relevant files are listed below for your reference.
    - "am335x_evm.h under /include/configs/"
    - "am335x-evm.dts, am335x.dtsi under /arch/arm/dts"
    Best,
    -Hong

  • Hi Hong, thanks for your response. I did the required NAND changes in mux.c file similar to what i already did in UBoot-2016.03. 

     

    Bootrom can read MLO from NAND and its running successfully, and hangging in image_entry().

    So that I think there is no NAND issue.

     

    Here I attached that mux, board, defconfig and header file for your reference.

     

    And one more information, we are not using DTS files and building uboot also without DTS files

    npserve_defconfig.zip

  • Hi Lidong,
    As being said in my last reply, u-boot 2021.04 is not released in the TI SDK release yet.
    I'm using the released TI SDK for your reference for debugging on your setup.
    I'm attaching a log file I captured using SDK 6.3 booting from NAND on AM335x EVM.
    Note on the attached log file:
    1. The log before the line # "initcall: 8080eeb1" is print from SPL running from on-chip SRAM.
    2. The log starting from the line # "initcall: 8080eeb1" is print from u-boot running from DDR

    Do we have JTAG access on your board?
    If yes, can we set-up a HW breakpoint @0x80800000 in DDR to see if it is hit?
    - If 0x80800000 is hit, => SPL reading/loading u-boot.img from NAND to DDR is OK. See the note below.
    - If 0x80800000 is NOT hit => debug SPL code.

    If 0x80800000 is hit, one of debug options is to add “#define DEBUG” at the top of “/lib/initcall.c” to enable full “initcall xxxxxxxx” debug dump, where the extended log would dump u-boot boot progress, and potentially indicate where u-boot booting fails.
    Note that:
    1. initcall_run_list() (/lib/initcall.c) is called by boot_init_f() (/common/board_f.c), which executes a sequence of initialization functions defined in init_sequence_f[] = {…};
    2. Similarly initcall_run_list() is also called in boot_init_r() (/common/board_r.c), which runs a sequence of initialization functions defined in init_sequence_r[] = {…};

    Best,
    -Hong

    <debug_uart> 
    Passed early_system_init()
     
    Passed board_early_init_f()
    
    Passed sdram_init()
    
    U-Boot SPL 2019.01-g175b3522cc-dirty (Apr 22 2021 - 14:19:38 -0500)
    Trying to boot from NAND
    initcall: 8080eeb1
    initcall: 80845a39
    initcall: 8081437f
    initcall: 8080eea9
    initcall: 8080f14d
    initcall: 8080eec9
    initcall: 8080f19d
    initcall: 8080eecd
    initcall: 8080f181
    initcall: 8080f159
    >>>> initf_dm: 825:
     Class    index  Probed  Driver                Name
    -----------------------------------------------------------
     root        0  [ + ]   root_driver           root_driver
     rsa_mod_ex  0  [   ]   mod_exp_sw            `-- mod_exp_sw
    initcall: 808020a9
    initcall: 808472f5
    initcall: 80831029
    initcall: 8080f131
    initcall: 80829bd5
    initcall: 80846481
    
    
    U-Boot 2019.01-g175b3522cc-dirty (Apr 22 2021 - 14:19:38 -0500)
    
    initcall: 8080f041
    U-Boot code: 80800000 -> 8086C2A4  BSS: -> 80888C68
    initcall: 80801fd1
    CPU  : AM335X-GP rev 2.1
    initcall: 8080f4dd
    Model: TI AM335x EVM
    initcall: 8080f1a5
    initcall: 8080eef3
    initcall: 8080f121
    DRAM:  initcall: 80802061
    initcall: 8080eef3
    initcall: 8080eef3
    initcall: 8080eef3
    initcall: 8080f251
    Monitor len: 00088C68
    Ram size: 40000000
    Ram top: C0000000
    initcall: 8080eed1
    initcall: 8080eefd
    TLB table from bfff0000 to bfff4000
    initcall: 8080f185
    initcall: 8080f189
    initcall: 8080eff9
    Reserving 547k for U-Boot at: bff67000
    initcall: 8080efd1
    Reserving 32896k for malloc() at: bdf47000
    initcall: 8080f0e9
    Reserving 104 Bytes for Board Info at: bdf46f98
    initcall: 8080eee5
    initcall: 8080efa9
    Reserving 224 Bytes for Global Data at: bdf46eb8
    initcall: 8080ef59
    Reserving 59072 Bytes for FDT at: bdf387f8
    initcall: 8080f18d
    initcall: 8080f191
    initcall: 8080f1a1
    initcall: 8080f2ad
    initcall: 80802077
    initcall: 8080f1b5
    
    RAM Configuration:
    Bank #0: 80000000 1 GiB
    Bank #1: 0 0 Bytes
    Bank #2: 0 0 Bytes
    Bank #3: 0 0 Bytes
    
    DRAM:  1 GiB
    initcall: 8080ef45
    New Stack Pointer is: bdf387d0
    initcall: 8080eef3
    initcall: 8080f0bd
    initcall: 8080f195
    initcall: 8080f199
    initcall: 8080f065
    Relocation Offset is: 3f767000
    Relocating to bff67000, new gd at bdf46eb8, sp at bdf387d0
    initcall: bff762e9
    initcall: bff762ed
    initcall: 8080f45d (relocated to bff7645d)
    initcall: 8080f429 (relocated to bff76429)
    initcall: 8080f4a5 (relocated to bff764a5)
    initcall: 8080f3f9 (relocated to bff763f9)
    Pre-reloc malloc() used 0x1ac bytes (0 KB)
    initcall: 8080eead (relocated to bff75ead)
    initcall: 8080f3eb (relocated to bff763eb)
    initcall: 8080f4a9 (relocated to bff764a9)
    initcall: 8080f4a1 (relocated to bff764a1)
    initcall: 8080f469 (relocated to bff76469)
    >>>> initr_dm: 302:
     Class    index  Probed  Driver                Name
    -----------------------------------------------------------
     root        0  [ + ]   root_driver           root_driver
     rsa_mod_ex  0  [   ]   mod_exp_sw            |-- mod_exp_sw
     simple_bus  0  [   ]   generic_simple_bus    `-- ocp
     simple_bus  1  [   ]   generic_simple_bus        |-- l4_wkup@44c00000
     simple_bus  2  [   ]   generic_simple_bus        |   |-- prcm@200000
     simple_bus  3  [   ]   generic_simple_bus        |   `-- scm@210000
     simple_bus  4  [   ]   generic_simple_bus        |       `-- scm_conf@0
     gpio        0  [   ]   gpio_omap                 |-- gpio@44e07000
     gpio        1  [   ]   gpio_omap                 |-- gpio@4804c000
     gpio        2  [   ]   gpio_omap                 |-- gpio@481ac000
     gpio        3  [   ]   gpio_omap                 |-- gpio@481ae000
     serial      0  [   ]   omap_serial               |-- serial@44e09000
     serial      1  [   ]   omap_serial               |-- serial@48022000
     i2c         0  [   ]   i2c_omap                  |-- i2c@44e0b000
     i2c         1  [   ]   i2c_omap                  |-- i2c@4802a000
     i2c         2  [   ]   i2c_omap                  |-- i2c@4819c000
     mmc         0  [   ]   omap_hsmmc                |-- mmc@48060000
     blk         0  [   ]   mmc_blk                   |   `-- mmc@48060000.blk
     timer       0  [   ]   omap_timer                |-- timer@48040000
     timer       1  [   ]   omap_timer                |-- timer@48042000
     timer       2  [   ]   omap_timer                |-- timer@48044000
     timer       3  [   ]   omap_timer                |-- timer@48046000
     timer       4  [   ]   omap_timer                |-- timer@48048000
     timer       5  [   ]   omap_timer                |-- timer@4804a000
     misc        0  [   ]   ti-musb-wrapper           |-- usb@47400000
     usb         0  [   ]   ti-musb-peripheral        |   |-- usb@47401000
     usb         0  [   ]   ti-musb-host              |   `-- usb@47401800
     eth         0  [   ]   eth_cpsw                  `-- ethernet@4a100000
    initcall: 8080056d (relocated to bff6756d)
    initcall: 8083c6e1 (relocated to bffa36e1)
    initcall: 80816b51 (relocated to bff7db51)
    initcall: 8080f3e1 (relocated to bff763e1)
    initcall: 8080f3cd (relocated to bff763cd)
    Now running in RAM - U-Boot at: bff67000
    initcall: 8080eef3 (relocated to bff75ef3)
    initcall: 8080eef3 (relocated to bff75ef3)
    initcall: 8080eef3 (relocated to bff75ef3)
    initcall: 8080f4ad (relocated to bff764ad)
    initcall: 8080eef3 (relocated to bff75ef3)
    initcall: 8080f3a9 (relocated to bff763a9)
    NAND:  256 MiB
    initcall: 8080f391 (relocated to bff76391)
    MMC:   gpio_request_tail: Node 'mmc@48060000', property 'wp-gpios', failed to request GPIO index 0: -2
    OMAP SD/MMC: 0
    initcall: 8080f349 (relocated to bff76349)
    Loading Environment from FAT... MMC: no card present
    mmc_init: -123, time 2
    initcall: 8080eef3 (relocated to bff75ef3)
    initcall: 8080f4b3 (relocated to bff764b3)
    initcall: 8080eef3 (relocated to bff75ef3)
    initcall: 80816b65 (relocated to bff7db65)
    initcall: 8080f33f (relocated to bff7633f)
    initcall: 808137e9 (relocated to bff7a7e9)
    initcall: 8080208f (relocated to bff6908f)
    initcall: 8080eef3 (relocated to bff75ef3)
    initcall: 80801b7d (relocated to bff68b7d)
    initcall: 8080f335 (relocated to bff76335)
    initcall: 8080f31d (relocated to bff7631d)
    initcall: 80800721 (relocated to bff67721)
    <ethaddr> not set. Validating first E-fuse MAC
    initcall: 8080eef3 (relocated to bff75ef3)
    initcall: 8080f309 (relocated to bff76309)
    Net:   gpio_get_list_count: Node 'ethernet@4a100000', property 'mode-gpios', GPIO count failed: -2
    eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in ROM is          de:ad:be:ef:00:01
    Address in environment is  1c:ba:8c:f0:79:11
    , eth1: usb_ether
    initcall: 8080f301 (relocated to bff76301)
    Hit any key to stop autoboot:  2  0 
    =>