------------------------------------------------------------------------------

Building Linux kernel for RNAS-1200

-----------------------------------------------------------------------------
Following steps describe how to decompress and build the firmware for RNAS-1200

1.Host Operation System Requirements  (recommend)

	Debian 4.0, 5.0, 6.0 7.0 (on x86)
	Ubuntu 8.04, 8.10, 9.04 10.04 11.04 11.10 12.04 (on x86)
 	
2. Install the developing enviornment

	Following compiling enironment and packages are needed for firmware
	making. you must install these packages on your Debian based 
	enviornment.

	root@Backup-LX:~# apt-get update
	root@Backup-LX:~# apt-get install build-essential autoconf btyacc flex bison libtool libncurses5-dev
	root@Backup-LX:~# tar xjvf arm-mv5sft-linux-gnueabi.tar.bz2 -C /
	root@Backup-LX:~# export PATH=$PATH:/usr/local/arm-mv5sft-linux-gnueabi/bin

3. Untar the source code,

	For example: the RNAS-1200 kernel source code is linux-2.6.31.8.tar.bz2

	tar xjvf linux-2.6.31.8.tar.bz2
	
	After the linux-2.6.31.8.tar.bz2 is untared, 
	all the files will be decompressed in ./linux-2.6.31.8 directory
	
	./linux-2.6.31.8		Linux kernel source code
	./linux-2.6.31.8/.config	Linux kernel configuration files

4. Then you can enter the linux-2.6.31.8 directory and make the kernel uimage
	
	4.1. To customized the kernel config by `make menuconfig`

	root@Backup-LX:~# cd ./linux-2.6.31.8
	root@Backup-LX:~# make menuconfig

	4.2. To make the linux kernel

	root@Backup-LX:~# cd ./linux-2.6.31.8
	root@Backup-LX:~# make ARCH=arm CROSS_COMPILE=arm-mv5sft-linux-gnueabi- uImage

	This command will make the linux kernel and create the uImage in ./linux-2.6.31.8/arch/arm/boot/uImage.
	You can upload it to target and reboot to run the new kernel.

	4.3. To make the kernel modules only

	If you just need to build some module, You have to build kernel at first. 
  	Then make the module you need like this.

	root@Backup-LX:~# cd ./linux-2.6.31.8
	root@Backup-LX:~# make ARCH=arm CROSS_COMPILE=arm-mv5sft-linux-gnueabi- modules

	All the modules are located in the sub-dictories of ./linux-2.6.31.8 with the name of .ko extension
