U-Boot的挂在加载内核? [英] U-Boot hangs while loading kernel?

查看:170
本文介绍了U-Boot的挂在加载内核?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作飞思卡尔董事会imx50evk。我已经建立了使用LTIB(Linux目标图像生成器)的uboot.bin和的uImage。在U-Boot的提示我输入 bootm地址命令,然后将其显示消息加载内核...后挂起

I am working on Freescale board imx50evk. I have built the uboot.bin and uImage using LTIB (linux target image builder). At the U-Boot prompt I enter the bootm addr command, and then it hangs after showing the message "Loading Kernel..."

> MX50_RDP U-Boot > boot

MMC read: dev # 0, block # 2048, count 6290 partition # 0 ... 
6290 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
   Image Name:   Linux-2.6.35.8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1323688 Bytes =  1.3 MB
   Load Address: a0008000
   Entry Point:  a0008000
   Verifying Checksum ... OK
   Loading Kernel Image ...


推荐答案

此问题可以通过多种原因引起的。最常见的原因列举如下。

This problem can be caused by a number of reasons. The most common reasons are listed below.

原因#1 - Linux控制台启动参数不正确:

例如,默认情况下UART3端口和端口UART3的默认配置的OMAP3小猎犬板载显示控制台消息为115200波特,8位数据,无奇偶校验和无流量控制。因此,观看的u-boot启动参数,你应该看到类似以下内容:

For example, by default the OMAP3 beagle-board displays console messages on the UART3 port and the default configuration of UART3 port is 115200 baud, 8-bit data, no parity and no flow control. Hence, viewing the u-boot boot arguments you should see something like the following:

OMAP3 beagleboard.org#printenv bootargs

OMAP3 beagleboard.org # printenv bootargs

bootargs = =控制台根ttyS2,115200n8 =的/ dev / mmcblk0p2 RW rootwait

bootargs=console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait

控制台参数是大小写敏感的,所以一定要确保它是正确写给您正在使用的电路板和没有空格。例如,在console = ttyS2,115200n8是行不通的。

The console parameter is case-sensitive and so make sure it is written correctly for the board you are using and there are no spaces. For example, "console=ttyS2, 115200n8" would not work.

在Linux内核版本2.6.36和更新,使用ttyO2代替ttyS2(这是资本-O,不是零)。

On Linux kernels version 2.6.36 and newer, use ttyO2 instead of ttyS2 (that's capital-O, not zero).

要避免这种错误的最佳方法是使用脚本的引导参数。样本Teraterm_Scripts可用。类似的脚本可以为Linux Minicom的用户创建。

The best way to avoid such errors is to use a script for your boot parameters. Sample Teraterm_Scripts are available. Similar scripts can be created for Linux Minicom users.

原因#2 - 引导装载程序和内核的机器号之间不匹配

Linux并不让你启动一个硬件平台建立在其他的硬件内核,即使底层处理器是一样的。没有理由,你为什么会曾经想要!当内核启动时,它做的第一件事是检查的引导装载程序传递的机号相匹配内核是为建机号。如果机器号不匹配内核将无法启动。这是个好东西!

Linux does not allow you to boot a kernel built for one hardware platform on some other piece of hardware, even if the underlying processor is the same. There is no reason why you would ever want to! When the kernel starts, one of the first things it does is to check that the machine number passed by the boot-loader matches the machine number that the kernel was built for. If the machine numbers do not match the kernel will not boot. This is a good thing!

您可以通过重新建设的内核CONFIG_DEBUG_LL启用检查。要启用该启动Linux menuconfig的实用程序(通过执行的make menuconfig),并进入内核黑客,然后选择内核的低级别的调试功能。例如,如果你要启用该选项,并尝试在一个OMAP3猎兔犬板下面的消息会被视为一个启动EVM OMAP3内核。

You can check by re-building your kernel with CONFIG_DEBUG_LL enabled. To enable this start the linux menuconfig utility (by executing "make menuconfig") and go to "Kernel hacking" and select "Kernel low-level debugging functions". For example, if you were to enable this option and attempt to boot an OMAP3 EVM kernel on an OMAP3 beagle-board the following message would be seen.

错误:无法识别/不支持的机器ID(R1 = 0x0000060a)

Error: unrecognized/unsupported machine ID (r1 = 0x0000060a).

可用的机器支持:

的ID(十六进制)名称
000005ff OMAP3 EVM

ID (hex) NAME 000005ff OMAP3 EVM

请检查您的内核配置和/或引导程序。

Please check your kernel config and/or bootloader.

原因#3 - 一个软件缺陷

如果在previous原因并没有解决你的问题,然后有一个机会,一个软件的变化打破了你正在建设设备的内核。为了得到确切位置内核失败的更多信息,建议您在linux内核配置使CONFIG_DEBUG_LL。这可能引导内核被看作后打印出更多的信息,可以帮助确定内核失败。即使你无法做这里的任何进一步的进展,提供尽可能多的信息,你可以将帮助其他人确定是哪里的问题。

If the previous causes did not solve your problem, then there is a chance that a software change is breaking the kernel for the device you are building for. To get more information on exactly where the kernel is failing, it is recommended that you enable CONFIG_DEBUG_LL in the linux kernel configuration. This may print out more information after "booting the kernel" is seen and may help determine where the kernel is failing. Even if you are unable to make any further progress from here, providing as much information as you can will help others determine where the problem is.

这篇关于U-Boot的挂在加载内核?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