Friday, July 18, 2008

Ubuntu 8.04 Kernel Compilation

1) To prepare the necessary tooling, kernel-package libncurese-dev
>sudo apt-get install kernel-package libncurses5-dev

2) To download kernel source from kernel.org.
>cd /usr/src
>sudo wget http://ww.kernel.org/pub/linux/lernel/v2.6/linux-2.6.24.7.tar.bz2

3) To de-compress the kernel sources.
>sudo tar jxvf linux-2.6.24.7.tar.bz2

4) To create a soft link to the kernel source.
>sudo ln -s linux-2.6.24.7 linux

5) To copy the kernel configuration.
> cd linux
>sudo cp /boot/config-'uname -r' .config

6) To config the kernel.
>sudo make menuconfig

7) To clean up the old stuffs first.
> sudo make distclean

8) Exciting now, start to build the kernel source.
> sudo make-kpkg --initrd kernel_image kernel_headers

9) To install the kernel.
>sudo dpkg -i linux-image-2.6.24.7_2.6.24.7-10.00.Custom_i386.deb linux-headers-2.6.24.7_2.6.24.7-10.00.Custom_i386.deb

10) Aftter installation, user can check /boot/grub/menu.lst to ensure the kernel was added to the menu.

11) Reboot. ^_^

Thursday, July 17, 2008

Setup a VMImage based on Ubuntu 8.04 for ARM Linux development.

Below is my blog to setup a VMImage based on Ubuntu 8.04 for accio development.

1) Install the VMWare workstation version 6.x or above. Please use the Bridge for network setting.

2) Since I am using static IP instead of the DHCP, please change the network setting of /etc/network/interfaces accordingly.

auto lo
iface lo inet loopback

#The primary network interface
auto eth0
#iface eth0 inet dhcp

iface eth0 inet static
address "your IP"
netmask 255.255.255.0
network ""
broadcast ""
gateway ""


3) To install the ftp server.

sudo apt-get install proftpd

(PS: Please select to run proftp server from standalone.)


(reference link: http://www.ubuntugeek.com/settingup-an-ftp-server-on-ubuntu-with-proftpd.html)

4) To install the samba server.

sudo apt-get install samba (reference link: http://ubuntuforums.org/showthread.php?t=202605)

5) To install gcc.

sudo apt-get install build-essential (reference link: http://www.linuxforums.org/forum/ubuntu-help/104156-gcc-installation-ubuntu.html)

if internet can't connect, please try.

sudo apt-cdrom add
sudo apt-get update
sudo apt-get install build-essential

6) To install ncurses. (It is for kernel menuconfig.)

sudo apt-get install build-essentials
sudo apt-get install libncurses5-dev

(reference link: http://ubuntuforums.org/showthread.php?t=296224)

7) To install gcc compiler version 3.4.6 for ARM9 Linux Platform
i) Download the arm-linux-gcc-3.4.6-ssl-0.1.2.tar.bz2 to /tmp directory
ii) Unzip the arm-linux-gcc-3.4.6-ssl-0.1.2.tar.bz2
- cd /tmp
- tar jvxf /tmp/ arm-linux-gcc-3.4.6-ssl-0.1.2.tar.bz2 –C /
iii) Set the environment variable of the user.
- Edit ~/.bashrc
- Add the line
ARM_GCC_TOOLS=/usr/local/arm/3.4.6/bin
PATH=$ARM_GCC_TOOLS:$PATH

8) TO install CVS client.

sudo apt-get install cvs

(reference link: http://sanatio.blogspot.com/2005/12/cvs-server-on-ubuntu.html)

(PS: User manual for ubuntu could be found here http://ubuntuguide.org/wiki/Ubuntu:Hardy)