Author Archive

Cross Compiling Python 2.6.2 For ARM Cross Compiling Python for Embedded Linux

Tried to Cross Compile Python 2.6.2 For my ARM board, got success to successfully port python on ARM board, On ARM board Embedded Linux is already ported and running fine. ==>>

Here are simple steps to Cross compile python for ARM target board.

1) setup ARM tool chain with X11

install dependencies

Dependencies taken from DEBIAN
1) libdb

2) libsqlite3
copy and change prefix in sqlite3.pc

3) ncursesw

Dependencies installed from source
1) bzip2
edit Makefile


make install

2) gdbm
./configure –host=arm-linux –target=arm-linux –prefix=/xxx/yyy –enable-shared
make install
3) tcl-8.4.19
cd to unix folder

export ac_cv_func_strtod=yes
export tcl_cv_strtod_buggy=1

CC=arm-linux-gcc ./configure –host=arm-linux –prefix=/xxx/yyy

make install DESTDIR=/xxx/yyy

Note: dont install in prefix otherwise tk is not compiling.

4) tk-8.4.19

./configure –host=arm-linux CC=arm-linux-gcc
–prefix=/xxx/yyy –with-tcl=<path to unix folder in source of tcl>


make install

Note: you may have to move X11R6 from toolchain to /usr because its looking  in /usr for the X11 libs. if you do so remember to take backup of your /usr/X11R6 and then restore when you are done cross compiling python. Later find out why Makefiles are looking for X11R6 in /usr and change the path in those Makefiles..

5) readline-6.1
make install

6) openssl-0.9.8
There is no need to type configure, a Makefile is already existing. We just need to edit it and change it with way:


CC= xxx-yyy-linux-gnu-gcc
AR=xxx-yyy-linux-gnu-ar $(ARFLAGS) r
RANLIB= xxx-yyy-linux-gnu-ranlib
To compile and install the OpenSSL project, type successively make and make install. You should find the directories and files listed above under /opt/external_packages/openssl/0.9.8g/compiled/xxx-yyy-linux-gnu/.

change pkg-config files

Patching Python-2.6.2 before crosscompile
1) ./configure
2) make python Parser/pgen
3) mv python hostpython
4) mv Parser/pgen Parser/hostpgen
5) make distclean

6) apply the patch Python-2.6.2-xcompile.patch
patch -p1 < Python-2.6.2-xcompile.patch

7) In Modules/Setup.config and according to
Setup.config and (TODO: make patches for and Setup.config).
8) edit Modules/getaddrinfo.c and change “u_” to “unsigned ”

Compiling Python-2.6.2
CC=arm-linux-gcc CXX=arm-linux-g++ AR=arm-linux-ar RANLIB=arm-linux-ranlib ./configure –host=arm-linux –build=i686-pc-linux-gnu –prefix=/xxx/yyy
make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED=”arm-linux-gcc -shared” CROSS_COMPILE=arm-linux- CROSS_COMPILE_TARGET=yes
make  install HOSTPYTHON=./hostpython BLDSHARED=”arm-linux-gcc -shared” CROSS_COMPILE=arm-linux- CROSS_COMPILE_TARGET=yes prefix=~/Python-3.1.2

Dependencies – Setup.config and are configuration files are required to be modify for ARM board.

Downloads required for Cross Compiling Python for Embedded Linux

  1. Setup.config

Note -Rename python_setup_file to
Links –  Download Python

python corss compile patch used.

Number of View :6051

Tags: ,


Steps To Install And Use RSYNC

These are some simple steps to install and use RSYNC client.

1) Download RSYNC and its dependencies from

2) Copy all binaries in /sbin folder

3) Copy all libraries in /lib folder

4) If some library is missing download it from debian,
or compile from source if available and copy in /lib folder.

5) create /root/.ssh directories

6) Now you need to create a key,type the following command:

ssh-keygen -t dsa

If it asks you for a passphrase, just hit , to avoid putting one in.

This will create three files


7) To run rsync client run

rsync -a [email protected]:/source/ /destination/


rsync -a [email protected]:/client_pc/media /home/sami/

8) Enter the password.

In the above example,all the files in
will be copied in /home/sami/media/

Running RSYNC without prompting for password.
1) Copy the contents of created in step 6 above on the server pc in
file ~/.ssh/authorized_keys.

$ cat >>~/.ssh/authorized_keys
$ chmod 700 ~/.ssh/authorized_keys

2) Run rsync from client and test.It will not ask for password.

Number of View :2290


No Comments

Cricket Script To Get Score From Cricinfo

score.awk file
# Desktop Ticker
# dependencies —
# 1) links (‘lynx’ can also be used with slight modification in the script)
# 2) kdialog (comes with kde. script can be modified to use ‘xosd’, which will make it workable on any machine running X)
# 3) score.awk (awk file responsible parsing. contents of the file is pasted below the script)
# Instructions to use —
# 2) In ‘url’ variable only thing which is to be changed is the number before ‘.html’. The match number of currently running match can be obtained from


while [ 1 ]
links -enable-javascript 0 -dump $url > dump
info=`cat dump | awk -f score.awk | tail -3`
kdialog –passivepopup “$info” 30
#echo “$info” > dump
#osd_cat -f -adobe-times-medium-r-normal-*-20-*-*-*-p-*-iso8859-1 -s 1 -o 30 -d 30 -i 0 dump
score.awk file
/innings/ {if($2 == “innings”) print $1, $2}
/not out/ {if($1 == “captain”) print $2, $3, “\t”, $6, $7, $8, $9, $10;
else if($1 == “wicket-keeper”) print $2, $3, “\t”, $6, $7, $8, $9, $10;
else print $1, $2, “\t”, $5, $6, $7, $8, $9;}
/Total/ {print $0}

Number of View :4073



Content Protected Using Blog Protector By: PcDrome.

Mahol Dot Org is Stephen Fry proof thanks to caching by WP Super Cache