Configure EA2478 Board

From Klaus' wiki
Revision as of 07:33, 16 October 2013 by Klaus (Talk | contribs)

Jump to: navigation, search

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

http-server

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

ucLinux-dist/user/boa/src

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

At

romfs:
        $(ROMFSINST) /bin/$(EXEC)

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

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

Above the all: target add

CFLAGS += -DEMBED

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

uClinux-dist/vendors/EmbeddedArtists/LPC2478OEM_Board

In this directory add a file named group with this content

root:x:0:

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 192.168.5.233 up
# Change by KK 2013 10 11
ifconfig eth0 192.168.0.13 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

Start boa by issuing

$ boa -c /var/www/boa

Microwin

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 192.168.5.233 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...