1.下载eMBosLab发布的eCos源代码
git clone git://emboslab.git.sourceforge.net/gitroot/emboslab/rtems-4.9.5-emboslab /opt/ecos/ecos-hg
” /opt/ecos/ecos-hg” 表示你需要放置的目录,请自行设置
2.下载eCos最新ARM编译器点击 arm-eabi 得到 arm eabi的编译器,解压到 /opt/ecos/gnutools/arm-eabi/
“/opt/ecos/gnutools/arm-eabi/” 可以根据你的需要而更改
3.配置环境变量将以下两句加到你Ubuntu的~/.profile的最下面
(如果是Fedora请加到~/.bashrc中)
解释一下:第一行表示把编译器加到系统的PATH中,第二行为ecos的配置工具提供ecos的安装位置
export PATH=$PATH:/opt/ecos/gnutools/arm-eabi/bin
export ECOS_REPOSITORY=/opt/ecos/ecos-hg/packages
4.安装ecos到Linuxmkdir temp
cd temp
/opt/ecos/ecos-hg/configure
make
sudo make install
这样系统中就有了ecosconfig的命令行配置工具和synthetic api模拟工具了。
3.编译eCos图形配置工具1)下载 wxGTK-2.8.8.tar.bz2
2)编译wxGTK
解压:
mkdir ~/src
cd ~/src
bunzip2 -c wxGTK-2.8.8.tar.bz2 | tar xf –
cd wxGTK-2.8.8
配置wxGTK:
mkdir ~/wx-buildcd ~/wx-build$HOME/src/wxGTK-2.8.8/configure –disable-shared \ –disable-sockets –prefix=$HOME/wxGTK-2.8.8makemake install
3)编译配置ecos的host工具库给图形配置工具用:
mkdir ~/infra-buildcd ~/infra-build/ecos/ecos-hg/host/configure –prefix=$HOME/ecos-toolsmakemake install
4)编译图形配置工具:
mkdir ~/configtool-buildcd ~/configtool-buildmake -f /opt/ecos/ecos-hg/host/tools/configtool/standalone/wxwin/makefile.gnu \ install WXDIR=$HOME/wxGTK-2.8.8 ECOSSRCDIR=/opt/ecos/ecos-hg/host \ INSTALLDIR=$HOME/ecos-tools
这样就可以在ecos-tools目录得到configtool工具了
4.下载并编译 eMBosLab发布的MINI2440 QEMU软件模拟器git clone git://emboslab.git.sourceforge.net/gitroot/emboslab/qemu-mini2440
下载以后会有qemu-mini2440的目录,还需要切换到ecos-emboslab这个分支
git checkout -b ecos-emboslab remotes/origin/ecos-emboslab
./configure –target-list=arm-softmmu
make
然后就可以在arm-softmmu的目录中得到一个qemu-system-arm的可执行文件,我们需要的模拟器就是他。
不需要安装copy出来就可以。
5.编译redboot来测试qemu编译redboot for mini2440
mkdir mini2440_redboot
cd mini2440_redboot
命令行配置方法 :
ecosconfig new mini2440 redboot
ecosconfig tree
make
图形界面配置方法:
仿真redboot
qemu-system-arm -M mini2440 -kernel install/bin/redboot.elf -serial stdio -show-cursor
应该能看操作终端和LCD的redboot画面了,,目前的输入只能通过终端完成
S3C: CLK=240 HCLK=240 PCLK=240 UCLK=57QEMU: ee24c08_initDM9000: INIT QEMU MAC : 52:54:00:12:34:56QEMU mini2440_reset: loaded kernel install/bin/redboot.elf at 0x30000000S3C: CLK=240 HCLK=60 PCLK=30 UCLK=57S3C: CLK=400 HCLK=100 PCLK=50 UCLK=57S3C: CLK=400 HCLK=100 PCLK=50 UCLK=48+RedBoot(tm) bootstrap and debug environment [QEMU]Non-certified release, version UNKNOWN – built 21:51:48, May 20 2011Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009Free Software Foundation, Inc.RedBoot is free software, covered by the eCos license, derived from theGNU General Public License. You are welcome to change it and/or distributecopies of it under certain conditions. Under the license terms, RedBoot’ssource code and full license terms must have been made available to you.Redboot comes with ABSOLUTELY NO WARRANTY.Platform: MINI2440 system (ARM9) RAM: 0x00000000-0x03600000 [0x00025e10-0x03600000 available]RedBoot>
见过旅行风景,就这样,慢慢学会了长大。