wget https://sourcery.mentor.com/sgpp/lite/arm/portal/package8734/public/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
tar xjvf arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
cd linux-3.0.4
make ARCH=arm versatile_defconfig
make ARCH=arm menuconfig
General Setup —>Cross-compiler tool prefix
(We need to enter the path of the toolchain followed by ‘/bin/arm-none-eabi-’)
System Type —>
[*] Support ARM V6 processor
[*] ARM errata: Invalidation of the Instruction Cache operation can fail
Kernel Features —>
[*] Use ARM EABI to compile the kernel
[*] Allow old ABI binaries to run with this kernel
Bus Support —>
[*] PCI Support
Device Drivers —>SCSI Device Support —>
[*] SCSI Device Support
[*] SCSI Disk Support
[*] SCSI CDROM support
[*] SCSI low-lever drivers —>
[*] SYM53C8XX Version 2 SCSI support
Device Drivers —>Generic Driver Options—>
[*] Maintain a devtmpfs filesystem to mount at /dev
[*] Automount devtmpfs at /dev, after the kernel mounted the root
File systems —>Pseudo filesystems—>
[*] Virtual memory file system support (former shm fs)
用qemu-system-arm搭建arm11环境
以下方法将在ubuntu 10.04主机上,利用qemu-system-arm安装一个arm11的操作系统。系统采用nfs方式挂载文件系统,可以用来模拟arm11的运行环境,学习arm11汇编。
安装qemu-system-arm
编译arm11的内核
制作文件系统
配置NFS服务
配置网络
配置网络后,主机ubuntu和虚拟的arm11系统就在同一网段,以bridge方式连接.如果您的计算机是在路由器下面,配置网络完成之后,虚拟机arm11系统和ubuntu均能访问外网.添加以下内容:
根据自己的情况添加以下内容
设置主机名和密码
至此,初始化文件系统完成,可以直接关闭qemu窗口来关闭arm11系统。
修改为
每次开机后(ubuntu 10.04主机),均要运行net-setup脚本一次,然后可以直接执行qemu-start-arm脚本来启动arm11的linux系统;当然,你可以将net-setup脚本里的内容加到开机启动脚本里面。使用时,可以将C代码放在nfs服务目录下编译,直接在arm11系统下运行和调试。你甚至可以在arm11系统中更换更快的软件源,安装一些额外的软件,比如ssh,来方便使用。
参考资料