|
环境:
liunx2.6.22.1
skyeye1.2.5
busybox1.11.1
initrd制作实际操作过程(参考网上的)
创建映像文件并挂到 initrd 目录
#mkdir initrd
#dd if=/dev/zero of=initrd.img bs=1k count=4096
#mke2fs -F -v initrd.img
#mount -o loop initrd.img initrd
将添加 busybox 到此映像文件
#cd initrd
#cp -r ../_install/* .
#创建必要的目录
#mkdir proc lib etc dev root home var tmp
#chmod 777 tmp
建立设备文件
#cd dev
#mknod -m 644 console c 5 1
#mknod -m 644 null c 1 3
#mknod -m 640 ram b 1 1
#mknod -m 644 mem c 1 1
#cd ..
创建脚本文件 etc/inittab, 内容如下:
::sysinit:/etc/init.d/rcS
::askfirst:-/bin/sh
::restart:/sbin/init
::ctrlaltdel:/sbin/reboot
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a
设置此脚本执行权限
#chmod 644 etc/inittab
创建脚本文件 etc/init.d/rcS, 内容如下:
#!/bin/sh
/bin/mount -t proc none /proc
/sbin/ifconfig lo 127.0.0.1 up
/sbin/ifconfig eth0 10.0.0.2 netmask 255.0.0.0 up
hostname skyeye
mkdir /var/tmp
mkdir /var/log
mkdir /var/run
mkdir /var/lock
/bin/ash
设置此脚本执行权限
#chmod 755 etc/init.d/rcS
最后一步,执行实际的写入操作,生成 initrd.img
cd ..
umount initrd
skyeye.conf的内容如下!
cpu: arm920t
mach: s3c2410x(我的实际开发板是S3C2410A)
# physical memory
mem_bank: map=M, type=RW, addr=0xc0000000, size=0x00800000
mem_bank: map=M, type=RW, addr=0xc0800000, size=0x00800000, file=./initrd.img
mem_bank: map=M, type=RW, addr=0xc1000000, size=0x01000000
# all peripherals I/O mapping area
mem_bank: map=I, type=RW, addr=0x48000000, size=0x20000000
mem_bank: map=I, type=RW, addr=0x19000300, size=0x00000020
net: type=cs8900a, base=0x19000300, size=0x20,int=9, mac=0:4:3:2:1:f, ethmod=tuntap, hostip=10.0.0.1
lcd: type=s3c2410x, mod=gtk
#dbct:state=on
使用skyeye -c skyeye.conf -e vmlinux运行后出现如下错误!
Your elf file is little endian.
arch: arm
cpu info: armv4, arm920t, 41009200, ff00fff0, 2
mach info: name s3c2410x, mach_init addr 0x806bbf0
ethmod num=1, mac addr=0:4:3:2:1:f, hostip=10.0.0.1
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm920t mmu ops
Loaded RAM ./initrd.img
exec file "vmlinux"'s format is elf32-little.
not load section .comment: addr = 0x00000000 size = 0x00002a30 .
call ARMul_InitSymTable,kernel filename is vmlinux.
SKYEYE:Error in mem_read_word, no bank found, NumInstrs 0, mem_read_word addr = 0 no bank
------------------(下面出现的都是上面这一行然后是不停地刷屏)------------------------- |
|