Howto: Ubuntu下的AMSS编译环境配置

http://www.linuxidc.com/Linux/2011-02/32436.htm

这是哥的内部文档,仅供大家参考!   
/**********************************************************************************************************************/  
gedit ~/.bashrc   
添加以下内容:   
#for_arm_9_build   
export ARMROOT=~/ARM   
export ARMINCLUDE=$ARMROOT/RVCT/Data/2.2/349/include/windows   
export ARMTOOLS=RVCT221   
export ARMLIB=$ARMROOT/RVCT/Data/2.2/349/lib   
export ARMINC=$ARMINCLUDE   
export ARMBIN=$ARMROOT/RVCT/Programs/2.2/349/win_32-pentium   
export PATH=$PYTHON_PATH:$ARMBIN:$PATH   
export ARMHOME=$ARMROOT   
export LM_LICENSE_FILE=$ARMROOT/crack/license.dat   
#for_arm_9_build_end   
然后保存并重新启动机器   
/**********************************************************************************************************************/  
复制ARM文件夹到你的主目录   
然后   
chmod +x ~/ARM/RVCT/Programs/2.2/349/win_32-pentium/*  
/**********************************************************************************************************************/  
编译:   
cd AMSS/products/76XX/build/ms   
因为复制过程中以下文件的属性被改了。所以纠正一下   
chmod +x `find . -name "*.pl" -o -name "*.exe" -o -name "*.cmd"`   
AMSS/products/76XX/build/ms$ ./TFNCKNLYM.cmd   
如果出现以下错误:   
Error: C3397E: Cannot obtain license for Compiler (feature compiler) with license version >= 2.2:    
cd到Crack目录下,执行:wine keygen.exe   生成一个新的license替换原有的即可!   
如果编译后期出现以下错误:   
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————   
Error: L6630E: Invalid token start expected number or ( but found A at position 15 on line 11535   
Error: L6629E: Unmatched parentheses expecting ) but found A at position 15 on line 11535   
M76XXTTFNCKNLYM____.scl(line 11535, col 15) Error: L6268E: Non-word aligned address 4294967295 specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 15) Error: L6292E: Ignoring unknown attribute 'An' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 18) Error: L6292E: Ignoring unknown attribute 'error' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 24) Error: L6292E: Ignoring unknown attribute 'occurred:' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 34) Error: L6292E: Ignoring unknown attribute 'Bad' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 38) Error: L6292E: Ignoring unknown attribute 'magic' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 44) Error: L6292E: Ignoring unknown attribute 'number' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 51) Error: L6292E: Ignoring unknown attribute 'in' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 54) Error: L6292E: Ignoring unknown attribute '/home/cpp/i700t_arm9/i700t_arm9/AMSS/platform/l4/tools/pyelf/weaver/__init__' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 131) Error: L6292E: Ignoring unknown attribute '.' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 133) Error: L6292E: Ignoring unknown attribute 'pyc' specified for region MSM_NOTPAGED.   
M76XXTTFNCKNLYM____.scl(line 11535, col 136) Error: L6228E: Expected '{', found ')...'.   
Not enough information to produce a SYMDEFs file.   
Not enough information to list image symbols.   
Not enough information to list the image map.   
Finished: 3 information, 27 warning and 14 error messages.   
make: *** [link_only] 错误 1   
cpp@cpp:~/i700t_arm9/i700t_arm9/AMSS/products/76XX/build/ms$    
cpp@cpp:~/i700t_arm9/i700t_arm9/AMSS/products/76XX/build/ms$    
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————   
/**********************************************************************************************************************/  
则需要安装Python-2.4.3,下载到源码后执行   
1.  ./configure   
2.  make   
    如果在make过程出错:   
    ____________________________________________________________________________________________________________________   
            *** buffer overflow detected ***: ./python terminated   
        ======= Backtrace: =========   
        /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x50)[0x40275390]   
        /lib/tls/i686/cmov/libc.so.6(+0xe12ca)[0x402742ca]   
        /lib/tls/i686/cmov/libc.so.6(+0xe19e8)[0x402749e8]   
        ./python(PySys_SetArgv+0x279)[0x80e6e19]   
        ./python(Py_Main+0x4d8)[0x8057298]   
        ./python(main+0x1b)[0x8056c9b]   
        /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x401a9bd6]   
        ./python[0x8056be1]   
        ======= Memory map: ========   
        08048000-08125000 r-xp 00000000 08:09 4202539    /home/cpp/Downloads/Python-2.4.3/python   
        08125000-08126000 r--p 000dc000 08:09 4202539    /home/cpp/Downloads/Python-2.4.3/python   
    ____________________________________________________________________________________________________________________   
    按照以下操作处理:   
        a.  make distclean   
        b.  ./configure BASECFLAGS=-U_FORTIFY_SOURCE   
        c.  make   
3.  sudo make install   
/**********************************************************************************************************************/  
完了后就可以编译AMSS了,而且很成功,可是后来却发现repo不能用了,提示错误是:   
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————   
cpp@cpp:~$ repo   
Traceback (most recent call last):   
  File "/home/cpp/bin/repo", line 91, in ?   
    import readline   
ImportError: No module named readline   
cpp@cpp:~$    
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————   
系统里明明有readline,可是repo脚本却无法导入,后来查到应该是python安装导致的错误,应该在python编译时加上关于readline的编译选项,应该按照如下操作安装python   
首先安装readline软件包:   
sudo apt-get install libreadline5-dev   
sudo apt-get install zlib1g-dev   
然后:   
1.  make distclean   
2.  ./configure  --enable-readline  BASECFLAGS=-U_FORTIFY_SOURCE   
3.  make -j4   
4.  sudo make install   
注意,我同时发现在python-2.4.3版本是支持该编译选项的,而在3.1.3版本中是不能识别这个--enable-readline编译参数的。所以我目前使用2.4.3版本。   
总结一下:这狗日的pythom脚本我还没时间学习一下呢,妈的这两天忙的像狗一样!我想老板应该给我涨涨工资了,干的是工程师的活,妈的比工程师还忙,却拿着实习生的工资,哥说句实话,哥真的一点也没感觉到周围的工程师比哥强多少,老板也不主动一点,这样是不对的!哥是不太满意的……   
以下是网上另一个关于readline的解决方案,我没有试过,   
________________________________________________________________________________________________________________________   
http://www.velocityreviews.com/forums/t361627-realine-not-found-error.html   
In fact, more for my own records in case I get this again. I had the same problem with SUSE10.2. I had installed Python2.5 using YAST along with Numpy, Scipy, IPython and some other packages. I'd also attempted to install these packages without YAST (probably causing the error in the first place).    
Turns out, all these packages were being installed to '/usr/lib/python2.5/site-packages'.   
Inspection of the path Python was using via   
>>> import sys   
>>> sys.path   
showed python was using /usr/local/lib/python2.5/site-packages   
The path was modified by editing the 'site.py' file, to include the following in the main() routine, just below the 'abs__file__()' line.   
  
# Add new paths to the python search path, derived   
# from those in sys.path. Current entries contain    
# '\local\'. They should not. Added 29/June/07, MS   
a = sys.path   
for i in a:   
if '/local/' in i:   
sys.path.append(i.replace('/local',''))   
This updates the path with entries not including the '/local' entry. This fixed my Scipy and my readline error on startup.   
Mark.  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值