Uncompressing Linux... done, booting the kernel (问题集锦)
来源:互联网 发布:java rmi原理 编辑:程序博客网 时间:2024/06/05 00:05
今天用主线Linux内核移植到MINI6410,主线内核2.6.37.1基本已经支持了MINI6410的板子,所以移植到能够启动起来的阶段很简单,但是在移植的时候还是出现了一个比较常见的问题:
- MINI6410 # bootm 0x50008000
- ## Booting kernel from Legacy Image at 50008000 ...
- Image Name: Linux-2.6.37.1
- Image Type: ARM Linux Kernel Image (uncompressed)
- Data Size: 3800644 Bytes = 3.6 MiB
- Load Address: 50008000
- Entry Point: 50008040
- Verifying Checksum ... OK
- XIP Kernel Image ... OK
- OK
- Starting kernel ...
- Uncompressing Linux... done, booting the kernel.
- 停住不动了~~~~
这种问题比较常见,由于输出的信息有限,不是很好找原因,如果去代码中追踪的话也比较麻烦。在查找原因解决这个问题的时候,我找到了一些可能出现的原因,在这里总结一下:
1、machine type 不匹配
在 内核自解压完成以后内核会首先会进入 bl __lookup_machine_type函数(在arch/arm/kernel/head.S中),检查machine_type是否匹配,如果不 匹配会跳入__error_a函数(在arch/arm/kernel/head-common.S中),导致启动失败。
例如arch/arm/mach-s3c64xx/mach-mini6410.c 查看下面这个结构体:
- MACHINE_START( MINI6410 , "MINI6410" )
- /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */
- . boot_params = S3C64XX_PA_SDRAM + 0x100,
- . init_irq = s3c6410_init_irq,
- . map_io = mini6410_map_io,
- . init_machine = mini6410_machine_init,
- . timer = & s3c24xx_timer,
- MACHINE_END
这个宏的定义在arch/arm/include/asm/mach/arch.h
- /*
- * Set of macros to define architecture features. This is built into
- * a table by the linker.
- */
- # define MACHINE_START( _type , _name) /
- static const struct machine_desc __mach_desc_# # _type /
- __used /
- __attribute__( ( __section__( ".arch.info.init" ) ) ) = { /
- .nr = MACH_TYPE_##_type, /
- . name = _name,
- # define MACHINE_END /
- } ;
这个宏定义扩展之后的machine type 就成了 MACHINE_TYPE_MIN6410。MACHINE_TYPE_MIN6410这个宏定义在include/generated/mach-types.h
-
- # define MACH_TYPE_MINI6410 2520
machine type在u-boot的配置 在board/samsung/mini6410/mini6410.c
-
- /*
- * Miscellaneous platform dependent initialisations
- */
- int board_init( void )
- {
- s3c64xx_gpio * const gpio = s3c64xx_get_base_gpio( ) ;
- . . . . .
- gd- > bd- > bi_arch_number = MACH_TYPE ;
- gd- > bd- > bi_boot_params = PHYS_SDRAM_1 + 0x100;
- return 0;
- }
这个宏的定义在:include/configs/mini6410.h
-
- /*
- * Architecture magic and machine type
- */
- # define MACH_TYPE 2520
只要这两个数对上就可以了。
2、串口驱动没有编译入内核
在弄MINI6410的时候我就犯了这个错误,因为还没有MINI6410的默认配置文件,所有这个要自己选上的。位置在Device Drivers->Character devices->Serial drivers中
- <*> Samsung SoC serial support
- [*] Support for console on Samsung SoC serial port
- <*> Samsung S3C6400/S3C6410/S5P6440/S5P6450/S5PC100 Serial port support
3、内核启动参数设置错误
内核的启动参数的错误也可以造成同样的错误。
比如有一个配置是:
- noinitrd root=/dev/mtdblock4 rootfstype=jffs2 rw console=ttySAC0,115200 init=/linuxrc mem=64M
关键是在 console=ttySAC0,115200上,如果 ttySAC0弄错了,或者波特率不对就会出问题。
不同的CPU的 console有可能不一样,比如有的可能是 ttyS0。
- Uncompressing Linux... done, booting the kernel (问题集锦)
- Uncompressing Linux... done, booting the kernel (问题集锦)
- Uncompressing Linux... done, booting the kernel (问题集锦)
- Uncompressing Linux... done, booting the kernel (问题集锦)
- Uncompressing Linux...done, booting the kernel解决办法
- Uncompressing Linux..... done, booting the kernel.
- Uncompressing Linux... done, booting the kernel
- Uncompressing Linux... done, booting the kernel
- Uncompressing Linux..... done, booting the kernel.
- Uncompressing Linux..... done, booting the kernel.
- Uncompressing Linux..... done, booting the kernel.
- Uncompressing Linux... done, booting the kernel
- Uncompressing Linux..... done, booting the kernel.
- Uncompressing Linux..... done, booting the kernel.
- Uncompressing Linux... done, booting the kernel.
- Uncompressing Linux..... done, booting the kernel.
- Uncompressing Linux..... done, booting the kernel.
- Uncompressing Linux..... done, booting the kernel.
- android static 惹祸
- QTableView根据标题文字和表格文字自适应宽度 QTableView m_pTable;
- DEDE5.7相关文章及全站相关文章的调用和修改
- java中类初始化时机
- 面试常考 类 对象 接口 继承 多态 异常 多线程 集合框架 泛型 IO流
- Uncompressing Linux... done, booting the kernel (问题集锦)
- 在linux下搭建OpenCASCADE开发环境(freetype,freeimage,ftgl,qt...)
- QT隐藏工具栏上的右键菜单
- PS
- QT两个字符串转化函数,避免文字乱码。
- QT线程初次使用。遇到的问题。
- 翻译
- linux系统中用一条命令 查找/data目录及子目录下 内容包含 “hello” 的所有文件名称 及 所在行数
- C#获取工程所在目录的各种方法总结