Difference between revisions of "Build uClinux for EA2478 Board"
From Klaus' wiki
Line 13: | Line 13: | ||
Copy the extra directory on the EA DVD to /home/emb/eadisk | Copy the extra directory on the EA DVD to /home/emb/eadisk | ||
+ | |||
+ | Create the file /home/emb/uClinux-dist/settings.sh and put in the following: | ||
+ | <source lang="bash"> | ||
+ | # | ||
+ | # Setup script for uCLinux development environment. | ||
+ | # Run using 'source ./settings.sh' | ||
+ | # | ||
+ | # Copyright (c) 2006 uCLogix | ||
+ | # | ||
+ | |||
+ | script_name='settings.sh' | ||
+ | |||
+ | # | ||
+ | # Make sure our current working directory represents | ||
+ | # a valid uCLinux environment. | ||
+ | # | ||
+ | if [ ! -f $script_name ]; then | ||
+ | |||
+ | echo | ||
+ | echo Please change to the root directory of your uCLinux | ||
+ | echo environment and type \'source ./$script_name\'. | ||
+ | echo | ||
+ | |||
+ | # | ||
+ | # And check that we are being run using 'source ./file' rather | ||
+ | # than 'sh ./file'. | ||
+ | # | ||
+ | #elif [ `basename $0` == $script_name ]; then | ||
+ | # | ||
+ | # echo | ||
+ | # echo Please use \'source ./$script_name\'. | ||
+ | # echo | ||
+ | # | ||
+ | else | ||
+ | |||
+ | UCLINUX=`pwd` | ||
+ | export UCLINUX | ||
+ | export UCLINUX_VER=0.40-final | ||
+ | |||
+ | # Figure out host system architecture | ||
+ | # for now, only linux-i386 supported | ||
+ | HOSTARCH=linux-i386 | ||
+ | |||
+ | # | ||
+ | # Add required binary tools to the user's search path | ||
+ | # | ||
+ | PATH=$UCLINUX/bin:$PATH | ||
+ | PATH=$UCLINUX/usr/local/bin:$PATH | ||
+ | PATH=/home/emb/uClinux-dist/usr/local/bin/:$PATH | ||
+ | PATH=/usr/local/lib/gcc-lib/arm-elf/2.95.3:$PATH | ||
+ | # | ||
+ | # Check for "." or ".\" in the path - it's broken | ||
+ | # | ||
+ | echo $PATH | tr ":" "\n" | grep '^\./*$' > /dev/null && | ||
+ | echo "WARNING: '.' detected in PATH - fixing it." 1>&2 | ||
+ | PATH=`echo ${PATH} | tr ":" "\n" | grep -v '^\./*$' | tr "\n" ":"` | ||
+ | |||
+ | export PATH | ||
+ | |||
+ | echo uCLinux environment set to \'$UCLINUX\' | ||
+ | |||
+ | fi | ||
+ | </source> | ||
+ | |||
+ | Now in /home/emb execute these commands (where you in the menuconfigs vendor section select Embedded Artists and the board purchased) : | ||
<source lang="bash"> | <source lang="bash"> | ||
Line 25: | Line 90: | ||
source settings.sh | source settings.sh | ||
tar zxvf ../arm-linux-tools-20061213.tar.gz | tar zxvf ../arm-linux-tools-20061213.tar.gz | ||
− | make menuconfig | + | make menuconfig # Select proper vendor and board |
make | make | ||
</source> | </source> |
Revision as of 21:07, 10 May 2010
Just a mini howto:
Make a xen-virtualised Centos.
Install development tools
yum groupinstall "development tools" yum install ncurses-devel
Create /home/emb/eadisk
Copy the extra directory on the EA DVD to /home/emb/eadisk
Create the file /home/emb/uClinux-dist/settings.sh and put in the following:
# # Setup script for uCLinux development environment. # Run using 'source ./settings.sh' # # Copyright (c) 2006 uCLogix # script_name='settings.sh' # # Make sure our current working directory represents # a valid uCLinux environment. # if [ ! -f $script_name ]; then echo echo Please change to the root directory of your uCLinux echo environment and type \'source ./$script_name\'. echo # # And check that we are being run using 'source ./file' rather # than 'sh ./file'. # #elif [ `basename $0` == $script_name ]; then # # echo # echo Please use \'source ./$script_name\'. # echo # else UCLINUX=`pwd` export UCLINUX export UCLINUX_VER=0.40-final # Figure out host system architecture # for now, only linux-i386 supported HOSTARCH=linux-i386 # # Add required binary tools to the user's search path # PATH=$UCLINUX/bin:$PATH PATH=$UCLINUX/usr/local/bin:$PATH PATH=/home/emb/uClinux-dist/usr/local/bin/:$PATH PATH=/usr/local/lib/gcc-lib/arm-elf/2.95.3:$PATH # # Check for "." or ".\" in the path - it's broken # echo $PATH | tr ":" "\n" | grep '^\./*$' > /dev/null && echo "WARNING: '.' detected in PATH - fixing it." 1>&2 PATH=`echo ${PATH} | tr ":" "\n" | grep -v '^\./*$' | tr "\n" ":"` export PATH echo uCLinux environment set to \'$UCLINUX\' fi
Now in /home/emb execute these commands (where you in the menuconfigs vendor section select Embedded Artists and the board purchased) :
ln -s eadisk/extra/* . tar zxvf uClinux-dist-20070130.tar.gz cd uClinux-dist rm -rf linux-2.* tar zxvf ../linux-2.6.21.tar.gz mv linux-2.6.21/ linux-2.6.x gunzip -c ../ea-v3_1_incr1.diff.gz | patch -p1 arm-elf-tools-20040427.sh source settings.sh tar zxvf ../arm-linux-tools-20061213.tar.gz make menuconfig # Select proper vendor and board make