主题 : uncompressing linux .......................... linux启动问题!!急求助 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 55527
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2011-09-19
最后登录: 2011-11-17
楼主  发表于: 2011-09-23 22:25

 uncompressing linux .......................... linux启动问题!!急求助

说问题之前我先吧自己的一些配置信息CP一份:
U-BOOT@: printenv
bootargs=noinitrd root=/dev/mtdblock3 rw console=ttySAC0 init=/linuxrc rootfstyp
e=jffs2 mem=64M
bootdelay=1
baudrate=115200
ethaddr=08:00:3e:26:0a:5b
ipaddr=192.168.1.70
serverip=192.168.1.1
netmask=255.255.255.0
mtdids=nand0=nandflash0
mtdparts=mtdparts=nandflash0:256k@0(boot),128k(boot-env),5m(kernel),-(root)
bootcmd=nand read.jffs2 0x32000000 kernel;bootm 0x32000000
stdin=serial
stdout=serial
stderr=serial
partition=nand0,0
mtddevnum=0
mtddevname=boot

Environment size: 459/131068 bytes
U-BOOT@:

-----------------------------------
U-BOOT@: mtdparts

device nand0 <nandflash0>, # parts = 4
#: name size offset mask_flags
0: boot 0x00040000 0x00000000 0
1: boot-env 0x00020000 0x00040000 0
2: kernel 0x00500000 0x00060000 0
3: root 0x03aa0000 0x00560000 0

active partition: nand0,0 - (boot) 0x00040000 @ 0x00000000

defaults:
mtdids : nand0=nandflash0
mtdparts: mtdparts=nandflash0:256k@0(boot),128k(boot-env),5m(kernel),-(root)
U-BOOT@:

-----------------------------------
======================================

以下是反复启动,最后彻底死掉的信息:

U-Boot 1.1.6 (Sep 23 2011 - 02:42:40)

DRAM: 64 MB
Flash: 2 MB
NAND: 64 MiB
In: serial
Out: serial
Err: serial
UPLLVal [M:38h,P:2h,S:2h]
MPLLVal [M:7fh,P:2h,S:1h] CLKDIVN [5h]
USB [IN_ENDPOINT:1,OUT_ENDPOINT:3] MODE [DMA]
FORMAT [ADDR(DATA):4]+[SIZE(n+10):4]+[DATA:n]+[CS:2]

Hit any key to stop autoboot: 0
Booting Linux ...

NAND read: device 0 offset 0x60000, size 0x500000

Reading data from 0x55fe00 -- 100% complete.
5242880 bytes read: OK
## Booting image at 30008000 ...
Image Name: Linux-2.6.32.2-FriendlyARM
Created: 2011-09-23 9:32:23 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1738016 Bytes = 1.7 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...undefined instruction
pc : [<300092e0>] lr : [<3000a988>]
sp : 301b9790 ip : 301b8534 fp : 301b9814
r10: 00000356 r9 : 301b0a30 r8 : 301b04a4
r7 : 0000000d r6 : 0000035d r5 : 00000000 r4 : 00000007
r3 : 00000036 r2 : 3000b848 r1 : 000003a8 r0 : 00000036
Flags: Nzcv IRQs off FIQs off Mode SVC_32
Resetting CPU ...



U-Boot 1.1.6 (Sep 23 2011 - 02:42:40)

DRAM: 64 MB
Flash: 2 MB
NAND: 64 MiB
In: serial
Out: serial
Err: serial
UPLLVal [M:38h,P:2h,S:2h]
MPLLVal [M:7fh,P:2h,S:1h] CLKDIVN [5h]
USB [IN_ENDPOINT:1,OUT_ENDPOINT:3] MODE [DMA]
FORMAT [ADDR(DATA):4]+[SIZE(n+10):4]+[DATA:n]+[CS:2]

Hit any key to stop autoboot: 0
Booting Linux ...

NAND read: device 0 offset 0x60000, size 0x500000

