JZ2440 linux-3.4.2内核启动报错:Verifying Checksum ... Bad Data CRC
2024-10-19 18:26:49
使用的uboot版本是1.1.6,是打过u-boot-1.1.6_jz2440.patch的;
kernel使用的版本是3.4.2, 也是打过linux-3.4.2_camera_jz2440.patch的;
u-boot-1.1.6编译步骤如下(开发环境ubuntu16.04):
1. 添加环境变量
vim /etc/profile
export PATH=/usr/local/gcc-3.4.5-glibc-2.3.6/bin:$PATH
这里需要注意的是u-boot-1.1.6版本使用gcc-3.4.5版本去编译,如果用gcc-4.3版本去编译的话会报错。
2.使环境变量生效
source /etc/profil
3.编译
make 100ask24x0_config
make
编译完成后生成u-boot.bin。
kernel-3.4.2编译步骤如下(开发环境ubuntu16.04):
1.添加环境变量
这里需要注意的是上面编译u-boot时把交叉编译工具链设为了gcc-3.4.5,kernel-3.4.2版本编译需要用gcc-4.3.2,需要修改环境变量
vim /etc/profile
export PATH=/usr/local/usr/local/arm/4.3.2/bin:$PATH
2.使环境变量生效
source /etc/profile
3.编译
make uImage
编译完成后uImage生成在arch/arm/boot/目录下。
内核启动报错:Verifying Checksum ... Bad Data CRC
Reading data from 0x25f800 -- % complete.reading NAND page at offset 0x260000 failed
Could not read entire image due to bad blocks
bytes read: ERROR
## Booting image at 30007fc0 ...
Image Name: Linux-3.4.
Created: -- :: UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: Bytes = 2.3 MB
Load Address:
Entry Point:
Verifying Checksum ... Bad Data CRC
修改u-boot
查看u-boot-1.1.6/include/configs/100ask24x0.h,第59行:
#define MTDIDS_DEFAULT "nand0=nandflash0"
#define MTDPARTS_DEFAULT "mtdparts=nandflash0:256k@0(bootloader)," \
"128k(params)," \
"2m(kernel)," \
"-(root)"
kernel-3.4.2编译生成的uImage是2.3M, 而u-boot-1.1.6里面设置的是2m,明显分配小了。需要把第59行的2m修改为4m,再次编译u-boot。
修改kernel
查看linux-3.4.2/arch/arm/mach-s3c24xx/common-smdk.c第125行,
[] = {
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = SZ_2M,
},
kernel分配的空间也是2M,太小了,修改成4M,即:
.size = SZ_4M,
再次编译kernel。
把u-boot.bin和uImage再次烧录到开发板,在uboot里输入b,成功启动。如下:
NAND read: device offset 0x60000, size 0x400000 Reading data from 0x45f800 -- % complete.
bytes read: OK
## Booting image at 30007fc0 ...
Image Name: Linux-3.4.
Created: -- :: UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: Bytes = 2.3 MB
Load Address:
Entry Point:
Verifying Checksum ... OK
XIP Kernel Image ... OK Starting kernel ...
kernel启动时串口输出乱码的解决方法
输出乱码的原因可能是串口的波特率实际是38400,并没有设置成115200。
在uboot里设置启动参数:
set bootargs noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,
然后再输入b启动,这时串口输出就正常了。
最新文章
- 检索 COM 类工厂中 CLSID 为 {820280E0-8ADA-4582-A1D9-960A83CE8BB5} 的组件失败,原因是出现以下错误: 80040154 没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))。
- IOS第13天(2,私人通讯录,plist存储,偏好设置,归档)
- 随笔—邀请赛前训—	Codeforces Round #330 (Div. 2) B题
- BZOJ 1856 字符串(组合)
- mysql 批量创建表
- tomcat服务器配置多个项目
- 一个很好的php分词类库
- javascript原型链简单的理解
- Ubuntu 14.04远程登录服务器--ssh的安装和配置
- Microsoft HoloLens 技术解谜(下)
- 调试存储过程时提示ORA-20000: ORU-10027: buffer overflow
- 使用putty上传文件到linux系统
- 使用VLC创建组播流
- http 状态码大全
- C#提取PPT文本——提取SmartArt中的文本、批注中的文本
- .net 调用java service 代理类方法
- Linux中执行C++程序
- Visual Studio中配置Beyond Compare为版本比较工具
- tp框架中的一些疑点知识-1
- artDialog学习之旅(二)之扩展方法详解