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 linux内核启动时卡在 Starting kernel ...

Other Parts Discussed in Thread: AM3352, TPS650250, TPS65217, TPS65910

各位工程师好:

          内核用的是linux-3.12.10-ti2013.12.01,配置文件用的是arch/arm/configs/tisdk_am335x-evm_defconfig,编译出uImager后下能过TFTP下载的内存一直挂死在Starting kernel ...

串口上的信息:

U-Boot# tftp 0x88000000 klha_am335x.dtb;tftp 0x82000000 uImage;bootm 0x82000000 - 0x88000000;
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.0.231; our IP address is 192.168.0.224
Filename 'klha_am335x.dtb'.
Load address: 0x88000000
Loading: ########
364.3 KiB/s
done
Bytes transferred = 35876 (8c24 hex)
link up on port 0, speed 100, full duplex
Using cpsw device

TFTP from server 192.168.0.231; our IP address is 192.168.0.224
Filename 'uImage'.
Load address: 0x82000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##########################
779.3 KiB/s
done
Bytes transferred = 4124368 (3eeed0 hex)
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.12.10-ti2013.12.01
Created: 2015-05-18 8:19:38 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4124304 Bytes = 3.9 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 8fff4000, end 8ffffc23 ... OK

Starting kernel ...

就卡在这里不动了。

板子是自己做的,硬件信息:

CPU:AM3352
网卡网芯: LAN8720A
FLASH芯片:29F1G08ABAEA (8位的flash芯片,u-boot中默认的是16位的flash芯片)
SDRAM芯片:SAMSUNG K4T1G164QF BCF7, DDR2-800 6-6-6, 容量为128MB (DDR2 SDRAM)
电源芯片:TPS650250

已经试过设备树二进制文件:am335x-boneblack.dtb、am335x-bone.dtb、am335x-evm.dtb、am335x-evmsk.dtb都卡在Starting kernel ...

bootargs参数为:console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=9,2048 rootfstype=ubifs rootwait=1

内核里的boot option选项:

