CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 17020|回复: 16

ct板子nand换成自己的kernel起不来问题???

[复制链接]
发表于 2014-3-13 11:46:09 | 显示全部楼层 |阅读模式
我把cubietruck里kernel换成自己编译好的uImage,上电后无法加载kernel,log如下:
HELLO! BOOT0 is starting!
boot0 version : 2.0.0?
read dram para.
dram driver version: 1.15
dram size =2048MB
0x7ffbffff
super_standby_flag = 0
Succeed in opening nand flash.
block from 2 to 6
deal block 2
Succeed in reading Boot1 file head.
The size of Boot1 is 0x00068000.
The file stored in 0x00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.147] boot1 version : 2.0.0
[       0.147] script installed early ok
[       0.148] pmu type = 3
[       0.252] bat vol = 1600 mv
[       0.266] axi:ahb:apb=4:2:2
[       0.266] set dcdc2=1450mv, clock=912M successed
[       0.268] key
[       0.281] no key found
[       0.281] flash init start
[       0.281] NB1 : enter NFB_Init
[       0.284] NB1 : enter phy init
[       0.287] [NAND] nand driver(b) version: 0x0x00000002, 0x0x00000012, data: 0x20130627
[       0.295] get the good blk ratio from hwscan : 912
[       0.300] NB1 : nand phy init ok
[       1.663] _RepairLogBlkTbl start
[       1.663] _RepairLogBlkTbl end
[       1.682] NB1 : init ok
[       1.682] flash init finish
[       1.683] fs init ok
[       1.685] fattype FAT16
[       1.687] fs mount ok
[       1.691] nand good_block_ratio=912
[       1.693] storage_type=0
[       1.704] 0
[       1.704] set pc
[       1.704] usbdc_vol = 4000, usbdc_cur = 0
[       1.706] usbpc_vol = 4200, usbpc_cur = 0
[       1.710] init to usb pc
[       1.713] set pc
[       1.793] key value = 0
[       1.793] recovery key high 40, low 4
[       1.806] show pic finish
[       1.806] load kernel start
[       1.823] load kernel successed
[       1.823] start address = 0x4a000000
[       2.130] power exit detect

U-Boot 2011.09-rc1 (Feb 28 2014 - 16:10:25) Allwinner Technology

CPU:   SUNXI Family
Board: SUN7I-EVB
DRAM:  2 GiB
NAND:  NB1 : enter NFB_Init
[NAND] nand driver(b) version: 0x2, 0x12, data: 20130526
[NAND] set nand_good_block_ratio 912
NB1 : nand phy init ok
NB1 : init ok
3200 MiB
Using default environment

In:    serial
Out:   serial
Err:   serial
--------fastboot partitions--------
-total partitions:3-
-name-        -start-       -size-      
bootloader  : 8000          20000      
rootfs      : 28000         400000      
UDISK       : 428000        218000      
-----------------------------------
no misc partition is found
Hit any key to stop autoboot:  0
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading /uEnv.txt

177 bytes read
## Warning: defaulting to text format
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading /script.bin

46240 bytes read
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading /uImage

4603896 bytes read
## Booting kernel from Legacy Image at 48000000 ...
   Image Name:   Linux-3.4.61
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4603832 Bytes = 4.4 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
sun7i#print
baudrate=115200
boot_fastboot=fastboot
boot_normal=bootm 48000000
boot_recovery=sunxi_flash read 40007800 recovery;boota 40007800
bootargs=console=tty0 root=/dev/nandb loglevel=8 console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait panic=10 rood
bootcmd=run setargs_nand boot_normal
bootdelay=1
bootenv=/uEnv.txt
console=tty0
extraargs=console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootwait panic=10 rootfstype=ext4 rootflags=discard
filesize=463FF8
kernel=/uImage
kerneladdr=0x48000000
loadbootenv=mw 41000000 0 10000;ext4load nand 2:0 $scriptaddr /boot${bootenv} || fatload nand 0:0 $scriptaddr ${bootenv};env import 41000000 10000;sete}
loadkernel=ext4load nand 2:0 $kerneladdr /boot${kernel} || fatload nand 0:0 $kerneladdr ${kernel}
loadscriptbin=ext4load nand 2:0 $scriptbinaddr /boot${scriptbin} || fatload nand 0:0 $scriptbinaddr ${scriptbin}
loglevel=8
nand_root=/dev/nandb
partitions=bootloader@nanda:rootfs@nandb:UDISK@nandc
scriptaddr=0x41000000
scriptbin=/script.bin
scriptbinaddr=0x43000000
setargs_nand=run loadbootenv loadscriptbin loadkernel
stderr=serial
stdin=serial
stdout=serial

Environment size: 1335/131068 bytes

我是直接把nand里的img文件解包后吧uImage换成自己编译好的,就出现这个问题了~
回复

使用道具 举报

发表于 2014-3-13 14:43:16 | 显示全部楼层
重新编译试试看。参照http://linux-sunxi.org/Linux_Kernel
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-3-13 14:51:19 | 显示全部楼层
sunbeyond 发表于 2014-3-13 14:43
重新编译试试看。参照http://linux-sunxi.org/Linux_Kernel

不知道重新编译过多少次了,换了好几种交叉编译工具,从SD卡就没问题,不知道为什么到了nand上就不行,求破解~
回复 支持 反对

使用道具 举报

发表于 2014-3-13 14:56:03 | 显示全部楼层
你用什么工具打包。
回复 支持 反对

使用道具 举报

发表于 2014-3-13 15:03:12 | 显示全部楼层
可能是编译内核是配置项目有缺失,比如分区。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-3-13 15:21:14 | 显示全部楼层
sunbeyond 发表于 2014-3-13 14:56
你用什么工具打包。

imgrepacker,我是这样操作的:
先下一个标准的nand.img文件,然后用imgrepacker解包,解包完了把里面的uImage换成我编译好的,尝试了很多次,用我自己的编译器出来的kernel就是不行,但我同事用buildboot编译出来的就OK,kernel源码用的同一个,奇怪~
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-3-13 15:21:55 | 显示全部楼层
wwuw 发表于 2014-3-13 15:03
可能是编译内核是配置项目有缺失,比如分区。

怎么判断是不是配置选项缺失?
回复 支持 反对

使用道具 举报

发表于 2014-3-13 20:38:18 | 显示全部楼层
你的-fastboot partitions-打印的选项不够吧!
--------fastboot partitions--------
-total partitions:10-
-name-        -start-       -size-      
bootloader  : 8000          8000        
env         : 10000         8000        
boot        : 18000         8000        
system      : 20000         100000      
data        : 120000        100000      
misc        : 220000        8000        
recovery    : 228000        10000      
cache       : 238000        100000      
databk      : 338000        80000      
UDISK       : 3b8000        2d8000      
-----------------------------------
回复 支持 反对

使用道具 举报

发表于 2014-3-13 21:18:44 来自手机 | 显示全部楼层
是不是没有mkimage?
回复 支持 反对

使用道具 举报

发表于 2014-3-14 00:43:35 | 显示全部楼层
image crc error,可能是使用了不同的压缩方式,而uboot按照固定的方式解压内核镜像,发生错误。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-5-2 08:56 , Processed in 0.025217 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部