<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processorsのトピックi.MX python upgrade</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX-python-upgrade/m-p/254326#M23962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you know ltib comes with an old python version 2.4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Updating the ltib spec file so it uses a newer version is the best option.&amp;nbsp; This could take some time to happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile you can upgrade to a newer version 2.6 with these instructions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Download&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="https://docs.google.com/open?id=0B_hgNIBkt8-EVmp2TWx2ZndIMHM" title="https://docs.google.com/open?id=0B_hgNIBkt8-EVmp2TWx2ZndIMHM"&gt;python2.6.6-arm-cross-build.tar.gz - Google Drive&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The script may run successfully on host system:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ubuntu 10.04 LTS (I run it in a virtual machine) with following tools set installed (PATH need to be set):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;GCC cross building tool &lt;/LI&gt;&lt;LI&gt; Perl (which needed by openssl building)&lt;/LI&gt;&lt;LI&gt;Python on HOST (to run some tool scripts on HOST)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Decompress the attachment and enter the decompressed directory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$ tar -zxf python2.6.6-arm-cross-build.tar.gz&lt;/P&gt;
&lt;P&gt;$ cd python2.6.6-arm-cross-build&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Run the building script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt; $ ./cross_build_python2.6.6.sh&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;arm_ext and build_prefix/_install directory will be generated. Directory arm_ext contains all third party libraries needed by python extended module. build_prefix/_install contains python built results. All the extended libraries are static linked.&lt;/LI&gt;&lt;LI&gt; If the script file is not excutable, a chmod command may be needed before run it:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt; $ chmod 755 cross_build_python2.6.6.sh&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Package the building rusults&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$&amp;nbsp; python make_dist.py&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;Three packages will be generated.&lt;/LI&gt;&lt;LI&gt;python-2.6.6-arm.tar.gz : All building rusults be packed directly.&lt;/LI&gt;&lt;LI&gt;python-2.6.6.min-arm.tar.gz: A 'install' package to be installed on target system. This package contains all built python libraries, some of them may be deleted if not useful by specific use case.&lt;/LI&gt;&lt;LI&gt;test-python-2.6.6-arm.tar.gz: The python test libraries to test python installation on target system.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Install and test on target system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;copy python-2.6.6.min-arm.tar.gz on your target system.&lt;/LI&gt;&lt;LI&gt;decompress the package&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$ tar -zxf python-2.6.6.min-arm.tar.gz&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;A 'usr' will be generated by decompressing, python excutable in usr/bin and python libraries in usr/lib.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;c. set some environment variables&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$ export PYTHONHOME=/mnt/disk/usr&lt;/P&gt;
&lt;P&gt;$ export PATH=$PATH:/mnt/disk/usr/bin&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;then you can run comand 'python' in current shell to enter python command line. You can make the variables set on system boot in a producting system.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;remove installed test package:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$ rm -rf /mnt/disk/usr/lib/python2.6/site-packages/test&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;(the test package cost so much disk space)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 May 2013 14:59:36 GMT</pubDate>
    <dc:creator>FranciscoCarril</dc:creator>
    <dc:date>2013-05-23T14:59:36Z</dc:date>
    <item>
      <title>i.MX python upgrade</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX-python-upgrade/m-p/254326#M23962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you know ltib comes with an old python version 2.4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Updating the ltib spec file so it uses a newer version is the best option.&amp;nbsp; This could take some time to happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile you can upgrade to a newer version 2.6 with these instructions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Download&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="https://docs.google.com/open?id=0B_hgNIBkt8-EVmp2TWx2ZndIMHM" title="https://docs.google.com/open?id=0B_hgNIBkt8-EVmp2TWx2ZndIMHM"&gt;python2.6.6-arm-cross-build.tar.gz - Google Drive&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The script may run successfully on host system:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Ubuntu 10.04 LTS (I run it in a virtual machine) with following tools set installed (PATH need to be set):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;GCC cross building tool &lt;/LI&gt;&lt;LI&gt; Perl (which needed by openssl building)&lt;/LI&gt;&lt;LI&gt;Python on HOST (to run some tool scripts on HOST)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Decompress the attachment and enter the decompressed directory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$ tar -zxf python2.6.6-arm-cross-build.tar.gz&lt;/P&gt;
&lt;P&gt;$ cd python2.6.6-arm-cross-build&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Run the building script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt; $ ./cross_build_python2.6.6.sh&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;arm_ext and build_prefix/_install directory will be generated. Directory arm_ext contains all third party libraries needed by python extended module. build_prefix/_install contains python built results. All the extended libraries are static linked.&lt;/LI&gt;&lt;LI&gt; If the script file is not excutable, a chmod command may be needed before run it:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt; $ chmod 755 cross_build_python2.6.6.sh&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Package the building rusults&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$&amp;nbsp; python make_dist.py&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;Three packages will be generated.&lt;/LI&gt;&lt;LI&gt;python-2.6.6-arm.tar.gz : All building rusults be packed directly.&lt;/LI&gt;&lt;LI&gt;python-2.6.6.min-arm.tar.gz: A 'install' package to be installed on target system. This package contains all built python libraries, some of them may be deleted if not useful by specific use case.&lt;/LI&gt;&lt;LI&gt;test-python-2.6.6-arm.tar.gz: The python test libraries to test python installation on target system.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Install and test on target system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;copy python-2.6.6.min-arm.tar.gz on your target system.&lt;/LI&gt;&lt;LI&gt;decompress the package&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$ tar -zxf python-2.6.6.min-arm.tar.gz&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;A 'usr' will be generated by decompressing, python excutable in usr/bin and python libraries in usr/lib.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;c. set some environment variables&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$ export PYTHONHOME=/mnt/disk/usr&lt;/P&gt;
&lt;P&gt;$ export PATH=$PATH:/mnt/disk/usr/bin&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;then you can run comand 'python' in current shell to enter python command line. You can make the variables set on system boot in a producting system.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;remove installed test package:&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$ rm -rf /mnt/disk/usr/lib/python2.6/site-packages/test&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;UL&gt;&lt;LI&gt;(the test package cost so much disk space)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 14:59:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX-python-upgrade/m-p/254326#M23962</guid>
      <dc:creator>FranciscoCarril</dc:creator>
      <dc:date>2013-05-23T14:59:36Z</dc:date>
    </item>
  </channel>
</rss>

