Configure EA2478 Board

From Klaus' wiki
Jump to: navigation, search

These are a few of the configurations that is possible on the Embedded Artists EA 2478 board.

To make testing easier also see NFS mount on EA board


uClinux includes two http daemons, boa and httpd. Here we'll look at boa.

Modify boa source

To include the boa server enable it in the make menuconfig system. Also include the logging option.

Change into


and modify the Makefile in order to have the boa.conf file included into the rom file system (romfs)


        $(ROMFSINST) /bin/$(EXEC)

add a couple of lines so you'll have this result:

        $(ROMFSINST) /bin/$(EXEC)
        $(ROMFSINST) -d boa.conf /etc/boa/boa.conf
        $(ROMFSINST) -d ../examples/mime.types /etc/

Above the all: target add


Next copy from the examples directory the boa.conf file into the src directory.

Edit the boa.conf file and change the user and group from nobody to root. Also change all the /var/log/boa to /var/www/log/boa

(in vi in command mode issue:

:1,$ s/<search pattern>/<new pattern>/

in the patterns forward slash are no good, so escape the forward slashes (/) with back slashes (\) like in \/var\/www)

Modify vendor settings

Change directory to


In this directory add a file named group with this content


In the Makefile locate

       $(ROMFSINST) /etc/passwd

and add just after

       $(ROMFSINST) /etc/group

This will ensure that the group file will be copied into the romfs directory and finally onto the board, when it loads the image.

Finally in the rc file you can specify the IP address to use while booting

#ifconfig eth0 up
# Change by KK 2013 10 11
ifconfig eth0 up

Use an appropriate address four your board.

At the end of the rc file add the following

# Inserted by KK 2013 10 15
mkdir -p /var/www/boa
cp /etc/boa/boa.conf /var/www/boa
mkdir -p /var/www/boa/log

which will create necessary directories on the variable file system and copy the boa.conf file to its right place.

Launch boa

Place a file in SERVER_ROOT according to boa.conf - default it is /var/www. Call the file index.html and fill it with a Hello, World example.

Start boa by issuing

$ boa -c /var/www/boa &

Point your browser to the IP address of the EA board and see a Hello, World on your screen :-)

Add a program

First follow How-to add a user space application to uClinux to include your own user space program in the romfs image.

Next modify the rc file that boots the system this line

ln -s /bin/helloworld /var/www/hello.cgi

if you added the helloworld program - you can of course add any program you want and change accordingly in the line above. It is necessary the file in /var/www end on .cgi

You can add

/bin/boa -c /var/www/boa &

to have boa start automagically when the system boots.

In the user/boa/src/boa.conf file you also need to enable the line (remove the comment character)

AddType application/x-httpd-cgi cgi


See MicroWin on EA board

Set your network address at boot

In uClinux-dist/vendors/EmbeddedArtists/rc you can near the bottom set your preferred network address. Find a line looking like this:

ifconfig eth0 up

Change the IP address to suit your need and rebuild.

Configuring u-boot

Originally the bootcmd is set to

bootcmd=echo "Booting from NAND FLASH (may take a few secs)." ;run

In order to change this, or other environment variables containing long strings it is recommended to enclose the string in single-quotes (')

setenv bootcmd 'echo "Booting from TFTP (may take a few secs)." ;run tftp_boot'

The usage of single-quotes ensures that the setenv command uses the whole string and not the part up to the semicolon - in the example the bootcmd is set to the first part (the echo string) and the last part is executed immediately.

ssh daemon

NOTE: This description is not complete yet.

dropbear is a drop-in lightweight alternative to the full shh-daemon.

In make menuconfig Network Applications check the dropbear choice.

Unfortunately the version of dropbear supplied with the EA uClinux distribution is not compatible with new ssh-clients. Hence a new version of dropbear must be downloaded and merged into the uClinux source code tree. This work is in the pipeline...