Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15531656
  • 博文数量: 2005
  • 博客积分: 11986
  • 博客等级: 上将
  • 技术积分: 22535
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-17 13:56
文章分类

全部博文(2005)

文章存档

2014年(2)

2013年(2)

2012年(16)

2011年(66)

2010年(368)

2009年(743)

2008年(491)

2007年(317)

分类: 嵌入式

2009-08-04 19:20:48

  交叉编译busybox-1.14.3为ep9312开发板运行的2.6.30.4内核提供shell工具
  如何使用qemu模拟器加载built-in进initramfs文件系统的2.6.30.4内核
  linux cpio initrd操作
  浅析如何在android上生成我们自己的ramdisk.img启动系统文件
  find . | cpio -o -H newc | gzip > ../ramdisk.cpio.gz可直接生成
  luther@gliethttp:/luther/linux-2.6.30.4$ ./scripts/gen_initramfs_list.sh -o initramfs.gz -u 0 -g 0 /vobs/crosscomplie_tootls/busybox-1.14.3/_install/
  将static静态编译的busybox经过make install生成的_install目录下的bin和sbin两个目录拷贝到/vobs/nfs下,
执行如下目录文件创建操作,这样nfs就可以初步运行起来了,嘿嘿[luther.gliethttp]

luther@gliethttp:/vobs/nfs$ cp -r /vobs/cross_tools_busybox/busybox-1.14.3/examples/bootfloppy/etc .
luther@gliethttp:/vobs/nfs$ rm etc/profile
luther@gliethttp:/vobs/nfs$ ls
bin  dev  etc  proc  sbin  sys
luther@gliethttp:/vobs/nfs$ tree dev etc proc sys
dev
`-- console
etc
|-- fstab
|-- init.d
|   `-- rcS
`-- inittab
proc
sys

1 directory, 4 files

luther@gliethttp:/vobs/nfs$ vim etc/fstab
proc        /proc    proc    defaults    0    0

luther@gliethttp:/vobs/nfs$ vim etc/inittab
::sysinit:/etc/init.d/rcS
::respawn:-/bin/sh
# tty2::askfirst:-/bin/sh
# ::ctrlaltdel:/bin/umount -a -r

luther@gliethttp:/vobs/nfs$ vim etc/init.d/rcS
#! /bin/sh
/bin/mount -a
/bin/mount -t sysfs sysfs /sys
# /bin/mount -t tmpfs tmpfs /tmp
/bin/mount -t tmpfs tmpfs /dev
# /bin/mknod /dev/console c 5 1
# /bin/mknod /dev/tty1 c 4 1
# /bin/mknod /dev/tty2 c 4 2
# /bin/mknod /dev/tty3 c 4 3
# /bin/mknod /dev/tty4 c 4 4
# /bin/mknod /dev/null c 1 3
# /bin/mknod /dev/ptmx c 5 2
/bin/mkdir /dev/pts
/bin/mount -t devpts devpts /dev/pts
/sbin/mdev -s # 自动动态创建开发板对应的/dev下设备
# /bin/mount -t proc proc /proc


好了reset开发板让redboot自动加载zImage并运行2.6.30.4内核[luther.gliethttp]

RedBoot> load -v -r -b 0x800000  zImage
Raw file loaded 0x00800000-0x009942a3, assumed entry at 0x00800000
RedBoot> exec -r 0x800000 -s 0x600000
Using base address 0x00800000 and length 0x001942a4
Uncompressing Linux..........................................................................................................
done, booting the kernel.
Linux version 2.6.30.4 (luther@gliethttp) (gcc version 3.4.1) #10 Tue Aug 4 19:10:43 CST 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: Cirrus Logic EDB9312 Evaluation Board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16192
Kernel command line: console=ttyAM0,115200 root=/dev/nfs nfsroot=192.168.1.101:/vobs/nfs ip=192.168.1.150:192.168.1.101:192.16
8.1.1:255.255.255.0
NR_IRQS:120
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)
Memory: 32MB 32MB = 64MB total
Memory: 61520KB available (3052K code, 203K data, 96K init, 0K highmem)
Calibrating delay loop... 99.73 BogoMIPS (lpj=498688)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 760 bytes
NET: Registered protocol family 16
ep93xx: PLL1 running at 400 MHz, PLL2 at 384 MHz
ep93xx: FCLK 200 MHz, HCLK 100 MHz, PCLK 50 MHz
M2P DMA subsystem initialized
bio: create slab at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 3, 40960 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND)
阅读(1301) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~