I am using an evaluation board with an ARM926EJ-S running Openembedded and I want to install python on it.
I successfully cross-compiled python 2.7.13 on my Fedora 25 with the linaro toolchain (releases.linaro.org/components/toolchain/binaries/6.2-2016.11/) like this :
CONFIG_SITE=config.site ./configure --build=x86_64-linux-gnu --host=arm-linux-gnueabihf --disable-ipv6 --enable-unicode=ucs4
I had to do a config.site because during the compilation it asked me to precise :
ac_cv_file__dev_ptmx=no/yes
ac_cv_file__dev_ptc=no/yes
And I put "no" to both of them like this guy did : datko.net/2013/05/10/cross-compiling-python-3-3-1-for-beaglebone-arm-angstrom/
Then I test to add :
--host=arm-elf-linux
Because it worked for another lib (pjsip), but unfortunately it didn't worked so I found this solution :
--host=arm-unknown-linux-gnueabihf
Here : github.com/jedisct1/libsodium/issues/274
And this was for an error during the configuration asking me to do so :
--desable-ipv6
Then the configuration went well, so the make.
To do the make install, because I had to install it on my board, I did :
make install DESTDIR=root@IP_ADRESS
This worked too, python is installed in root@IP_ADRESS/usr/local/lib/python2.7.
But I can't find it in my board, nor launch the python shell.
So I try this :
export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib"
Like answered here : stackoverflow.com/questions/4743233/is-usr-local-lib-searched-for-shared-libraries
This doesn't change anything, and I figure out that /usr/local/lib does not exist… And I found that my pjsip lib is not installed too…
Do you know where my libs went ? And how I can use them ?
Thank you !
EDIT :
Found the solution, in fact when you do :
make install DESTDIR=root@IP_ADRESS
It is not going to install it to root@IP_ADRESS, but it is creating a folder named "root@IP_ADRESS"…
So I tar.bz2 all the files contained in this folder, send them with scp on my board and copy all the folders and files in the /usr/ of my board.
But python is not working, when I try to launch it:
~# python
-sh: /usr/bin/python: cannot execute binary file
Is it because during the config part, the –host is not the good one?
Best Answer
I found the solution. The board I use is the TMDSLCDK138 integrating an OMAPL138 (ARM926EJ-S + DSP).
For those trying to cross-compile Pyhton 2.7 for this board running the Arago SDK here is the way ! I am working on Ubuntu 16.04.
First install the Arago toolchain :
NOT THIS ONE : http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/index_FDS.html (Because it is DEPRECATED !!)
But the one in the mcsdk_1_01_00_02_setuplinux.bin !
I install it in /opt/ti/
Then :
It is going to ask you where you want to install it, I kept /usr/local/arago.2013-05/
Now :
Normally your shell is going to "transform" and your command lines are performing with :
Ok, here you have finished installing the GOOD Arago toolchain.
Now cross-compiling and installing Python :
I did all the others commands in this linux-devkit shell.
Now create a file named config.site (because if you don't you get an error asking you to do so) :
Add those two lines in this file :
Now you can do the ./configure like so :
Now you just have to compress your MY_BOARD_python folder, scp it to your board with :
Now on your board :
And now if you type Python :
Hop this is going to help !