哈哈,uClinux-2.6.x终于在VDSP下跑起来了,除了高兴还是高兴!经过整整两个星期的挑灯夜战,总算可以舒舒服服地睡上一觉了,庆祝一下:
Linux version 2.6.19.3-ADI-2007R1.1-svn ([email protected]) (vdsp 4.5) #2 Tue Sep 25 11:24:43 CST 2007
Warning: limiting memory to 53MB due to hardware anomaly 05000263
Blackfin support (C) 2004-2007 Analog Devices, Inc.
Compiled for ADSP-BF561 Rev 0.3
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 594 MHz core clock and 99 Mhz System Clock
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
text = 0x00010000-0x00138843
init = 0x00138843-0x001a29a2
data = 0x001aa138-0x001aecbc
stack = 0x001ac000-0x001ae000
bss = 0x001aecbc-0x001aecbc
available = 0x001aecbc-0x03500000
rootfs = 0x03500000-0x03f00000
DMA Zone = 0x03f00000-0x04000000
Instruction Cache Enabled
Data Cache Enabled
Hardware Trace Enabled
Built 1 zonelists. Total pages: 13462
Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,57600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Physical pages: 3500
Memory available: 51968k/63831k RAM, (424k init code, 1186k kernel code, 0k data, 1024k dma)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin DATA_A SRAM: 16 KB
Blackfin DATA_B SRAM: 16 KB
Blackfin Instruction SRAM: 16 KB
Mount-cache hash table entries: 512
Blackfin DMA Controller
ezkit_init(): registering device resources
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 35) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
io scheduler anticipatory registered (default)
io scheduler cfq registered
io scheduler noop registered
uclinux[mtd]: RAM probe address=0x3500000 size=0xa00000
Creating 1 MTD partitions on "RAM":
0x00000000-0x00a00000 : "ROMfs"
uclinux[mtd]: set ROMfs:EXT2 to be root filesystem
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 420k freed (0x139000 - 0x1a1000)
dma_alloc_init: dma_page @ 0x0019c000 - 256 pages at 0x03f00000
hostname: not found
/dev/null: cannot create
/dev/null: cannot create
ifconfig: not found
inetd: not found
Welcome to:
____ _ _
/ __| ||_| _ _
_ _| | | | _ ____ _ _ / // /
| | | | | | || | _ /| | | | / /
| |_| | |__| || | | | | |_| | / /
| ___/____|_||_|_| |_|/____|/_//_/
|_|
For further information see:
http://www.uclinux.org/
http://blackfin.uclinux.org/
BusyBox v1.4.1 (2007-09-25 15:34:28 CST) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:~> pwd
/
root:~> ls
[1;34mbin[0m [1;34mhome[0m [1;34mmnt[0m [0;0msample.wav[0m [1;34mtmp[0m
[1;34mdev[0m [1;34mlib[0m [1;34mproc[0m [1;36msbin[0m [1;34musr[0m
[1;34metc[0m [1;34mlost+found[0m [1;34mroot[0m [1;34msys[0m [1;34mvar[0m
root:~> cd proc
root:/proc> ls
[1;34m1[0m [1;34m6[0m [0;0mdevices[0m [0;0miomem[0m [0;0mmeminfo[0m [0;0mstat[0m
[1;34m2[0m [1;34m7[0m [0;0mdiskstats[0m [0;0mioports[0m [0;0mmodules[0m [1;34msys[0m
[1;34m3[0m [1;34m8[0m [1;34mdriver[0m [0;0mkallsyms[0m [1;36mmounts[0m [1;34mtty[0m
[1;34m38[0m [0;0mbuddyinfo[0m [0;0mexecdomains[0m [0;0mkmsg[0m [0;0mmtd[0m [0;0muptime[0m
[1;34m4[0m [1;34mbus[0m [0;0mfilesystems[0m [0;0mloadavg[0m [1;34mnet[0m [0;0mversion[0m
[1;34m41[0m [0;0mcmdline[0m [1;34mfs[0m [0;0mlocks[0m [0;0mpartitions[0m [0;0mvmstat[0m
[1;34m5[0m [0;0mcpuinfo[0m [0;0minterrupts[0m [0;0mmaps[0m [1;36mself[0m [0;0mzoneinfo[0m
root:/proc> cat dmesg
Linux version 2.6.19.3-ADI-2007R1.1-svn ([email protected]) (vdsp 4.5) #2 Tue Sep 25 11:24:43 CST 2007
Warning: limiting memory to 53MB due to hardware anomaly 05000263
Blackfin support (C) 2004-2007 Analog Devices, Inc.
Compiled for ADSP-BF561 Rev 0.3
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 594 MHz core clock and 99 Mhz System Clock
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
text = 0x00010000-0x00138843
init = 0x00138843-0x001a29a2
data = 0x001aa138-0x001aecbc
stack = 0x001ac000-0x001ae000
bss = 0x001aecbc-0x001aecbc
available = 0x001aecbc-0x03500000
rootfs = 0x03500000-0x03f00000
DMA Zone = 0x03f00000-0x04000000
On node 0 totalpages: 13568
DMA zone: 106 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 13462 pages, LIFO batch:3
Normal zone: 0 pages used for memmap
Instruction Cache Enabled
Data Cache Enabled
Hardware Trace Enabled
Built 1 zonelists. Total pages: 13462
Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,57600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Physical pages: 3500
Memory available: 51968k/63831k RAM, (424k init code, 1186k kernel code, 0k data, 1024k dma)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin DATA_A SRAM: 16 KB
Blackfin DATA_B SRAM: 16 KB
Blackfin Instruction SRAM: 16 KB
Calibrating delay loop... 1179.64 BogoMIPS (lpj=2359296)
Mount-cache hash table entries: 512
Blackfin DMA Controller
ezkit_init(): registering device resources
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 35) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
io scheduler anticipatory registered (default)
io scheduler cfq registered
io scheduler noop registered
uclinux[mtd]: RAM probe address=0x3500000 size=0xa00000
Creating 1 MTD partitions on "RAM":
0x00000000-0x00a00000 : "ROMfs"
uclinux[mtd]: set ROMfs:EXT2 to be root filesystem
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 420k freed (0x139000 - 0x1a1000)
dma_alloc_init: dma_page @ 0x0019c000 - 256 pages at 0x03f00000
root:/proc>
好可爱的uClinux标志,不是吗?
当然,还有一些令人困惑的问题。
1、在加载/root时的代码(init/do_mounts.c)
#ifdef CONFIG_BLOCK
create_dev("/dev/root", ROOT_DEV);
mount_block_root("/dev/root", root_mountflags);
#endif
当系统运行到这里时,在VFS中居然没有建立/dev和/root两个目录,从而造成文件系统无法加载,造成上篇文章中提到的panic。所以我在其中加了两行语句建立这两个目录就一切OK了!
#ifdef CONFIG_BLOCK
sys_mkdir("/dev", 0700);
sys_mkdir("/root", 0700);
create_dev("/dev/root", ROOT_DEV);
mount_block_root("/dev/root", root_mountflags);
#endif
2、在编译mm下的文件时,居然不能打开inline,否则将无法运行,原因还不清楚。
睡一觉先!ZZZ......