按照下面的方法,可以成功将python2.5 build到 ARM /linux , 我已经成功了:

Download latest from www.python.org Save into /home/user/python/

cd /home/user/python/

Extract python-.tar.gz:

tar zxf python-2.5.tar.gz

mkdir target

cd Python-2.5/

./configure --target=arm-linux --prefix=/home/user/python/target

Edit the Makefile:

CC = /usr/local/arm-linux/bin/arm-linux-gcc -lpthread

CXX = /usr/local/arm-linux/bin/arm-linux-g -lpthread

Compile Python:

make

make install

Copy /home/user/python/target to Greenphone on /mnt/user_local/ using the SMB protocol via Konqueror.

smb://10.10.10.20

and

/home/user/python/target

Telnet to the Greenphone:

telnet 10.10.10.20

cd /mnt/user_local/

mv target python

cd python/bin/

PYTHONPATH=/mnt/user_local/python/lib/python2.5 ./python2.5 -Wi -tt /mnt/user_local/python/lib/python2.5/compileall.py -d /mnt/user_local/python/lib/python2.5 -f -x 'bad_coding|badsyntax|site-packages' /mnt/user_local/python/lib/python2.5

Make a symlink from /usr/lib/python to /mnt/user_local/python/lib/python2.5/

cd /usr/lib

ln -s /mnt/user_local/python/lib/python2.5/ python

Edit /etc/profile to get proper paths for python

vi /etc/profile

Insert the following in the /etc/profile

export PYTHONPATH=/usr/lib/python/

export PYTHONHOME=/usr/lib/python/

Log out or restart your shell, so it updates its env variables. Enjoy python ;)

As Michael Lauer describes here: http://www.vanille-media.de/site/index.php/projects/python-for-arm-linux/ Python does not build on a system with a different arch than the target system. This is because Python uses the created executables for the build process. The settings above helped me alot but I did two more things to succeed:

After the first error with the first make run I renamed the executables python to python.arm and Parser/pgen to Parser/pgen.arm. Then I issued the command make again. After make install I moved the python.arm executable to the right place in the target directory.

make install checks if the shared libraries are loadable and renames them to something_failed.so. Because all those shared libs won't load (because they are arm-executables) all the native libs are renamed. I used a tool to rename all those files in lib/python2.5/lib-dynload back to their normal name:

mmv -v '*_failed.so' '#1.so'

Because lack of space on the target I removed everything which is not needed:

rm -rf include man bin/idle bin/smtpd.py lib/lib-tk lib/*/test lib/test

Last thing was the filesystem on the target which is vfat. vfat does neither allow hard nor soft links. I just removed the link in bin/ and renamed python2.5 to python.

python linux arm_[Python]python for ARM/LINUX相关推荐

  1. linux系统调用的封装格式,ARM Linux系统调用的原理

    ARM Linux系统调用的原理ARM Linux系统调用的原理 操作系统为在用户态运行的进程与硬件设备进行交互提供了一组接口.在应用程序和硬件之间设置一个额外层具有很多优点.首先,这使得编程更加容易 ...

  2. 嵌入式基于Linux电机控制,基于嵌入式arm+linux平台的直流电机调速控制系统.pdf

    2012--2013 学年第 二 学期 物电 学院期末考试卷 嵌入式系统与应用 学号 : 姓名 : 班级 : 成绩: 评语: 装 订 (考试题目及要求) 嵌入式大作: 采用实验箱上的电位器作为信号输入 ...

  3. arm linux免驱usb声卡,arm linux利用alsa驱动并使用usb音频设备

    一.背景: arm linux的内核版本是3.13.0 二.准备工作 添加alsa驱动到内核中,也就是在编译内核的时候加入以下选项: 接下来就重新编译内核即可 三.交叉编译alsa-lib和alsa- ...

  4. 学习arm需要Linux吗,学了半年ARM+linux的一点感想

    从接触51单片机到ARM有一年了.从以前的一点都不懂到现在的有一点懂~~其实也不容易啊.大一的时候我还迷恋着魔兽世界的. 借着写日志的时候把这些日子学到的一些知识整理下........注明这个我其实还 ...

  5. arm linux设置ip地址命令,ARM Linux系统修改动态IP为静态IP地址

    # Wired or wireless interfaces auto eth0 #iface eth0 inet dhcp #        pre-up /bin/grep -v -e " ...

  6. arm linux下看门狗应用,arm linux watchdog 看门狗

    目前手上有个项目需要设计看门狗,是arm+CPLD 方式.由于对看门狗要求很高,打算做一个双看门狗,arm CPLD互相为 对方的看门狗.理论上CPLD是不需要看门狗的,还是这么去设计了.接下来对看门 ...

  7. arm linux qt5中文字库,Qt5 Font arm linux

    1. ubuntu 下查看当前字体库命令: fc-list /usr/share/fonts/chinese/msyhbd.ttf: Microsoft YaHei UI:style=Bold,Neg ...

  8. linux底层开发视频教学,ARM Linux嵌入式音视频设备底层开发

    摘要: 随着科学技术的快速发展,嵌入式系统早已成为电子信息和计算机行业发展重点.嵌入式设备已经广泛的融入我们的世界. 本文的研究对象是以ARM为核心的嵌入式音视频设备.本文完成了该系统的底层开发.本文 ...

  9. linux内核 noreturn,读《ARM Linux 内核源代码剖析》.......第13章 setup_processor()

    setup_processor首先是查找保存相应处理器信息的结构体,然后根据结构体里的值,对处理器相关的各种变量进行设置. setup_processor static void __init set ...

  10. linux dns及时添加,在ARM Linux上成功实现添加DNS库

    工作需要要在嵌入Linux上实现DNS, 从Delphi的Indy9中移植了一个DNS,用了半年了还可以. 今日偶然看到了网上有源码(竟然原来没有搜到ftp://ftp.isc.org/isc/bin ...

最新文章

  1. 数据挖掘学到最后全是数学
  2. 《R语言与数据挖掘最佳实践和经典案例》—— 第3章 数 据 探 索
  3. 第一章c语言基础知识答案,第一章 C语言的基础知识练习题
  4. 50题真 • 一文入门TensorFlow2.x
  5. 17 种经典图表总结,轻松玩转数据可视化!
  6. 今天才知道,MySQL 的 binlog 编号可以这么大!
  7. 精品资源:40个实用的 PSD 贴纸模板《下篇》
  8. linux 流场分析软件,scSTREAM | 通用流体分析软件
  9. 在IDEA上部署Robocode
  10. iframe透明设置
  11. DES 加密解密方法
  12. TCP offload to the resuce 让TCP减负来挽救我们
  13. 用户体验优化事半功倍:如何绘制客户行为轨迹图
  14. 3.8 js过渡效果
  15. Flink报错:org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold
  16. C语言编写 小企鹅表情包
  17. 基于winform的打印标签模板设计器以及打印辅助类
  18. python一键批量制作word邀请函
  19. 太极图正确画法_道教知识:太极图的正确画法
  20. 刷脸时代:勿信谣言,告诉你真实的刷脸支付系统

热门文章

  1. 2208: [Jsoi2010]连通数
  2. 模仿SDWebImage实现异步加载图片
  3. Activity的setResult方法
  4. DUILIB中获取flash,webbrowser control的方法
  5. EF 4.1 MSDN公约的翻译和整理
  6. c#学习之基础篇(filter 筛选器)
  7. CSS 7:网页布局(传统布局,flex布局,布局套路)
  8. Greenplum介绍
  9. 谷歌发布 Android 8.1 首个开发者预览版,优化内存效率
  10. 软件工程概论 课后作业1