【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

背景:

远程服务器Ubuntu生成软盘镜像,通过Mac下wmware运行.

1- 环境及版本:

uname -a

2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux

VMware Fusion  5.0.3 (1040386) // for mac

2- 下载:

wget --passive-ftp ftp://ecos.sourceware.org/pub/ecos/ecos-install.tcl

3- 安装:

sh ecos-install.tcl

eCos installer v2.0.1 starting...
Written and maintained by Jonathan Larmour <jifl@eCosCentric.com>

Retrieving installer metadata information...
**************************************************
---------------------------------------------------------
Available distribution sites:

[1] ftp://mirrors.kernel.org/sources.redhat.com/ecos
[2] http://mirrors.kernel.org/sources.redhat.com/ecos
[3] ftp://mirror.aarnet.edu.au/pub/sourceware/ecos
[4] http://mirror.aarnet.edu.au/pub/sourceware/ecos
[5] ftp://ftp.mirrorservice.org/sites/sources.redhat.com/pub/ecos
[6] http://www.mirrorservice.org/sites/sources.redhat.com/pub/ecos
[7] ftp://gd.tuwien.ac.at/opsys/ecos
[8] http://gd.tuwien.ac.at/opsys/ecos
[9] ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/ecos
[10] ftp://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos
[11] http://ftp.gwdg.de/pub/misc/sources.redhat.com/ecos
[12] ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/sources.redhat.com/ecos
[13] http://ftp-stud.fht-esslingen.de/pub/Mirrors/sources.redhat.com/ecos
[14] ftp://bo.mirror.garr.it/mirrors/sourceware.org/ecos
[15] http://bo.mirror.garr.it/mirrors/sourceware.org/ecos
[16] ftp://ftp.u-aizu.ac.jp/pub/gnu/cygnus/ecos
[17] ftp://ftp.chg.ru/pub/sourceware/ecos
[18] ftp://ftp.sun.ac.za/pub/mirrorsites/sourceware.org/pub/ecos
[19] http://ftp.sun.ac.za/ftp/pub/mirrorsites/sourceware.org/pub/ecos
[20] ftp://ftp.twaren.net/Unix/Sourceware/ecos
[21] http://ftp.twaren.net/Unix/Sourceware/ecos
[22] ftp://mirror.facebook.com/sourceware/ecos
[23] http://mirror.facebook.com/sourceware/ecos
[24] http://sources-redhat.mirrors.airband.net/ecos
[25] ftp://ecos.sourceware.org/pub/ecos

Please select a distribution site: 25    //速度还不错

---------------------------------------------------------

Please select a directory for installation
[Default /home/shelley/ecos]: /home/shelley/ecos_3
---------------------------------------------------------

Available prebuilt GNU tools:

[1] arm-eabi
[2] arm-elf (old)
[3] i386-elf
[4] m68k-elf
[5] mipsisa32-elf
[6] powerpc-eabi
[7] sh-elf
[q] Finish selecting GNU tools

("*" indicates tools already selected)

Please select GNU tools to download and install: 3  //与CPU架构有关,看参考资料图.
[1] arm-eabi
[2] arm-elf (old)
[*] i386-elf
[4] m68k-elf
[5] mipsisa32-elf
[6] powerpc-eabi
[7] sh-elf
[q] Finish selecting GNU tools

("*" indicates tools already selected)

Please select GNU tools to download and install: q

Entering /home/shelley/ecos_3
Retrieving GNU tools for i386-elf
**************************************************
Retrieving eCos version 3.0
**************************************************
Downloads complete.
If you wish to disconnect from the internet you may do so now.
Unpacking ecoscentric-gnutools-i386-elf-20081107-sw.i386linux.tar.bz2...
Unpacking ecos-3.0.i386linux.tar.bz2...
Generating /home/shelley/ecos_3/ecosenv.sh
Generating /home/shelley/ecos_3/ecosenv.csh
---------------------------------------------------------
In future, to establish the correct environment for eCos,
run one of the following commands:
. /home/shelley/ecos_3/ecosenv.sh (for sh/bash users); or
source /home/shelley/ecos_3/ecosenv.csh (for csh/tcsh users)

It is recommended you append these commands to the end of your
shell startup files such as $HOME/.profile or $HOME/.login
---------------------------------------------------------
Installation complete!

4- 编译

ecos_3>ls -lrt

//下载的文件包含

ecos-3.0  //ecos源码

gnutools  //交叉编译工具i386-elf

ecosenv.sh  //export环境变量 for sh/bash users

ecosenv.csh  // export环境变量 for csh/tcsh users

//当前目录创建执行脚本:

vi redboot.env
export PRJ_PATH=/home/shelley/ecos_3
export ECOS_REPOSITORY=$PRJ_PATH/ecos-3.0/packages/
export PATH=$PATH:$PRJ_PATH/gnutools/i386-elf/bin/:$PRJ_PATH/ecos-3.0/tools/bin rm build -rf
mkdir build
cd build
ecosconfig new pc redboot
ecosconfig import ${PRJ_PATH}/ecos-3.0/packages/hal/i386/pc/v3_0/misc/redboot_FLOPPY.ecm
ecosconfig tree

//给文件redboot.env赋权

chmod  redboot.env

//执行文件

source redboot.env

U CYGSEM_HAL_USE_ROM_MONITOR, new inferred value 0
U CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK, new inferred value 0
U CYGHWR_HAL_I386_FPU_SWITCH_LAZY, new inferred value 0

可能出错情况:

ecosconfig: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

直接下载,复制到/usr/lib目录。chmod +x libstdc++.so.5.0.7

http://download.csdn.net/download/zblue78/205090#

sudo ln -s libstdc++.so.5.0. libstdc++.so.

//编译

~/ecos_3/build>make

//编译成功后

cd ~/ecos_3/build/install/bin$

redboot.elf

redboot.bin

//生成镜像

./dd conv=sync if=redboot.bin of=redboot.flp bs=1440k

0+1 records in

1+0 records out

1474560 bytes transferred in 0.001818 secs (811115135 bytes/sec)

//导入虚拟机

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

如果提示"宾客机操作系统已停用CPU"

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

dd conv=sync if=redboot.bin of=redboot.flp bs=800k

表示bs的值太小

如果提示"无法连接虚拟设备ied0:0,因为宿主机上没有相关的设备"一定将硬盘和光驱删除,否则会提示错误.原因未知.

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置


参考资料:

http://ecos.sourceware.org/getstart.html

http://www.blogbus.com/redboot-logs/19114095.html

【ecos学习1】wmware运行redboot[方法一]--脚本实现配置

read-only access to git repository:

git clone https://github.com/galoishelley/vmware-ecos
上一篇:[转]Java调用Javascript、Python算法总结


下一篇:NFS实践练习