呵呵,初步结果如下:

为了避免上面出现的情况,在int cleanup_before_linux (void)函数中,添加以下代码:

T1CR = 0x0;

T1LCR = 0x0;

达到复位Timer0的目的,果然再次用bootm命令引导Linux的时候没有再出现这么多的waiting...。

PS:Linux镜像是在使用bootm命令之前通过ICE下载到0x30007fc0地址的,将来可以烧写到Flash中,由程序搬运到将位置。由于Norflash只有2M,不能完整地放下UBOOT、Linux内核及文件系统,下面的重点可能是NandFlash的驱动...

U-Boot 1.1.4 (Aug  2 2008 - 11:03:41)

U-Boot code: 30700000 -> 30717F2C  BSS: -> 3071C320

IRQ Stack: 306deb74

FIQ Stack: 306dfb74

RAM Configuration:

Bank #0: 30000000  8 MB

Flash:  2 MB

*** Warning - bad CRC, using default environment

In:    serial

Out:   serial

Err:   serial

Hit any key to stop autoboot:  5 4 3 2 1 0

SEP4020=>bootm

## Booting image at 30007fc0 ...

Image Name:   Kernel 2.4.18

Created:      2008-08-01  13:40:42 UTC

Image Type:   ARM Linux Kernel Image (uncompressed)

Data Size:    1164515 Bytes =  1.1 MB

Load Address: 30007fc0

Entry Point:  30008000

Verifying Checksum ... OK

XIP Kernel Image ... OK

Starting kernel ...

booting linux from 0x30008000Linux version 2.4.18-rmk7 (root@localhost.localdomain) (gcc version 2.95.3 20010315 (release)) #28 Thu Apr 24 11:15:47 CST 2008

CPU: ARM ARM720T revision 2

Machine: SEP3221 BASED

Kernel command line: root=/dev/ram0 console=tty0 console=ttyS0,9600 init=/linuxrc

Console: colour dummy device 80x30

Calibrating delay loop... waiting...waiting...waiting...waiting...waiting...26.16 BogoMIPS

Memory: 8MB = 8MB total

Memory: 4672KB available (1008K code, 224K data, 68K init)

POSIX conformance testing by UNIFIX

ttyS00 at 0xe0005000 (irq = 24) is a 16450

NET4

RAMDISK: Couldn't find valid RAM disk image starting at 0.

Freeing initrd memory: 2048K

Kernel panic: VFS: Unable to mount root fs on 01:00

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