分类: 嵌入式
2009-11-25 20:24:28
$ sudo -s
# apt-get -y install libncurses5-dev
# exit
$ cd
$ scp
-r teacher@192.168.5.195:/opt/mirror/downloads/kernel ./
$ cd kernel
&& tar -xjf linux-2.6.28.tar.bz2
$ cd linux-2.6.28
$ make ARCH=arm
CROSS_COMPILE=arm-xscale-linux-gnu- mainstone_defconfig menuconfig; --以mainstone_defconfig为基础裁减内核
$ make ARCH=arm
CROSS_COMPILE=arm-xscale-linux-gnu-; --开始编译内核,时间较长。
编译后的内核zImage格式存放在目录arch/arm/boot/下,vmlinux格式在arch/arm/boot/compressed/下。如果编译成功那么在这两个目录下可以找到相应的内核文件。绝对路径是:
/home/cross_user/kernel/linux-2.6.28/arch/arm/boot和
/home/cross_user/kernel/linux-2.6.28/arch/arm/boot/compressed
三、制作根文件系统映像文件:
$ sudo -s
# apt-get build-dep busybox
# exit
$ cd && mkdir arm_root
$ wget
$ tar -xjf busybox-1.12.0.tar.bz2
$ cd busybox-1.12.0
$ make menuconfig;
----配置
Busybox Settings --->
Buid options
--->
[*] Build BusyBox as a static binary (no shared
libs)
(arm-xscale-linux-gnu-) Cross Compiler prefix
Installation Options --->
(../arm_root) BusyBox
installation prefix
$ make; ----编译
$ make install; -----安装到目录../arm_root/
构建根文件系统目录树
$ cd ../arm_root
$ mkdir -p etc/init.d dev proc tmp lib sys
$ cd dev
$ mknod console c 5 1
$ mknod null c 1 3
$ mknod zero c 1 5
$ cd ../
$ cat > etc/inittab <
::askfirst:/bin/sh
EOF
$ cat > etc/init.d/rcS <
mount -t proc proc /proc
mount -t sysfs sysfs /sys
ifconfig lo 127.0.0.1
ifconfig eth0 192.168.0.100
EOF
$ chmod +x etc/init.d/rcS
创建根文件系统映像文件
$ cd ~/arm_root
$ find . | cpio –o –H newc > ../initrd.cpio
$ cd ..
$ gzip -9 initrd.cpio
四、安装skyeye
# apt-get install skyeye
五、在skyeye中启动潜入式软件系统
# su - cross_user
$ mkdir SkyeyeTest
$ cd SkyeyeTest
$ cp /home/cross_user/initrd.cpio .
$ cp /home/cross_user/kernel/linux-2.6.28/arch/arm/boot/compressed/vmlinux .
$ vim skyeye.conf