内核启动卡在Uncompressing Linux..... done, booting the kernel
2014-07-21 19:17
519 查看
我先把造成Uncompressing Linux..... done, booting the kernel.的常见的几种可能再罗列一下
1串口参数与U-boot不匹配
我的u-boot串口打印如下
[s3c2440@liuchengdeng]#pri
bootargs=console=ttyS0,115200 mem=64M rw loglevel=7
bootcmd=nand read 30008000 100000 F00000;bootm 30008000
cpu=s3c2440
但是在drivers/serial/samsung.c中定义却不同,只要把58行改为#define S3C24XX_SERIAL_NAME ttyS即可
2、机器码不匹配
解决方法:在配置内核时开启debug
Kernel hacking -> Kernel low-level debugging functions 是打开的
Kernel hacking -> Kernel low-level debugging messages via S3C UART 也是打开的
在Device Drivers->Character devices->Serial drivers中选择加载Samsung SoC serial support ,然后再选上Support for console on Samsung SoC serial port 。
如果是机器码不匹配的问题,就会出现相关打印信息例如
Machine configuration botched (nr 182), unable to continue.
核对一下你的uboot机器码是否匹配。
如果不匹配,你可以修改uboot include/asm-arm/mach-types.h 文件中有关机器码的定义。或者修改内核 arch/arm/tools/mach-types 文件。
在新内核移植时有关机器码的修改步骤及分析如下:
修改机器码,机器码在2/arch/arm/mach-s3c2440/mach-test2440.c文件中MACHINE_START(TEST2440, "TEST2440")这一行定义的,第二个参数无所谓,重要的是第一个参数,在gcc编译这个mach-test2440.c的时候,会把TEST2440匹配到/include/asm-arm/mach-types.h中的"#define MACH_TYPE_TEST2440 N"这里, 如果在mach-types.h中找不到MACH_TYPE_TEST2440的定义,
gcc编译mach-test2440.c则报错;
还有,/include/asm-arm/mach-types.h是每次make zImage过程中, 由arch/arm/tools/mach-types文件生成的,
总结,修改机器码,涉及内核代码的三个地方,MACHINE_START宏,mach-types.h,mach-types,初启动时,bootloader向内核传递一个机器码。
3、串口配置没有
确保在配置内核时选上了在Device Drivers->Character devices->Serial drivers中选择加载Samsung SoC serial support ,然后再选上Support for console on Samsung SoC serial port 。
4、arch/arm/mach-s3c2440/Kconfig配置文件设置出错,某项关键选项没选上。
这个情况在网上不多见,但是一出错就会让人很纠结。如果芯片级或板级关键配置没选上或导致内核启动进入start_kernel函数之前就进入死循环。如果芯片级的配置没选上,会在内核执行完cpu id号匹配函数__lookup_processor_type()后进入死循环,这种情况你无论怎么配置内核的debug,串口都不会再有打印信息输出了。只有点个灯之类的才能跟踪代码的执行。
这种情况往往在打印Uncompressing Linux..... done, booting the kernel后就无任何输出了,即便你配置了debug。
我碰到这种情况是因为我在arch/arm/mach-s3c2440/Kconfig 上没有select ARCH_S3C2440。
导致Uncompressing Linux..... done, booting the kernel 卡住的大致就这几种情况。
1串口参数与U-boot不匹配
我的u-boot串口打印如下
[s3c2440@liuchengdeng]#pri
bootargs=console=ttyS0,115200 mem=64M rw loglevel=7
bootcmd=nand read 30008000 100000 F00000;bootm 30008000
cpu=s3c2440
但是在drivers/serial/samsung.c中定义却不同,只要把58行改为#define S3C24XX_SERIAL_NAME ttyS即可
2、机器码不匹配
解决方法:在配置内核时开启debug
Kernel hacking -> Kernel low-level debugging functions 是打开的
Kernel hacking -> Kernel low-level debugging messages via S3C UART 也是打开的
在Device Drivers->Character devices->Serial drivers中选择加载Samsung SoC serial support ,然后再选上Support for console on Samsung SoC serial port 。
如果是机器码不匹配的问题,就会出现相关打印信息例如
Machine configuration botched (nr 182), unable to continue.
核对一下你的uboot机器码是否匹配。
如果不匹配,你可以修改uboot include/asm-arm/mach-types.h 文件中有关机器码的定义。或者修改内核 arch/arm/tools/mach-types 文件。
在新内核移植时有关机器码的修改步骤及分析如下:
修改机器码,机器码在2/arch/arm/mach-s3c2440/mach-test2440.c文件中MACHINE_START(TEST2440, "TEST2440")这一行定义的,第二个参数无所谓,重要的是第一个参数,在gcc编译这个mach-test2440.c的时候,会把TEST2440匹配到/include/asm-arm/mach-types.h中的"#define MACH_TYPE_TEST2440 N"这里, 如果在mach-types.h中找不到MACH_TYPE_TEST2440的定义,
gcc编译mach-test2440.c则报错;
还有,/include/asm-arm/mach-types.h是每次make zImage过程中, 由arch/arm/tools/mach-types文件生成的,
总结,修改机器码,涉及内核代码的三个地方,MACHINE_START宏,mach-types.h,mach-types,初启动时,bootloader向内核传递一个机器码。
3、串口配置没有
确保在配置内核时选上了在Device Drivers->Character devices->Serial drivers中选择加载Samsung SoC serial support ,然后再选上Support for console on Samsung SoC serial port 。
4、arch/arm/mach-s3c2440/Kconfig配置文件设置出错,某项关键选项没选上。
这个情况在网上不多见,但是一出错就会让人很纠结。如果芯片级或板级关键配置没选上或导致内核启动进入start_kernel函数之前就进入死循环。如果芯片级的配置没选上,会在内核执行完cpu id号匹配函数__lookup_processor_type()后进入死循环,这种情况你无论怎么配置内核的debug,串口都不会再有打印信息输出了。只有点个灯之类的才能跟踪代码的执行。
这种情况往往在打印Uncompressing Linux..... done, booting the kernel后就无任何输出了,即便你配置了debug。
我碰到这种情况是因为我在arch/arm/mach-s3c2440/Kconfig 上没有select ARCH_S3C2440。
导致Uncompressing Linux..... done, booting the kernel 卡住的大致就这几种情况。
相关文章推荐
- s3c2440移植linux-2.6.22 内核启动卡在Uncompressing Linux..... done, booting the kernel.
- 基于FL2440的3.6.6内核移植出现Uncompressing Linux... done, booting the kernel.
- s5pv210 linux3.8.3内核移植之二:Uncompressing Linux... done, booting the kernel.问题解决
- 启动linux-2.32.2内核出现done, booting the kernel
- 内核移植错误:Uncompressing Linux............................... done, booting the kernel
- 移植linux内核到s3c6410(kernel 打印:Uncompressing Linux ... done , booting the kernel.后无响应问题的解决。)
- linux内核在Uncompressing Linux... done, booting the kernel中卡住的原因
- Uncompressing Linux... done, booting the kernel (问题集锦)
- Uncompressing Linux..... done, booting the kernel.
- Linux启动卡在,Uncompressing Linux...done, booting the kernel.
- Uncompressing Linux..... done, booting the kernel.
- 内核启动停在了 done, booting the kernel
- Uncompressing Linux..... done, booting the kernel.
- 树莓派:Uncompressing Linux...done, booting the kernel
- linux内核在Uncompressing Linux... done, booting the kernel中卡住的原因
- Uncompressing Linux..... done, booting the kernel.
- linux2.4启动分析(2)---内核解压缩过程 compress booting kernel
- The Kernel Boot Process --linux2.6.25内核启动过程
- The Kernel Boot Process --linux2.6.25内核启动过程
- 移植内核过程中出现界面卡在"Uncompressing Linux... done, booting the kernel."