移植linux内核到s3c6410(kernel 打印:Uncompressing Linux ... done , booting the kernel.后无响应问题的解决。)

博客讲述了在移植Linux内核到s3c6410过程中遇到的'Uncompressing Linux... done, booting the kernel.'后无响应的调试过程。通过检查machine ID、内核参数等排除了常见问题,并通过低级别调试方法(printascii/printhex8)定位到异常发生在start_kernel函数后的setup_arch。最终发现是boot参数中'mem=256'缺少'M'导致内存分配失败,修复后问题解决。" 6129493,413135,使用RAW SOCKET发送UDP包,"['socket编程', '网络协议', 'C/C++', '数据传输']
摘要由CSDN通过智能技术生成

   U-boot网口问题解决后,uImage和ramdisk终于可以上传到单板上去验证了。脚本为:


MINI6410 # setenv serverip 192.168.1.200

 

MINI6410 # setenv bootargs root=/dev/ram rootfstype=ext2 init=/linuxrc console=ttySAC0,115200 mem=256

 

MINI6410 # tftp 0x51800000 ramdisk.bin


MINI6410 # tftp 0x50800000 uImage


MINI6410 # bootm 0x50800000 0x51800000

————————————————————————————————————————————————————————

————————————————————————————————————————————————————————

执行bootm命令后打印:


## Booting image at 50800000 ...

   Image Name:   Linux-2.6.38

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    1902992 Bytes =  1.8 MB

   Load Address: 50008000

   Entry Point:  50008000

   Verifying Checksum ... OK

OK

## Loading Ramdisk Image at 51800000 ...

   Image Name:   ramdisk1.0

   Image Type:   ARM Linux RAMDisk Image (gzip compressed)

   Data Size:    1040870 Bytes = 1016.5 kB

   Load Address: 00000000

   Entry Point:  00000000

   Verifying Checksum ... OK

 

Starting kernel ...

 

Uncompressing Linux... done, booting the kernel.

 

就无任何反应了!!!!网上查资料主要怀疑方向有:

1、machine ID uboot与内核定义不一致。

2、内核参数console传递的不对。

 

问题确认:

1、machine ID uboot与内核定义不一致。

uboot传递的machine ID参数:

board\samsung\mini6410\Mini6410.c

 gd->bd->bi_arch_number = MACH_TYPE;

include/configs/Mini6410.h

#define MACH_TYPE  2520

内核的machine ID参数:

include/generated/mach-types.h

#define MACH_TYPE_MINI6410             2520

所以不是这个问题。


 

2、内核参数console传递的不对。

console=ttySAC0,115200 这个也确认是没有问题。

所以也不是这个问题。

 

————————————————————————————————————————————————————————

————————————————————————————————————————————————————————

没办法,只能自己动手调试了。

 

1、首先尝试low-level debug调试方法

Kernel hacking-->Kernel low-level debugging functions

Kernel hacking-->S3C UART to use for low-level debug 为UART 0。

可是问题依旧,还是无任何打印。

 

2、直接使用printascii/printhex8 打印kernel启动过程。

<
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值