Reading data from 0x55fe00 -- 100% complete.
5242880 bytes read: OK
## Booting image at 30008000 ...
Image Name: Linux-2.6.32.2-FriendlyARM
Created: 2011-09-23 9:32:23 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1738016 Bytes = 1.7 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
............................................................................

U-Boot 1.1.6 (Sep 23 2011 - 02:42:40)

DRAM: 64 MB
Flash: 2 MB
NAND: 64 MiB
In: serial
Out: serial
Err: serial
UPLLVal [M:38h,P:2h,S:2h]
MPLLVal [M:7fh,P:2h,S:1h] CLKDIVN [5h]
USB [IN_ENDPOINT:1,OUT_ENDPOINT:3] MODE [DMA]
FORMAT [ADDR(DATA):4]+[SIZE(n+10):4]+[DATA:n]+[CS:2]

Hit any key to stop autoboot: 0
Booting Linux ...

NAND read: device 0 offset 0x60000, size 0x500000

Reading data from 0x55fe00 -- 100% complete.
5242880 bytes read: OK
## Booting image at 30008000 ...
Image Name: Linux-2.6.32.2-FriendlyARM
Created: 2011-09-23 9:32:23 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1738016 Bytes = 1.7 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...

U-Boot 1.1.6 (Sep 23 2011 - 02:42:40)

DRAM: 64 MB
Flash: 2 MB
NAND: 64 MiB
In: serial
Out: serial
Err: serial
UPLLVal [M:38h,P:2h,S:2h]
MPLLVal [M:7fh,P:2h,S:1h] CLKDIVN [5h]
USB [IN_ENDPOINT:1,OUT_ENDPOINT:3] MODE [DMA]
FORMAT [ADDR(DATA):4]+[SIZE(n+10):4]+[DATA:n]+[CS:2]

Hit any key to stop autoboot: 0
Booting Linux ...

NAND read: device 0 offset 0x60000, size 0x500000

Reading data from 0x55fe00 -- 100% complete.
5242880 bytes read: OK
## Booting image at 30008000 ...
Image Name: Linux-2.6.32.2-FriendlyARM
Created: 2011-09-23 9:32:23 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1738016 Bytes = 1.7 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...data abort
pc : [<300093b0>] lr : [<3000a988>]
sp : 301b9790 ip : 000001ff fp : 301b9814
r10: 00000356 r9 : 0c120c12 r8 : 301b04a4
r7 : 00000000 r6 : 00000000 r5 : 00000002 r4 : fffffff7
r3 : 00000004 r2 : 00000000 r1 : 3000b650 r0 : 00000030
Flags: NzCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...



U-Boot 1.1.6 (Sep 23 2011 - 02:42:40)

DRAM: 64 MB
Flash: 2 MB
NAND: 64 MiB
In: serial
Out: serial
Err: serial
UPLLVal [M:38h,P:2h,S:2h]
MPLLVal [M:7fh,P:2h,S:1h] CLKDIVN [5h]
USB [IN_ENDPOINT:1,OUT_ENDPOINT:3] MODE [DMA]
FORMAT [ADDR(DATA):4]+[SIZE(n+10):4]+[DATA:n]+[CS:2]

Hit any key to stop autoboot: 0
Booting Linux ...

NAND read: device 0 offset 0x60000, size 0x500000

Reading data from 0x55fe00 -- 100% complete.
5242880 bytes read: OK
## Booting image at 30008000 ...
Image Name: Linux-2.6.32.2-FriendlyARM
Created: 2011-09-23 9:32:23 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1738016 Bytes = 1.7 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...

invalid compressed format (err=2)

-- System halted

===============================
我用的是友善提供的 Linux-2.6.32.2.tar.gz
ARM-GCC 也是友善的:

root@ubuntu:~# arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/lite-respin/linux/src/gcc-4.3/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2008q3-72' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)
root@ubuntu:~#

-----------------------
因为是才学linux,这个问题折磨我好几天了,555~~请各位帮帮我呀,谢谢了先!

我的UBOOT似乎没有问题,用它来引导我用ADS做的测试程序都OK。
另附:MACH_TYPE和其他MEM信息,因为用的是友善的所以U-BOOT和LINUX都是MACH_TYPE_MINI2440=1999

