Wednesday, March 31, 2010

ELDK on mini2440

The Embedded Linux Development Kit (ELDK) includes the GNU cross development tools, such as the compilers, binutils, gdb, etc.support different Target architecture including arm.

Download link
http://www.denx.de/wiki/DULG/ELDKAvailability


Creating enviroment on host PC.
linuxhost > mkdir eldk
linuxhost > mkdir install_mount
linuxhost > cd eldk/
linuxhost/eldk > su
linuxhost/eldk # mount -o loop,exec ../arm-2007-01-21.iso ../install_mount/
linuxhost/eldk # exit


linuxhost/eldk > ls ../install_mount/
. arm ELDK_FIXOWNER etc install RPMS tools
.. common ELDK_MAKEDEV icons README.html sys version


linuxhost/eldk > ../install_mount/install arm
linuxhost/eldk > chmod u+x eldk_init

now unmount the ISO image as root

linuxhost/eldk > ./eldk_init arm
export these variable to environment,or include them as part of .bashrc file.
ARCH=arm
CROSS_COMPILE=arm-linux-
DEPMOD=/opt/eldk/usr/bin/depmod.pl
PATH=/opt/eldk/usr/bin:/opt/eldk/bin


Using ELDK for mini2440

compiling the Kernel...
Error found while compiling the kernel
kernel/bounds.c:1: error: invalid ABI option: -mabi=aapcs-linux
Fix is to un select Kernel Features ---> [ ] Use the ARM EABI to compile the kernel
Now do make in kernel source,the kernel is successfully build on ELDK.

Building the Root file system
untar the root_qtopia.tar.gz which is available on CD.
cd root_qtopia
rm bin sbin lib usr -rf
cp /opt/ELDK/arm/lib . rf

BusyBox combines tiny versions of many common UNIX utilities into a single small executable,I have used busybox-1.16.0 for my filesystem.
compilation is very straightforward. make menuconfig,
In BusyBox Settings -->Build Options , use 'arm-linux-' as cross compiler prefix.
In Installation Options-> , update the BusyBox Installation prefix
busybos build will create 'bin','sbin','usr' folders in its installation folder.
copy these folders to root_qtopia/
cp /{bin,sbin,usr} root_qtopia/ -rf

now yaffs2 image for root_qtopia and upload it to mini2440 board.

mkyaffs2image root_qtopia rootfs.img

No comments:

Post a Comment