请问这种问题该如何解决,谢谢!

  • 如果用bootz 0x82000000 - 0x88000000;启动出现:

    Bad Linux ARM zImage magic!

    用iminfo测试输出:

    U-Boot# iminfo

    ## Checking Image at 82000000 ...
    Legacy image found
    Image Name: Linux-3.12.10-ti2013.12.01
    Created: 2015-05-18 8:19:38 UTC
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 4124304 Bytes = 3.9 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK

    看上去并没有错误

  • 自制的开发板吗

    会不是ddr没有配置好

  • 核心板是外购的,硬件应该没问题,因为其他 公司已经跑通wince了。

    我在u-boot中配置过DDR,内核中不曾配置过。内核中也需要配置吗?在源代码中配置 or  DTS中?

  • DDR只会在uboot的MLO部分进行配置,不会在内核中进行配置。

    你片上有用RTC吗?可以参考这个看看:http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/51326.aspx

  • 你好,有U-BOOT阶段因总卡死在RTC阶段,所以移植U-BOOT时把RTC屏蔽掉了。刚才按照您说的方法把[ ] Real Time Clock  ----选 项去掉,并掉注释掉所有 arch/arm/mach-omap2/omap_hwmod_33xx_data.c中关手RTC相关的代码, 问题依旧。

    在u-boot下用bdinfo命令:

    U-Boot# bdinfo
    arch_number = 0x00000E05
    boot_params = 0x80000100
    DRAM bank = 0x00000000
    -> start = 0x80000000
    -> size = 0x08000000
    eth0name = cpsw
    ethaddr = 20:cd:39:b9:cc:c2
    eth1name = usb_ether
    eth1addr = 20:cd:39:b9:cc:c4
    current eth = cpsw
    ip_addr = 192.168.0.224
    baudrate = 115200 bps
    TLB addr = 0x87FF0000
    relocaddr = 0x8773F000
    reloc off = 0x06F3F000
    irq_sp = 0x8671EEE0
    sp start = 0x8671EED0

    arch_number 的值为0x00000E05 = 3598,但在在arch/arm/tools/mach-types文件却没有找到3598这个机器号, 不知道是不是这的问题,该怎么样修改?

  • 也有可能是内核配置的问题,有没有针对自己的硬件做menuconfig的裁剪?

  • 执行过make menuconfig,只是保存了一下配置,并没有裁前东西。

    但是用开发板光盘里的uImage内核有会打印信息

  • 这是用光盘里的uImage的输出信息:

    U-Boot# tftp 0x82000000 bakuImage
    link up on port 0, speed 100, full duplex
    Using cpsw device
    TFTP from server 192.168.0.231; our IP address is 192.168.0.224
    Filename 'bakuImage'.
    Load address: 0x82000000
    Loading: #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################
    795.9 KiB/s
    done
    Bytes transferred = 3163680 (304620 hex)
    U-Boot# bootm
    ## Booting kernel from Legacy Image at 82000000 ...
    Image Name: Arago/3.2.0-psp04.06.00.08.sdk/a
    Created: 2012-07-26 22:16:33 UTC
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3163616 Bytes = 3 MiB
    Load Address: 80008000
    Entry Point: 80008000
    Verifying Checksum ... OK
    Loading Kernel Image ... OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    [ 0.000000] Linux version 3.2.0 (jenkins@sdit-build01) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Thu Jul 26 17:16:27 CDT 2012
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine: am335xevm
    [ 0.000000] Memory policy: ECC disabled, Data cache writeback
    [ 0.000000] AM335X ES1.0 (neon )
    [ 0.000000] ------------[ cut here ]------------
    [ 0.000000] WARNING: at arch/arm/mach-omap2/clkt_clksel.c:194 omap2_clksel_recalc+0xd0/0x130()
    [ 0.000000] clock: Could not find fieldval 0 for clock dpll_core_m6_ck parent dpll_core_x2_ck
    [ 0.000000] Modules linked in:
    [ 0.000000] Backtrace:
    [ 0.000000] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c0422338>] (dump_stack+0x18/0x1c)
    [ 0.000000] r6:c0508f3c r5:000000c2 r4:c05dde80 r3:c05fe6c8
    [ 0.000000] [<c0422320>] (dump_stack+0x0/0x1c) from [<c003e310>] (warn_slowpath_common+0x5c/0x6c)
    [ 0.000000] [<c003e2b4>] (warn_slowpath_common+0x0/0x6c) from [<c003e3c4>] (warn_slowpath_fmt+0x38/0x40)
    [ 0.000000] r8:c0772440 r7:00000001 r6:00000002 r5:c05ef580 r4:00000000
    [ 0.000000] r3:00000009
    [ 0.000000] [<c003e38c>] (warn_slowpath_fmt+0x0/0x40) from [<c002fb40>] (omap2_clksel_recalc+0xd0/0x130)
    [ 0.000000] r3:00000000 r2:c0509114
    [ 0.000000] [<c002fa70>] (omap2_clksel_recalc+0x0/0x130) from [<c0034364>] (propagate_rate+0x34/0x54)
    [ 0.000000] r7:c05e256c r6:c05e256c r5:c05ef480 r4:c05ef580
    [ 0.000000] [<c0034330>] (propagate_rate+0x0/0x54) from [<c0034370>] (propagate_rate+0x40/0x54)

    之后省略很多输出信息

  • 我遇到的问题和你一样啊,请问怎么解决的呢

  • 您好,和您遇到了同样的问题,请问您是怎么解决的

  • 您好,您的问题解决了吗,我也遇到了同样的问题,求助

  • 解决方法:

    经过N多天断断续续的GOOGLE终于找到原因,u-boot-2014-10,程序运行到下面红色部分时直接跳出了,没有初始化时钟

    void am33xx_spl_board_init(void)

    {

            struct am335x_baseboard_id header;

            int mpu_vdd;

     

            if (read_eeprom(&header) < 0)

                    puts("Could not get board ID.\n");

     

            /* Get the frequency */

            dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);

     

            if(dpll_mpu_opp100.m==MPUPLL_M_720){

                    puts("hahahahahhahahahhah\n");

                    }

     

            if (board_is_bone(&header) || board_is_bone_lt(&header)) {

                    /* BeagleBone PMIC Code */

                    int usb_cur_lim;

     

                    /*

                     * Only perform PMIC configurations if board rev > A1

                     * on Beaglebone White

                     */

                    if (board_is_bone(&header) && !strncmp(header.version,

                                                           "00A1", 4))

                            return;

     

                    if (i2c_probe(TPS65217_CHIP_PM))

                            return;

     

                    /*

                     * On Beaglebone White we need to ensure we have AC power

                     * before increasing the frequency.

                     */

                    if (board_is_bone(&header)) {

                            uchar pmic_status_reg;

                            if (tps65217_reg_read(TPS65217_STATUS,

                                                  &pmic_status_reg))

                                    return;

                            if (!(pmic_status_reg & TPS65217_PWR_SRC_AC_BITMASK)) {

                                    puts("No AC power, disabling frequency switch\n");

                                    return;

                            }

                    }

     

                    /*

                     * Override what we have detected since we know if we have

                     * a Beaglebone Black it supports 1GHz.

                     */

                    if (board_is_bone_lt(&header))

                            dpll_mpu_opp100.m = MPUPLL_M_1000;

     

                    /*

                     * Increase USB current limit to 1300mA or 1800mA and set

                     * the MPU voltage controller as needed.

                     */

                    if (dpll_mpu_opp100.m == MPUPLL_M_1000) {

                            usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;

                            mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;

                    } else {

                            usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;

                            mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;

                    }

     

                    if (tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,

                                           TPS65217_POWER_PATH,

                                           usb_cur_lim,

                                           TPS65217_USB_INPUT_CUR_LIMIT_MASK))

                            puts("tps65217_reg_write failure\n");

     

                    /* Set DCDC3 (CORE) voltage to 1.125V */

                    if (tps65217_voltage_update(TPS65217_DEFDCDC3,

                                                TPS65217_DCDC_VOLT_SEL_1125MV)) {

                            puts("tps65217_voltage_update failure\n");

                            return;

                    }

     

                    /* Set CORE Frequencies to OPP100 */

                    do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);

     

                    /* Set DCDC2 (MPU) voltage */

                    if (tps65217_voltage_update(TPS65217_DEFDCDC2, mpu_vdd)) {

                            puts("tps65217_voltage_update failure\n");

                            return;

                    }

     

                    /*

                     * Set LDO3, LDO4 output voltage to 3.3V for Beaglebone.

                     * Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black.

                     */

                    if (board_is_bone(&header)) {

                            if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,

                                                   TPS65217_DEFLS1,

                                                   TPS65217_LDO_VOLTAGE_OUT_3_3,

                                                   TPS65217_LDO_MASK))

                                    puts("tps65217_reg_write failure\n");

                    } else {

                            if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,

                                                   TPS65217_DEFLS1,

                                                   TPS65217_LDO_VOLTAGE_OUT_1_8,

                                                   TPS65217_LDO_MASK))

                                    puts("tps65217_reg_write failure\n");

                    }

     

                    if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,

                                           TPS65217_DEFLS2,

                                           TPS65217_LDO_VOLTAGE_OUT_3_3,

                                           TPS65217_LDO_MASK))

                            puts("tps65217_reg_write failure\n");

            } else {

                    int sil_rev;

     

                    /*

                     * The GP EVM, IDK and EVM SK use a TPS65910 PMIC.  For all

                     * MPU frequencies we support we use a CORE voltage of

                     * 1.1375V.  For MPU voltage we need to switch based on

                     * the frequency we are running at.

                     */

                    if (i2c_probe(TPS65910_CTRL_I2C_ADDR))

                            return;                /*

                     * Depending on MPU clock and PG we will need a different

                     * VDD to drive at that speed.

                     */

                    sil_rev = readl(&cdev->deviceid) >> 28;

                    mpu_vdd = am335x_get_tps65910_mpu_vdd(sil_rev,

                                                          dpll_mpu_opp100.m);

     

                    /* Tell the TPS65910 to use i2c */

                    tps65910_set_i2c_control();

     

                    /* First update MPU voltage. */

                    if (tps65910_voltage_update(MPU, mpu_vdd))

                            return;

     

                    /* Second, update the CORE voltage. */

                    if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_3))

                            return;

     

                    /* Set CORE Frequencies to OPP100 */

                    do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);

            }

     

            /* Set MPU Frequency to what we detected now that voltages are set */

            do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);

    }

     

    将这个函数的内容修为:

            dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);

            /* Set CORE Frequencies to OPP100 */

            do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);//1000MHz

            /* Set MPU Frequency to what we detected now that voltages are set */

            do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);//600MHz

     

    以上函数调用关系:

    通过读取EEPROM设置频率

    board_init_r()//common/spl/spl.c

    spl_board_init(void)    // spl_board_init(void)

    am33xx_spl_board_init()  //board/ti/am335x/board.c