Python 2.6 is required. Ubuntu 9.10 already has Python 2.6, which is convenient. However, you could install python-psyco which works fine in Ubuntu 8.04. This instruction also has been used on a Debian Lenny.
On Debian-Lenny on AMD64, python-psyco does not work. Follow this instruction to compile and install Python 2.6.
System-Admin-Software Sources: "Other Software" tab, add "deb http://oss.leggewie.org/oe/deb ./"
# sudo aptitude update
# sudo aptitude install openembedded-minimal
Install Psyco Python JIT compiler. Psyco works on 32-bit x86 platforms only.
$ sudo aptitude install python-psyco
On Ubuntu, check that /bin/sh (ls -l /bin/sh) is not symbolically linked to dash. "dash" is a POSIX compliant shell that is much smaller than "bash" – however some broken shell scripts still make use of bash extensions while calling into /bin/sh. To work around this issue call "sudo dpkg-reconfigure dash" and select No when it asks you to install dash as /bin/sh.
$ sudo /sbin/sysctl vm.mmap_min_addr=0
Add this following line to /etc/sysctl.conf to make this permanent:
vm.mmap_min_addr = 0
You need a /usr/share/sources directory with write permission by you. If it does not exist:
sudo mkdir /usr/share/sources
sudo chmod 777 /usr/share/sources
The instructions here are from http://mc1322x.devl.org/
The part about getting code is (do this while at the home directory of user, or /home/user):
$ git clone git://git.devl.org/git/malvira/mc1322x-oe.git
After executing the line, cd into mc1322x-oe and follow the instruction in README:
Then run setup.sh to get the bitbake and openembedded submodules.
Then source the profile to get going:
$ . profile
Then build the tests:
$ bitbake mc1322x-tests
This bitbake command is a package building process, consisting of 278 tasks. It will fetch source code packages from Internet, patch/configure/compile/install them. It took about 5 hours on my Dell Notebook.
I added the tool chain by creating symbolic links in /usr/local/bin:
cd /usr/local/bin
sudo ln -s /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm* .
To verify:
ls -l /usr/local/bin
total 28
lrwxrwxrwx 1 root root 62 2010-01-30 23:10 arm-linux-addr2line -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-addr2line
lrwxrwxrwx 1 root root 55 2010-01-30 23:10 arm-linux-ar -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-ar
lrwxrwxrwx 1 root root 55 2010-01-30 23:10 arm-linux-as -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-as
lrwxrwxrwx 1 root root 56 2010-01-30 23:10 arm-linux-c++ -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-c++
lrwxrwxrwx 1 root root 60 2010-01-30 23:10 arm-linux-c++filt -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-c++filt
lrwxrwxrwx 1 root root 56 2010-01-30 23:10 arm-linux-cpp -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-cpp
lrwxrwxrwx 1 root root 56 2010-01-30 23:10 arm-linux-g++ -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-g++
lrwxrwxrwx 1 root root 56 2010-01-30 23:09 arm-linux-gcc -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-gcc
lrwxrwxrwx 1 root root 62 2010-01-30 23:10 arm-linux-gcc-4.3.2 -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-gcc-4.3.2
lrwxrwxrwx 1 root root 59 2010-01-30 23:10 arm-linux-gccbug -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-gccbug
lrwxrwxrwx 1 root root 57 2010-01-30 23:10 arm-linux-gcov -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-gcov
lrwxrwxrwx 1 root root 58 2010-01-30 23:10 arm-linux-gprof -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-gprof
lrwxrwxrwx 1 root root 55 2010-01-30 23:10 arm-linux-ld -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-ld
lrwxrwxrwx 1 root root 55 2010-01-30 23:10 arm-linux-nm -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-nm
lrwxrwxrwx 1 root root 60 2010-01-30 23:10 arm-linux-objcopy -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-objcopy
lrwxrwxrwx 1 root root 60 2010-01-30 23:10 arm-linux-objdump -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-objdump
lrwxrwxrwx 1 root root 59 2010-01-30 23:10 arm-linux-ranlib -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-ranlib
lrwxrwxrwx 1 root root 60 2010-01-30 23:10 arm-linux-readelf -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-readelf
lrwxrwxrwx 1 root root 57 2010-01-30 23:10 arm-linux-size -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-size
lrwxrwxrwx 1 root root 60 2010-01-30 23:10 arm-linux-strings -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-strings
lrwxrwxrwx 1 root root 58 2010-01-30 23:10 arm-linux-strip -> /home/user/mc1322x-oe/tmp/cross/armv4t/bin/arm-linux-strip
Use System->Administration->Synaptic Package Manager to search and install libdevice-serialport-perl (should be 1.04). This is needed by mc1322x-load.pl to program the mote.
On Debian Lenny you also need to install TermReadKey:
# apt-get install libterm-readline-perl-perl
See instruction on http://mc1322x.devl.org/libmc1322x.html
Make soft link for mc1322x-load.pl in /usr/local/bin
$ cd /usr/local/bin
$ sudo ln -s ~/libmc1322x/tools/mc1322x-load.pl .