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.

Linux/AM3352: Long kernel boot time

Part Number: AM3352

Tool/software: Linux

Hello,erveryone.

I used SDK 04.00.00.04, and the linux version is 4.9.28.

I found that after print "Starting kernel ...", there is about 7 seconds of  no printing until kernel printing "[    0.000000] Booting Linux on physical CPU 0x0", what is the system doing during the time? I want the kernel start immediately after printing Starting kernel ..., how can I do this?

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.28-geed43d1050 (llf@llf-virtual-machine) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #160 PREEMPT Mon May 14 13:59:41 CST 2018

  • Hello LONGFEI,

    Please, refer to this thread and next time do a quick search before posting a new question.

    Best regards,
    Kemal

  • Hello Kemal
    I try to load uncompress Image to my board, but it can't be booted, following command is used to get uImage from uncompress image:
    mkimage -A arm -O linux -T kernel -C none -a 0x82000000 -e 0x82000000 -d arch/arm/boot/Image arch/arm/boot/uImage
    is there any error in my command?

    I load the uncompress uImage to board DDR by tftp, and then execute the command bootm 0x82000000, but the kernel not be booted, after print starting kernel message, there is no print info any more:
    => tftp ${loadaddr} uImage
    link up on port 0, speed 100, full duplex
    Using cpsw device
    TFTP from server 192.168.40.92

    ; our IP address is 192.168.40.101

    Filename 'uImage'.
    Load address: 0x82000000
    Loading: #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    ##################################################
    227.5 KiB/s
    done
    Bytes transferred = 3581952 (36a800 hex)
    => bootm 0x82000000
    ## Booting kernel from Legacy Image at 82000000 ...
    Image Name: Linux-4.9.28-geed43d1050
    Created: 2018-05-15 7:11:42 UTC
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3581888 Bytes = 3.4 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK

    Starting kernel ...


    another question:
    there is about 4 seconds time delay between Starting kernel print and kernel first print when I use SDK04.00.00.04, which linux version is 4.9.28, and the reason of time delay is uncompressing the zimage.
    why the time delay is shorter than 1 second when I use SDK6.00.00.00 which linux version is 3.2 and kernel image is uImage?
    the uImage compiled from linux 3.2 is also compressed, when booting the kernel image also need to uncompress, but there is almost no time delay between starting kernel print and kernel first print.

  • LONGFEI LI said:
    is there any error in my command?


    Yes, load address and entry point must be 0x80008000.

    LONGFEI LI said:
    execute the command bootm 0x82000000, but the kernel not be booted

    You are not passing it the fdt file.

    => tftp ${loadaddr} uImage
    => run findfdt
    => run netloadfdt
    => bootm $loadaddr - $fdtaddr

    LONGFEI LI said:
    why the time delay is shorter than 1 second when I use SDK6.00.00.00


    SDK6.00.00.0 was using the platform data model, in new SDK there is a some time spending in device tree parsing.

  • Hello Kemal
    load address and entry point must be 0x80008000
    is 0x80008000 the fdt loadaddr in ram?
    in my uboot the fdtaddr is 0x88000000, does the load address and entry point need to change to 0x88000000?
  • Load address and entry point for kernel is 0x80008000 and it goes here:
    mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -d arch/arm/boot/Image arch/arm/boot/uImage

    In U-Boot environment, set:
    loadaddr to 0x82000000
    fdtaddr to 0x88000000