说问题之前我先吧自己的一些配置信息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。