Skyeye 中运行操作系统
建立编译环境 下载 3.4 的交叉编译器 –arm-linux-gcc tar.bz2arm-linux-gcc tar.bz2 配置环境 : 为了避免重起 shell 后,环境变量 变化,修改.bashrc 文件。 Vi.bashrc Export PATH=$PATH:…/3.4.1/bin 注:省略号为解压缩编译器的绝对路径 判断安装是否成功
建立编译环境
安装 skyeye skyeye-1.2.5_rc1.tar.bz2 解压缩 后,并安装./configure make sudo make install
安装 skyeye-testsuits 最新的 skyeye-testsuits ,版本为 –skyeye-testsuite tar.bz2skyeye-testsuite tar.bz2 – 解压缩
使用 skyeye 模拟某个板子运行某个 Linux 进入 linux/skyeye-testsuite /linux/s3c2410/cs8900a 注:也可以选择其他型号 输入系统的命令: skyeye -c skyeye.conf -e vmlinux 后,可看到如下的图:
使用 skyeye 模拟某个板子运行某个 Linux
在 Linux 的根文件系统中添加 hello 编写 hello 程序 : #include Void main() { Printf (“hello embedded!”); } 使用命令编译: arm-linux-gcc –static –o hello hello.c
在 Linux 的根文件系统中添加 hello 将 linux 的根文件系统映像 initrd.img 加载到某 个目录下,由于刚才模拟了 8900a ,则现在 把 8900a 根目录下面的 initrd.img 加载到我们 建立的目录下,建立如下目录: /]mkdir root 进入到 8900a 的目录,然后输入命令: sudo mount –o loop initrd.img /root 将 hello 拷贝到根文件系统中 sudo cp hello root/bin sudo umount root
在 Linux 的根文件系统中添加 hello 进入到 8900a 的目录,然后输入命令: skyeye -c skyeye.conf -e vmlinux cd bin./hello 可以看到输出结果: hello embedded!
uClinux 在 skyeye 中运行 进入用户主目录,修改安装文件,为其添 加可执行属性,然后执行之: chmod a+x arm-elf-tools sh./arm-elf-tools sh
uClinux 在 skyeye 中运行
arm-elf-gcc -Wl,-elf2flt -o hello hello.c
uClinux 在 skyeye 中运行 将 uclinux 解压缩 tar xjvf uClinux-dist tar.bz2 之后进入 cd uClinux-dist make menuconfig
uClinux 在 skyeye 中运行 在 make menuconfig 中, 选择 Vendor 为 GDB Product 为 ARMulator 内核版本要选 Linux-2.4.x
uClinux 在 skyeye 中运行 如果 make menuconfig 成功,那么接下来执 行关联编译 make dep 最后就是编译内核了: make
uClinux 在 skyeye 中运行
/usr/src/uClinux-dist/images/ 下是否有文件 romfs.img ,如果有,表示编译安装成功。 uClinux 在 skyeye 中运行
执行命令: skyeye -e linux-2.4.x/linux
uClinux 在 skyeye 中运行