Difference between revisions of "Build uClinux for EA2478 Board"
(→MicroWin) |
|||
(33 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | ==A mini howto== | |
− | Make a xen-virtualised Centos. | + | Make a xen-virtualised Centos or use the one assigned to you. |
− | Install development tools | + | ==Install development tools== |
+ | |||
+ | log in to your virtual server as '''root''' user and do this: | ||
<source lang="php"> | <source lang="php"> | ||
− | yum groupinstall "development tools" | + | $ yum groupinstall "development tools" |
− | yum install ncurses-devel | + | $ yum install ncurses-devel zlib-devel libacl-devel lzo-devel uuid-devel |
− | + | $ yum update # Updates the server completely | |
− | + | $ init 6 # Reboots the server | |
</source> | </source> | ||
+ | |||
+ | The server reboots and uses the newest kernel and other software packages updated. | ||
+ | |||
+ | ==Prepare for the Embedded Artists SW== | ||
+ | |||
+ | Log in again as '''root''' | ||
Create /home/emb/eadisk | Create /home/emb/eadisk | ||
− | Copy the extra directory on the EA DVD to /home/emb/eadisk | + | <source lang="bash"> |
+ | $ mkdir -p /home/emb/eadisk | ||
+ | $ mkdir -p /home/emb/uClinux-dist | ||
+ | </source> | ||
+ | |||
+ | == Get the EA realese == | ||
+ | |||
+ | Copy the '''extra''' directory on the EA DVD to /home/emb/eadisk or by using | ||
+ | |||
+ | <source lang="bash"> | ||
+ | $ cd /home/emb/eadisk | ||
+ | $ scp -r <your login>@bren.hih.au.dk:/home/emb/extra/ . | ||
+ | </source> | ||
+ | |||
+ | == Prepare settings== | ||
Create the file /home/emb/uClinux-dist/settings.sh and put in the following: | Create the file /home/emb/uClinux-dist/settings.sh and put in the following: | ||
Line 38: | Line 60: | ||
echo | echo | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
else | else | ||
Line 72: | Line 84: | ||
PATH=`echo ${PATH} | tr ":" "\n" | grep -v '^\./*$' | tr "\n" ":"` | PATH=`echo ${PATH} | tr ":" "\n" | grep -v '^\./*$' | tr "\n" ":"` | ||
+ | PATH=${PATH}:/home/emb/uClinux-dist/usr/local/bin/ | ||
+ | |||
export PATH | export PATH | ||
Line 79: | Line 93: | ||
</source> | </source> | ||
− | Now in /home/emb execute these commands | + | == Prepare the distribution== |
+ | |||
+ | Now in /home/emb execute these commands: | ||
<source lang="bash"> | <source lang="bash"> | ||
− | ln -s eadisk/extra/* . | + | $ cd /home/emb |
− | tar zxvf uClinux-dist-20070130.tar.gz | + | $ ln -s eadisk/extra/* . |
− | cd uClinux-dist | + | $ tar zxvf uClinux-dist-20070130.tar.gz |
− | rm -rf linux-2.* | + | |
− | tar zxvf ../linux-2.6.21.tar.gz | + | $ cd uClinux-dist |
− | mv linux-2.6.21/ linux-2.6.x | + | $ rm -rf linux-2.* |
− | gunzip -c ../ea-uClinux-081020.diff.gz | patch -p1 | + | |
− | gunzip -c ../ea-v3_1_incr1.diff.gz | patch -p1 | + | $ tar zxvf ../linux-2.6.21.tar.gz |
+ | $ mv linux-2.6.21/ linux-2.6.x | ||
+ | |||
+ | $ gunzip -c ../ea-uClinux-081020.diff.gz | patch -p1 | ||
+ | $ gunzip -c ../ea-v3_1_incr1.diff.gz | patch -p1 | ||
+ | $ cd .. | ||
</source> | </source> | ||
− | Edit the arm-elf-tools-20040427.sh file changing line 39 to look like this: | + | Edit the arm-elf-tools-20040427.sh file changing line 39 to look '''exactly''' like this (note the -n): |
− | tail '''-n''' +${SKIP} ${SCRIPT} | gunzip | tar xvf - | + | tail '''-n''' +${SKIP} ${SCRIPT} | gunzip | tar xvf - |
+ | Execute this command: | ||
<source lang="bash"> | <source lang="bash"> | ||
− | arm-elf-tools-20040427.sh | + | $ sh arm-elf-tools-20040427.sh |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</source> | </source> | ||
+ | Ignore any "burps" from gunzip at the end of the file. | ||
+ | |||
+ | Copy the precompiled file system utilities to uClinux-dist/bin folder: | ||
+ | |||
+ | <source lang="bash"> | ||
+ | $ cd uClinux-dist | ||
+ | $ cp /home/emb/eadisk/extra/mk*fs* bin/ | ||
+ | $ chmod a+x bin/mkcramfs | ||
+ | </source> | ||
+ | |||
+ | == Install the arm linux tools== | ||
+ | |||
+ | <source lang="bash"> | ||
+ | $ source settings.sh | ||
+ | |||
+ | $ tar zxvf ../arm-linux-tools-20061213.tar.gz | ||
+ | </source> | ||
+ | |||
+ | == Install u-boot == | ||
+ | '''Important!''' [[Install Uboot]] before continuing. | ||
+ | |||
+ | ==Finish the kernel configuration== | ||
+ | |||
+ | After the u-boot has been successfully installed and compiled finish up the kernel configuration: | ||
+ | <source lang="bash"> | ||
+ | $ cd /home/emb/uClinux-dist | ||
+ | $ cp ../u-boot-1.1.6/tools/mkimage bin/ | ||
+ | $ chmod a+x bin/mkimage | ||
+ | |||
+ | $ make menuconfig # Select proper vendor and board - | ||
+ | # exit twice to save the new settings | ||
+ | # after selection of the proper hardware | ||
+ | # it may also be necessary to un-select Microwin because of an error in the code | ||
+ | $ make # Be patient - take a mug of coffee or the like | ||
+ | </source> | ||
+ | |||
+ | If no errors, you are up running! | ||
+ | |||
+ | First time you have to load the uBoot using for instance FlashMagic on your local PC. | ||
+ | |||
+ | When the first copy of uBoot has been installed all the rest can be loaded using tftp. | ||
+ | |||
+ | What you may need now is to setup a [[Tftp]] server. | ||
+ | |||
+ | Copy the linux image to the tftp servers home directory. | ||
+ | |||
+ | <source lang="bash"> | ||
+ | $ cp images/uLinux.bin /tftpboot | ||
+ | $ cp images/romfs.img /tftpboot | ||
+ | </source> | ||
+ | |||
+ | If you modify the uBoot bootloader you should also copy the new uboot image to the tftp server. | ||
+ | |||
+ | <source lang="bash"> | ||
+ | $ cp ../u-boot-1.1.6/u-boot.bin /tftpboot | ||
+ | </source> | ||
+ | |||
+ | From this point you can follow the fine guide "Getting started with uCLinux" from Embedded Artist (can be found in the /home/emb/doc directory on bren). The bootloader is described from page 126. | ||
+ | |||
+ | A build help script can be found at [[Build script for EA distribution]]. | ||
+ | |||
+ | ==MicroWin== | ||
+ | |||
+ | It is possible to enable MicroWin and have the LCD in action. Follow the instructions on [[MicroWin on EA board]]. | ||
+ | |||
+ | ==Configuring your system== | ||
+ | |||
+ | It is possible to configure your system to suit your needs. Please see the [[Configure EA2478 Board]] page. |
Latest revision as of 15:22, 11 October 2013
Contents
A mini howto
Make a xen-virtualised Centos or use the one assigned to you.
Install development tools
log in to your virtual server as root user and do this:
$ yum groupinstall "development tools" $ yum install ncurses-devel zlib-devel libacl-devel lzo-devel uuid-devel $ yum update # Updates the server completely $ init 6 # Reboots the server
The server reboots and uses the newest kernel and other software packages updated.
Prepare for the Embedded Artists SW
Log in again as root
Create /home/emb/eadisk
$ mkdir -p /home/emb/eadisk $ mkdir -p /home/emb/uClinux-dist
Get the EA realese
Copy the extra directory on the EA DVD to /home/emb/eadisk or by using
$ cd /home/emb/eadisk $ scp -r <your login>@bren.hih.au.dk:/home/emb/extra/ .
Prepare settings
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 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" ":"` PATH=${PATH}:/home/emb/uClinux-dist/usr/local/bin/ export PATH echo uCLinux environment set to \'$UCLINUX\' fi
Prepare the distribution
Now in /home/emb execute these commands:
$ cd /home/emb $ 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-uClinux-081020.diff.gz | patch -p1 $ gunzip -c ../ea-v3_1_incr1.diff.gz | patch -p1 $ cd ..
Edit the arm-elf-tools-20040427.sh file changing line 39 to look exactly like this (note the -n):
tail -n +${SKIP} ${SCRIPT} | gunzip | tar xvf -
Execute this command:
$ sh arm-elf-tools-20040427.sh
Ignore any "burps" from gunzip at the end of the file.
Copy the precompiled file system utilities to uClinux-dist/bin folder:
$ cd uClinux-dist $ cp /home/emb/eadisk/extra/mk*fs* bin/ $ chmod a+x bin/mkcramfs
Install the arm linux tools
$ source settings.sh $ tar zxvf ../arm-linux-tools-20061213.tar.gz
Install u-boot
Important! Install Uboot before continuing.
Finish the kernel configuration
After the u-boot has been successfully installed and compiled finish up the kernel configuration:
$ cd /home/emb/uClinux-dist $ cp ../u-boot-1.1.6/tools/mkimage bin/ $ chmod a+x bin/mkimage $ make menuconfig # Select proper vendor and board - # exit twice to save the new settings # after selection of the proper hardware # it may also be necessary to un-select Microwin because of an error in the code $ make # Be patient - take a mug of coffee or the like
If no errors, you are up running!
First time you have to load the uBoot using for instance FlashMagic on your local PC.
When the first copy of uBoot has been installed all the rest can be loaded using tftp.
What you may need now is to setup a Tftp server.
Copy the linux image to the tftp servers home directory.
$ cp images/uLinux.bin /tftpboot $ cp images/romfs.img /tftpboot
If you modify the uBoot bootloader you should also copy the new uboot image to the tftp server.
$ cp ../u-boot-1.1.6/u-boot.bin /tftpboot
From this point you can follow the fine guide "Getting started with uCLinux" from Embedded Artist (can be found in the /home/emb/doc directory on bren). The bootloader is described from page 126.
A build help script can be found at Build script for EA distribution.
MicroWin
It is possible to enable MicroWin and have the LCD in action. Follow the instructions on MicroWin on EA board.
Configuring your system
It is possible to configure your system to suit your needs. Please see the Configure EA2478 Board page.