If you want to just use Python for UltraSAM, it is here.
Note: Theoretically, other Linux distribution should also work. In this document, Ubuntu 12.04 64 bit Edition is used.
Add save the following and exit
[bash]PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/arm-2012.03/bin"[/bash]It should print out the version number. Now the cross compiler is working.
make python Parser/pgen
mv python hostpython
mv Parser/pgen Parser/hostpgen
make distclean
patch -p1 < Python>
CC=arm-none-linux-gnueabi-gcc CXX=arm-none-linux-gnueabi-g++ AR=arm-none-linux-gnueabi-ar RANLIB=arm-none-linux-gnueabi-ranlib ./configure –host=arm-linux-gnueabi –build=x86_64-linux-gnu –prefix=/python
make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="arm-none-linux-gnueabi-gcc -shared" CROSS_COMPILE=arm-none-linux-gnueabi- CROSS_COMPILE_TARGET=yes HOSTARCH=arm-linux BUILDARCH=x86_64-linux-gnu
make install HOSTPYTHON=./hostpython BLDSHARED=" arm-none-linux-gnueabi-gcc -shared" CROSS_COMPILE=arm-none-linux-gnueabi- CROSS_COMPILE_TARGET=yes prefix=~/Python/ARM_Python/Python-2.7.3/_install
arm-none-linux-gnueabi-strip –strip-unneeded ~/Python/ARM_Python/Python-2.7.3/_install/bin/python2.7
[/bash]
[bash]file ~/Python/ARM_Python/Python-2.7.3/_install/bin/python2.7[/bash]
It should reports something like below:
[bash]python2.7: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped[/bash]
Congratulations! You just cross compiled Python for UltraSAM.
The ARM executable Python is located at ~/Python/ARM_Python/Python-2.7.3/_install/