U-BOOT@: badinfo
Unknown command 'badinfo' - try 'help'
U-BOOT@: bdinfo
arch_number = 0x000007CF
env_t = 0x00000000
boot_params = 0x30000100
DRAM bank = 0x00000000
-> start = 0x30000000
-> size = 0x04000000
ethaddr = 08:00:3E:26:0A:5B
ip_addr = 192.168.1.70
baudrate = 115200 bps
U-BOOT@:

-----------------------
我上网搜索了很多U-BOOT给LINUX传递参数的资料,以及用mkimage吧zImage转换成uImage都试过。。。
mkimage -A arm -O linux -T kernel -C none -n linux-2.6.32 -a 0x30008000 -e 0x30008040 -d zImage uImage 后
下载地址改为0x30008000, bootm 0x30008000 还是不能启动linux。

可能有人会问友善的linux编译的内核怎才1点几m,那是因为我载入config_mini2440_n35后,再menuconfig的时候取消了
lcd 、DM9000网卡、无线网卡等,现在基本上就只剩下MTD 、YAFFS、console,usb等常规配置了。
(用友善默认的config_mini2440_**都试过,直接编译后都在2.2m样子,写入nandflash后u-boot引导都不能启动linux,故在他默然配置上取消了些,目的把问题出处缩小范围)

后来我尝试把linux下的mtd配置该成了u-boot的
static struct mtd_partition friendly_arm_default_nand_part[] = {
[0] = {
.name = "boot",
.size = 0x00040000,
.offset = 0,
},
[1] = {
.name = "boot-env",
.offset = 0x00040000,
.size = 0x00020000,
},
[2] = {
.name = "kernel",
.offset = 0x00060000,
.size = 0x00500000,
},
[3] = {
.name = "root",
.offset = 0x00560000,
.size = 0x03AA0000,
}
};

结果还是不能正常启动linux。我郁闷了 。。。
现象都差不多,要么在uncompressing linux .... 就挂掉,要么就是 uncompressing linux .... data abort 等信息
后来我想,是不是因为没下载根文件系统,是不是就不能启动linux,网上查资料说是可以不需要,linux启动信息会提示没有根文件系统的信息。


从目前的启动信息来看,程序在linux自解压的过程中跑飞了。。。更关键的是,我不知道怎么去捕捉它。

------------
以上就是这天折腾的,我是实在没招了,请各位热衷于linux的热心网友,帮我分析下,提点建议或者解决办法。谢谢各位啦。!!!!!!!!!!!!!最后还要感谢友善,是友善mini2440让我开始步入linux。
^很多问题的背后都是简单的原因......
级别: 荣誉会员
UID: 34780
精华: 0
发帖: 1219
金钱: 6230 两
威望: 1246 点
综合积分: 2438 分
注册时间: 2010-12-21
最后登录: 2017-09-18
1楼  发表于: 2011-09-24 09:49
1) 你的编译器应该不是友善的

2) 建议下载最新版本的光盘

3) 你可以先试试烧光盘中的提供的内核, 确定没问题, 再烧你编译的
级别: 新手上路
UID: 55527
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2011-09-19
最后登录: 2011-11-17
2楼  发表于: 2011-09-24 11:32

 回 1楼(911gt3) 的帖子

你好,谢谢你的回复!

1、我的编译器是友善DVD光盘里面的,日期是2011年4月份的。它里面有两个ARM-GCC版本,分别是 4.4.3和4.3.2,都可以在ubuntu环境下编译通过。

2、我的光盘确实是才在友善www.arm9.net上个月8月份下载的。

3、我确实是先用他光盘里面自带的内核镜像下载运行,不行我才拆解了一部分。


。。。我现在开始怀疑,是不是硬件有问题了。。。
自由,自强,共享,共创。
级别: 论坛版主
UID: 12573
精华: 27
发帖: 8838
金钱: 46490 两
威望: 9298 点
综合积分: 18216 分
注册时间: 2010-01-09
最后登录: 2019-07-16
3楼  发表于: 2011-09-24 14:51
我们提供的u-boot仅支持64M Nand启动,你应该使用了其他的,就不清楚了,请使用光盘里的vboot试试
新手如何向我们反馈有效的信息,以便解决问题,见此贴:
http://www.arm9home.net/read.php?tid-14431.html

