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.

uImage stuck at starting kernel AM437x

Hi ,

   I am trying to boot kernel from u-boot command lines . I built uImage but i am not sure what should be the LOADADRR. After googling i found out that it will be  mentioned in Makefile.boot and i gave the load address as 0x80008000. Copied the uImage to sdcard. Then i stopped the booting at u-boot level and copied the uImage from sdcard to RAM. After i used bootm command with the address of RAM where uImage has been copied. But i see on the console that it hangs at starting kernel.What could be the issue. Is my LOADADDR wrong ? If so , how to find out the correct one for the board. Any help would be really appreciated.

Thanks and Regards,

Sai

  • What about the device tree file? Where is it located? I don't think this is a correct way to boot kernel. I will ask the SW team to help on this.

  • Yes, also which SDK are you using, in the latest SDK's the uImage is not used, You should be using zImage also as mentioned by Biser, DTB also required. Refer to processors.wiki.ti.com/.../Linux_Kernel_Users_Guide.

    Best Regards,
    Shiv
  • Hi, 

    In addition to the above info also SDK8 &SDK7 do not use uImage. 

    If insist to use uImage, you need to modify u-boot. Start with changing the bootargs defined in am335x_evm.h:

      #define CONFIG_EXTRA_ENV_SETTINGS \

    DEFAULT_LINUX_BOOT_ENV \

        "boot_fdt=try\0" \

        "bootpart=0:2\0" \

        "bootdir=/boot\0" \

        "bootfile=zImage\0" \            ==> Change this to uImage 

        "fdtfile=undefined\0" \

        "console=ttyO0,115200n8\0" \

    Best Regards, 

    Yordan

  • Hi,

    Thank you all for your quick response.
    1) I have loaded the dtb file to fdtaddr uImage to loadaddr and used the bootm command .
    2) I am using Ti-processor-sdk-linux-am437x-evm-01.00.00.00-Linux-x86-Install.bin
    3) I have configured the bootfile=uImage in am437x_evm.h and built u-boot
    But still i am not able to boot. I get the following on the console.

    U-Boot# bootm $loadaddr - $fdtaddr
    ## Booting kernel from Legacy Image at 82000000 ...
    Image Name: Linux-3.14.26-g284fefb-dirty
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 4556448 Bytes = 4.3 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Kernel Image ... OK
    Loading Device Tree to 8fff1000, end 8ffff959 ... OK

    Starting kernel ...
  • Hi,

    Just noticed, your load address is wrong. Try setting it to 0x82000000, see ti_armv7_common.h:
    #define CONFIG_SYS_LOAD_ADDR 0x82000000

    /*
    * We setup defaults based on constraints from the Linux kernel, which should
    * also be safe elsewhere. We have the default load at 32MB into DDR (for
    * the kernel), FDT above 128MB (the maximum location for the end of the
    * kernel), and the ramdisk 512KB above that (allowing for hopefully never
    * seen large trees). We say all of this must be within the first 256MB
    * as that will normally be within the kernel lowmem and thus visible via
    * bootm_size and we only run on platforms with 256MB or more of memory.
    */
    #define DEFAULT_LINUX_BOOT_ENV \
    "loadaddr=0x82000000\0" \
    "kernel_addr_r=0x82000000\0" \
    "fdtaddr=0x88000000\0" \
    "fdt_addr_r=0x88000000\0" \
    "rdaddr=0x88080000\0" \
    "ramdisk_addr_r=0x88080000\0" \
    "bootm_size=0x10000000\0"

    Best Regards,
    Yordan

  • Hi Yordan,

    I also have same problem as Sai faced.

    I am using Ti-processor-sdk-linux-am437x-evm-01.00.00.00-Linux-x86-Install.bin
    and AM437x GP EVM.

    My configuration have changed for using the root filesystem in USB memory.
    I just refer to the following post.
    https://e2e.ti.com/support/embedded/linux/f/354/p/411303/1459350#pi317016=1

    After getting the new zImage and  am437x-gp-evm.dtb, I set theses files
    in /media/rootfs/bootas this site describe.
    This media is micro SD card; MLO and u-boot.img in boot partition and
    root file system in rootfs partition.
    http://processors.wiki.ti.com/index.php/Linux_Kernel_Users_Guide#

    But I am not able to boot. I get the following on the console.

    **************************************************
    U-Boot#
    U-Boot SPL 2014.07-g7e537bf (Apr 10 2015 - 14:57:18)
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!
    reading u-boot.img
    reading u-boot.img


    U-Boot 2014.07-g7e537bf (Apr 10 2015 - 14:57:18)

    I2C:   ready
    DRAM:  1 GiB
    NAND:  512 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env

    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment

    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    ** File not found /boot/zImage **
    (Re)start USB...
    USB0:   Register 2000440 NbrPorts 2
    Starting the controller
    USB XHCI 1.00
    scanning bus 0 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 1 Storage Device(s) found

    USB device 0:
        Device 0: Vendor: MF-AU    Rev: 0.00 Prod: series
                Type: Removable Hard Disk
                Capacity: 1928.0 MB = 1.8 GB (3948544 x 512)
    ... is now current device
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    3829904 bytes read in 2511 ms (1.5 MiB/s)
    47450 bytes read in 428 ms (107.4 KiB/s)
    Booting from usb 0...
    Kernel image @ 0x82000000 [ 0x000000 - 0x3a7090 ]
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8fff1000, end 8ffff959 ... OK

    Starting kernel ...
    *******************************************************

    When I succeed to boot with new kernel Image in rootfs/boot of microSD card,
    I will shift to boot in rootfs/boot of USB memory.
    Could you please advise to solve this issue?

    Best regards,
    Kanae

  • Hi Kanae,

    From your boot logs it looks like zImage is not present in the rootfs. Can you check in the boot folder of filesystem if zImage is present. Also when the boot sequence doesn't find zImage it detects USB and tries to boot from USB.
    Have you connected any USB device? If so, remove the USB and try.

    Regards,
    Sai
  • Hi Sai,

    Thank you for your quick reply.

    I am sure zImage file in /rootfs/boot folder in micro SD card.
    But I concern that the new zImage file type is "program",
    original zImage file is "unknown" in targetFNS in SDK though.
    Do you know this differences relate to this issue?

    First of all, I would like to check my new kernel with micro SD card.
    So I do not use USB memory yet. 

    I supporse it does not need to change am437x-gp-evm.dtb file
    if I use AM437x GP EVM.
    Is my understanding correct?

    If you aware the other check points please let me know.
    Best regards,
    Kanae

  • Hi Kanae,

    Since your boot logs showed ** File not found /boot/zImage **, i thought there was no zImage. I am not sure of the file type, but you can flash the pre built images and try.

    gforge.ti.com/.../rootfs-am437-gp-sdk7.01-r8-3-sp1.tar.gz

    Reference Link
    processors.wiki.ti.com/.../WL18xx_AMxxx_Platform_Integration_Guide

    Regards,
    Sai
  •  

    Hi Sai,

    I am sorry for the late response.
    As you thought, it cannot reach zImage file in /rootfs/boot/
    even if there is the file physically. 

    I have checked the following cases. 

    1. Using the pre-build images and the file system in micro sd card.
    Boot result is OK.

    2. Using new build zImage and modules to the file system in micro sd card.
    Boot result is OK.

    3. Using the pre-build u-bootimage in micro sd card and
       new build zImage and modules to the file system in USB memory.
    Boot result is NG. The following stage process was hang.

    ...
    #### Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8fff1000, end 8ffffbef ... OK 

    Starting kernel ... 

    Could you please comment to me what I am missing? 

    Best regards,
    Kanae