糖尿病康复,内容丰富有趣,生活中的好帮手!
糖尿病康复 > linux 内核调试 booting the kernel. Uncompressing Linux...done booting the kernel解决办法

linux 内核调试 booting the kernel. Uncompressing Linux...done booting the kernel解决办法

时间:2021-09-28 16:45:22

相关推荐

linux 内核调试 booting the kernel. Uncompressing Linux...done  booting the kernel解决办法

u-boot是好的,是刚移植成功的,用其他的内核跑过没问题。所以皇莡-boot传参有问题,问题就是出在我移植的内核上面。

我用的是mini2440的配置,linux2.6.35的内核。网上找了很多资料试了都没有,开了CONFIG_DEBUG_LL(这个选项是在Kernel hacking里面,需要你打开Kernel low-level debugging functions & Kernel Low-level debugging message via S3C UART)本来想看下出错信息的,加了之后连Uncompressing Linux...done, booting the kernel都没有了。悲剧。

后来没办法,只能设死循环调试。后来发现在 bl __lookup_machine_type 这条语句(在arch/arm/kernel/head.S中) 执行之后返回的r5寄存器一直是0. 由此可以推测我的MACHINE_TYPE肯定出问题了。

去arch/arm/mach-s3c2440/mach-mini2440.c 查看下面这个结构体:

MACHINE_START(MINI2440, "MINI2440")

/* Maintainer: Michel Pollet */

.phys_io = S3C2410_PA_UART,

.io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,

.boot_params = S3C2410_SDRAM_PA + 0x100,

.map_io = mini2440_map_io,

.init_machine = mini2440_init,

.init_irq = s3c24xx_init_irq,

.timer = &s3c24xx_timer,

MACHINE_END

问题就是出在第一行的MINI2440,因为这个宏定义扩展之后的machine type 就成了 MACHINE_TYPE_MINI2440, 而我在u-boot定义的是MACHINE_TYPE_S3C2440,因此不匹配导致内核不识别死在这里了。

将MINI2440改成S3C2440后内核成功起来。诶,浪费了好几个小时,脑子转太慢了。

如果觉得《linux 内核调试 booting the kernel. Uncompressing Linux...done booting the kernel解决办法》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。