Run Python Scripts in SB2 Environment
http://lists.scratchbox.org/pipermail/scratchbox-users/2009-September/001533.html
http://lists.scratchbox.org/pipermail/scratchbox-users/2008-September/001346.html
If you don't want the python to be present in the target filesystem, you'd better off compiling it as a host tool (with the host-gcc toolchain) and installing it into /host_usr inside scratchbox. Just note that you'll need to set /host_usr/bin into your path and possibly /host_usr/lib/python2.5 in PYTHONPATH.
如果不想让python在target中,最好用host-gcc编译然后按照在/host_usr目录中
http://lists.scratchbox.org/pipermail/scratchbox-users/2005-May/000248.html
See /scratchbox/doc/variables.txt for more information about controlling the binary redirector (the SBOX_REDIRECT_* variables). If you want to replace Scratchbox's Python for building purposes, you should make it a host tool by building it with host-gcc and installing it (for example) under /host_usr.
切到[sbox-HOST: ~] > 中
apt-get install python2.6
cp –a python相关到/host_usr
dpkg -L python2.6
mkdir /host_usr/lib
cp /usr/bin/py* -a /host_usr/bin/
cp /usr/bin/2to3-2.6 -a /host_usr/bin/
cp /usr/bin/pdb2.6 /host_usr/bin/ (debug用的)
cp -a /usr/lib/python2.6 /host_usr/lib/
切到MARVELL
[sbox-MARVELL: ~] > python2.6
/host_usr/bin/python2.6: error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory
切回HOST
[sbox-HOST: ~] > which python2.6
/host_usr/bin/python2.6
[sbox-HOST: ~] > ldd /host_usr/bin/python2.6
libpthread.so.0 => /lib/libpthread.so.0 (0x005a2000)
libdl.so.2 => /lib/libdl.so.2 (0x00634000)
libutil.so.1 => /lib/libutil.so.1 (0x00f0c000)
libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0x0041e000)
libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0x0021a000)
libz.so.1 => /usr/lib/libz.so.1 (0x0074a000)
libm.so.6 => /lib/libm.so.6 (0x00110000)
libc.so.6 => /lib/libc.so.6 (0x0075e000)
/lib/ld-linux.so.2 (0x00b4a000)
[sbox-HOST: ~] >
[sbox-HOST: ~] > ls /usr/lib/i686/cmov/
libcrypto.so.0.9.8 libssl.so.0.9.8
就两个库,全拷贝过去
[sbox-HOST: ~] > mkdir /host_usr/lib/i686/cmov -p
[sbox-HOST: ~] > cp -a /usr/lib/i686/cmov/* /host_usr/lib/i686/comv
[sbox-HOST: ~] >
切到MARVELL
[sbox-MARVELL: ~] > export LD_LIBRARY_PATH=/host_usr/lib/i686/cmov/:$LD_LIBRARY_PATH
[sbox-MARVELL: ~] > python2.6
/host_usr/bin/python2.6: error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory
晕倒了,怎么回事啊?