Cross-compiling Python for MIPS and ARM Platforms

Python programming language is used in several open source projects such as Sugar OS and Xibo. Let’s see if we can cross-compile it in Ubuntu 10.10 using a mips compiler.

I’ll use the instructions given at http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html.

Let’s download Python 2.7.1 first and extract the source code:


Then run the following command in Python-2.7.1 in order to build some tools for the host:


There is no patch for Python 2.7.1 cross-compilation in the link above, so let’s just try to configure and build it:


If we don’t use a patch the first error is:


So I used some older patch to create a new patch: http://www.cnx-software.com/patch/python-2.7.1-cross-compile.patch. You can download it an apply it as follows:


And repeat the step above to configure and cross-compile Python for mips.

Finally install Python in ~/Python-2.7.1/install for example:


After that copy all necessary files in ~/Python-2.7.1/install to your target board and run the python test:

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
23 Comments
oldest
newest
Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications