您的位置:首页 > 运维架构 > Linux

在VDSP中编译uclinux(7):令人困惑的成功

2007-11-30 15:57 627 查看
哈哈,uClinux-2.6.x终于在VDSP下跑起来了,除了高兴还是高兴!经过整整两个星期的挑灯夜战,总算可以舒舒服服地睡上一觉了,庆祝一下:

Linux version 2.6.19.3-ADI-2007R1.1-svn (wmz@gtw.com) (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
bin home mnt sample.wav tmp
dev lib proc sbin usr
etc lost+found root sys var
root:~> cd proc
root:/proc> ls
1 6 devices iomem meminfo stat
2 7 diskstats ioports modules sys
3 8 driver kallsyms mounts tty
38 buddyinfo execdomains kmsg mtd uptime
4 bus filesystems loadavg net version
41 cmdline fs locks partitions vmstat
5 cpuinfo interrupts maps self zoneinfo
root:/proc> cat     dmesg
Linux version 2.6.19.3-ADI-2007R1.1-svn (wmz@gtw.com) (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......
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: