hi im tring to install phyton on mini im following the steps of this link: http://www.ailis.de/~k/archives/19-ARM-cross-compiling-howto.html i made the cross compile with out mistake (i only saw some warnings) at the end i did this: To install python type this: # make install prefix=<Root-directory>/usr \ HOSTPYTHON=./hostpython \ BLDSHARED="arm-linux-gcc -shared" \ CROSS_COMPILE=yes Notice that you have to specify /usr behind the path to the targets root-directory. You are done. You should now have a complete working cross-compiled Python suite. Copy it to your target machine and be happy MY DOUBT ITS what folder or files should i copy to the mini2440? and .. how exactly i know the python its working well on my mini? (i never have worked with python before). Thanks to every body
python on mini
hi i copied the all folder to the mini and after that i put on console ./python and appears me this: Python 2.2.1 (#1, May 24 2010) GCC 4.3.2 on linux2 Type help, copyright or license for more information. then should i assume that i made a good installation of phyton? (forgive my ignorance i never have use phyton before) it is ok good and i hope this can be useful for someone else :)
What size flash have you got in your machine? After cross-compilation I had somewhere around 64M, which was a bit large for my 64M machine. I understand one can strip out a lot to reduce size. Did you do that? If so, what did you remove?
my phyton folder size its 71Mb im luck because my mini board size its 128m however 71mb its to much for my mini2440 i want to reduce that size, but im not sure yet what i have to remueve. i would like that you tell me if you find the way to reduce it thanks!!
Did you find this tutorial: http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html I see at the bottom there are some suggestions for reducing size.
Hey David, can you put your python binary package on some repository so people here can download an run it? thanks
david, Following the link in my previous post. *** cd _install rm -rf include rm -rf share cd lib rm libpython2.6.a (wasn't present) cd lib/python2.6 rm -rf `find . -name test` rm `find . -name *.pyo` (didn't work, wrong syntax) rm `find . -name *.py` (didn't work, wrong syntax) rm *.pyo (worked for me) rm *.py (worked for me) cd ../../bin rm python2.6 *** Got _install down to 31.5M Now, the line ppc_6xx-strip python I couldn't find the equivalent for the arm9 Good luck, dave
davef i tried to do my compilation following your link but i couldnt able to do it how ever i tried to do my own compilation (the one what i put above) and now im having some trouble with the last step: # make install prefix=<Root-directory>/usr \ HOSTPYTHON=./hostpython \ BLDSHARED="arm-linux-gcc -shared" \ CROSS_COMPILE=yes its showing now this mistake: bash: Root-directory: No existe el fichero ó directorio i dont know what im doing now wrong, however the crosscompile file it working as worked the first one i did (so strange dont you think?) ./python and appears me this: Python 2.2.1 (#1, May 24 2010) GCC 4.3.2 on linux2 Type help, copyright or license for more information. both files when i type characters like ( on mini it throws doubles (( and when i type supr it shows me [[3 but when i type credits or copy right it showsme that and if i type print 'hello world' it shows me hello world i had never work with python so i dont know if this problem (supr) its normal or i did a wrong compile the size of my file its:40.7Mb dave your does you python has this problems? could you help me with this? Flavio i suggest you follow the instrution of my link or davef's link maybe you will not have my problems. and also suggest that the first who put this work well put this python binary package on some repository.
davef when i try to compile following your link i have problems in this part: CC=ppc_6xx-gcc CXX=ppc_6xx-g++ AR=ppc_6xx-ar RANLIB=ppc_6xx-ranlib ./configure --host=ppc-linux --build=i686-pc-linux-gnu --prefix=/python make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="ppc-linux-gcc -shared" CROSS_COMPILE=ppc_6xx- CROSS_COMPILE_TARGET=yes make install HOSTPYTHON=./hostpython BLDSHARED="ppc-linux-gcc -shared" CROSS_COMPILE=ppc_6xx- CROSS_COMPILE_TARGET=yes prefix=~/Python-2.6.5/_install im coping and pasting these lines and its showing me this: /Escritorio/Python-2.6.5$ CC=ppc_6xx-gcc CXX=ppc_6xx-g++ AR=ppc_6xx-ar RANLIB=ppc_6xx-ranlib ./configure --host=ppc-linux --build=i686-pc-linux-gnu --prefix=/python checking for --enable-universalsdk... no checking for --with-universal-archs... 32-bit checking MACHDEP... linux2 checking EXTRAPLATDIR... checking machine type as reported by uname -m... i686 checking for --without-gcc... no checking for ppc-linux-gcc... ppc_6xx-gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details.
david, "Size shouldnt be so important". Why spoil all the fun?! Correct me if I am wrong, but it looks like you are cross-compiling for a ppc rather than arm9. Here are the commands I used: ./configure --host=arm-linux --build=i686-pc-linux-gnu --prefix=/python --enable-shared --disable-ipv6 --disable-dynamic-extension CFLAGS="-march=armv4t -mtune=arm920t -Os -lpthread -lrt" LDFLAGS=${LDFLAGS} make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="arm-none-linux-gnueabi-gcc -shared" CROSS_COMPILE_TARGET=yes make install HOSTPYTHON=./hostpython BLDSHARED="arm-none-linux-gnueabi-gcc -shared" CROSS_COMPILE_TARGET=yes prefix=~/Python-2.6.4/_install *** Try these and let me know how you got on. Dave
ups david, sorry, i didnt read your message to me. Okay so its time to try to cross compile it right now.
flavio, It is untested so I think posting it would just waste people's time. For now, if you get a successful compilation following the aforementioned tutorial using my script mods you will be as far as I am. I need to do some study on 2D plotting capabilities in Python before going any further. OK? dave
Ok, i compiled python 2.6.5 and it works with a couple of built-in libs (os, sys and others). threading, time and some don't work, but if you want to see python running on your friendlyarm you can download this binary and test: http://dl.dropbox.com/u/6159957/Python-2.6.5-FriendlyARM.tar.gz
flavio, Excellent. I'll check it out tonight after work. Did you find a strip command for ARM9? Could you post the steps you took after the 3 commands I posted? Or did you use a different method? Regards, dave
flavio i checked your python and it has the smae problems as mine if i put "(" it appears doubles if i use delete appears = ? if i use supr [3
davef im having some troubles when i execute your second line: make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="arm-none-linux-gnueabi-gcc -shared" CROSS_COMPILE_TARGET=yes *** WARNING: renaming "ossaudiodev" since importing it failed: build/lib.linux-i686-2.6/ossaudiodev.so: cannot open shared object file: No such file or directory Failed to find the necessary bits to build these modules: _bsddb _hashlib _tkinter bsddb185 bz2 dbm gdbm readline sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _curses _curses_panel _sqlite3 _ssl what could i be doing wrong? thanks
david, Sorry, I can't really help with that. What host distro are you using? I did mine on Ubuntu 9.04. Dave
Davef im using ubuntu 9.1, maybe i have installed wrong my toolchain i only installed the arm-gcc compiler do i need to install some thing else on my pc??
The excuse what i installed was arm-linux-gcc-4.3.2 toolchain from this link: http://equallybad.blogspot.com/2010/02/project-how-to-setup-default-dev-... is it enought with that or do i need some thing else thanks!!
david, Just read through this again and was wondering if you had made any progress. In order to get Ubuntu to compile stuff you need: sudo apt-get install build-essential automake autoconf libtool Also, to be able to look at <menuconfig> when doing kernel work you need: ncurses-dev ? or ncurses something. I think those are the only extra things I had to drag it. Good luck
davef i formated my pc i made the process again but following your instrution i couldnt complet the cross compilation. the only way i could made it was following the instrution of the first link: http://www.ailis.de/~k/archives/19-ARM-cross-compiling-howto.html it compied with out mistakes but has the same problems than the other at the moment i typed delete or supr although if i type copyright it shows me all rights reserves .... ... ,.. can you upload you file? i want to check if it has the sames issues
david, Try this. Download-Link: http://rapidshare.com/files/397383730/Python.zip.html Now, the issue about stripping Python. Appears it is the normal strip command, but what the switches are used and what files you want to strip I haven't a clue. Good luck, Dave
I downloaded the python that Davef compiled and it seems to be working except for a few modules. I'm trying to install pySerial and the install bombs out with this error: error: Invalid python installation unable to open /usr/local/lib/python2.6/config/Makefile (no such file or directory) If I just copy pySerial into the folder then I get hung up on these modules when I do an import on serial: fcntl termios struct select time Thoughts?
Don't know if the "unable to open /usr/local/lib/python2.6/config/Makefile (No such file or directory)" problem has been solved, but what you need to do is install python26-devel. I got the same error and installing it fixed it.
Is there any new progress on Python to mini2440. I have been trying to compile Python-2.7.2 / Python-2.7.3 from this site http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html But with no luck. Any one that have working Python-2.7.* at all?