[注]: 此处签名链接仅为指引方向,而非解答问题本身.
自由,自强,共享,共创。
级别: 论坛版主
UID: 12573
精华: 27
发帖: 8838
金钱: 46490 两
威望: 9298 点
综合积分: 18216 分
注册时间: 2010-01-09
最后登录: 2019-07-16
4楼  发表于: 2011-09-24 14:52
另外,编译器要用4.4.3
新手如何向我们反馈有效的信息,以便解决问题,见此贴:
http://www.arm9home.net/read.php?tid-14431.html

[注]: 此处签名链接仅为指引方向,而非解答问题本身.
级别: 新手上路
UID: 55527
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2011-09-19
最后登录: 2011-11-17
5楼  发表于: 2011-09-24 17:02

 回 3楼(mindee) 的帖子

谢谢回复!
我的硬件配置是64M nandFlash, 64M sdram , 2M norFlash。
级别: 新手上路
UID: 55527
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2011-09-19
最后登录: 2011-11-17
6楼  发表于: 2011-09-24 17:18

 回 4楼(mindee) 的帖子

今天我又认真读了一遍友善《mini2440用户手册》bootloader相关部分,发现两点疑问:

1、第406页的红色字体“注意:本开发板的所有Linux 软件源代码均使用统一的编译器arm-linux-gcc-4.3.2,其安装和设置见第五章节。”

2、第408页的红色字体“注意:本开发板提供的 linux 内核并不能直接用于 u-boot,因为我们公司是不使用u-boot 的,并且对其各个参数设置并不了解,关于 U-Boot 的使用方法用户可以参考网上的资料。”

另外,我换一个网络“tekkamanninja ”作者移植的uboot-2010.03,也是上面的现象,linux依旧uncompressing linux .....就跑飞!

看来要继续,研究学习了!!
疯狂的嵌入式爱好者
级别: 论坛版主
UID: 40543
精华: 1
发帖: 169
金钱: 920 两
威望: 184 点
综合积分: 358 分
注册时间: 2011-03-19
最后登录: 2013-05-10
7楼  发表于: 2011-10-06 23:45
如果这个uImage在其他板子正常,在这个板子却出现这种情况,那么,你首先应该考虑一下内存是否出问题了,或者内存虚焊,在此之前升稼存之后遭遇过这种情况。u-boot有工具可以检查的。mteset命令,你试试。
别人转角遇见爱,我转角遇见猫T _T .
级别: 新手上路
UID: 40182
精华: 0
发帖: 38
金钱: 205 两
威望: 41 点
综合积分: 76 分
注册时间: 2011-03-16
最后登录: 2013-01-10
8楼  发表于: 2011-10-11 16:28
我曾经跟你一样,也遇到了相同的问题,把网上所有的资料都搜了个遍,也没解决。最后还是意外地解决了。
但我不知道自己曾经到底错在什么地方
建议:
1、用supervivi 格式化 nandflsh。有可能是 uboot、kernel、文件系统之中一个烧写时出现错误;
2、暂时不用uboot。而用友善光盘里的 vboot,做 bootloader,看看能不能启动。如果能,则可能是uboot的参数出现错误,将uboot的参数,按照vboot改
级别: 新手上路
UID: 55527
精华: 0
发帖: 10
金钱: 50 两
威望: 10 点
综合积分: 20 分
注册时间: 2011-09-19
最后登录: 2011-11-17
9楼  发表于: 2011-10-12 11:58
谢谢各位的回复,问题感觉是找到了。
我的U-BOOT把2440硬件环境初始化成405MHz,1:4:8分频。
按照手册的推荐值,直接把CPU频率从405降到304,然后1:3:6分频,linux就能正常启动了。。。
所以我觉得似乎是硬件的问题!