Search This Blog

Dec 28, 2010

Setup Ubuntu 10.10 for iMX53 LTIB and Android environment

1. Be a root user
$ sudo passwd
enter root user password and then we can login as root

2. Setup proxy
Click System->Preference->Network proxy
setup your proxy setting and apply
Click System->Administration->Synaptic Package Manager
setup proxy and apply

3. Install all required package 
$ apt-get install rpm m4 patch bison libncurses5-dev g++ zlib1g-dev nfs-common nfs-kernel-server xinetd tftp tftpd gkermit git-core flex gperf libsdl1.2-dev libwxgtk2.6-dev build-essential curl valgrind libreadline5-dev ccache telnetd ssh samba gettext libgtk2.0-dev libdbus-glib-1-dev liborbit2-dev intltool libtool uuid-dev liblzo2-dev gparted git-doc git-email git-gui meld openbsd-inetd

Install package sun-java5-jdk
select System->Administration->Update Manager
hit "setting" and Choose the "Other Software" tab, hit Add and then enter
   deb jaunty multiverse
$ apt-get -y install sun-java5-bin sun-java5-jre sun-java5-jdk sun-java5-fonts sun-java5-plugin

4. Let root can compile LTIB
$ gedit /etc/sudoers
root ALL=NOPASSWD: /usr/bin/rpm, /opt/freescale/ltib/usr/bin/rpm

5. Setup NFS and tftpboot
Setting up NFS
$ gedit /etc/exports
add below line:
/tftpboot *(rw,sync,no_root_squash)

Setting up TFTP
$ mkdir /tftpboot
$ chmod 777 -R /tftpboot
$ gedit /etc/inetd.conf
tftp      dgram      udp      wait      nobody      /usr/sbin/tcpd      /usr/sbin/in.tftpd     /tftpboot
$ netstat -an | grep :69
We can see whether port 69 is opened.
udp        0      0    *
$ /etc/init.d/openbsd-inetd restart

6. Add export environment
$ gedit ~/.bashrc
export ARCH=arm
#export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-
export PATH=$PATH:/opt/freescale/ltib/usr/bin/

7. Automatic mount other partitions
$ gedit /etc/fstab
/dev/sdb1        /media/Linux    ext4    rw,nosuid,nodev,uhelper=udisks

8. Install LTIB BSP
Extract BSP and enter directory.
$ ./install
Enter installed directory
$ ./ltib -c
It will take long time to install host support packages at first time.
And then enter menu config, select imx5x platform.
After building done, generate "uImage" in directory "rootfs/boot", rootfs in "rootfs"

$ ./ltib -m prep -p kernel-2.6.35.spec
It will extract kernel source code into "rpm/BUILD/linux-"
$ export ARCH=arm
$ export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-
$ make im5x_defconfig
$ make uImage -j4
Post a Comment