Boa5200 HOWTO
Introduction
This document describes how to install and setup Linux and development environment for BOA5200 board. Assume that you have a development machine (your PC) that you use for development and building your applications which you consequently want to get running and test on BOA5200.
Serial line setting
The easiest way to communicate with the board ,when there is no OS and remote shell running on it, is over serial line. Recommended serial communication program is minicom. Setup minicom as follows:
Baud Rate – 38400
Bits - 8
Parity – N
Stop Bits - 1
Hardware Flow Control:- No
Software Flow Control:- No
After the setup you will see Redboot> command prompt. Here you can enter Redboot`s commands. Redboot is a simple boot manager bulit upon eCos real-time OS. For more details , see http://ecos.sourceware.org/ecos/docs-latest/redboot/redboot-guide.html.
DHCP server setup
Redboot supports BOOTP protocol which means that it is able to get network information(IP,netmask,gateway IP address,etc.) from DHCP server(provides BOOTP besides DHCP protocol). Install dhcp server (on debian: apt-get install dhcpd) on your development machine. Example of my dhcp configuration file /etc/dhcpd.conf:
# I have two ethernet interfaces:
# eth0 - Internet
# eth1 - connection to BOA5200 (IP= 192.168.10.1)
# I do not want to progate infos to 147.32.0.0 subnetwork
subnet 147.32.0.0 netmask 255.255.0.0 {
}
# private subnetwork
subnet 192.168.10.0 netmask 255.255.255.0 {
option broadcast-address 192.168.10.255;
option routers 192.168.10.1;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
}
# settings for BOA5200
host BOA5200 {
hardware ethernet 00:08:f1:11:22:33;
fixed-address 192.168.10.2;
}
Start dhcp server and reboot the board. After booting it has assigned IP, netmask and gateway address:
+PHY0: AMD AM79C874 FEC eth0: 100Mb/Full Duplex Ethernet eth0: MAC address 00:08:f1:11:22:33 IP: 192.168.10.2/255.255.255.0, Gateway: 192.168.10.1 Default server: 192.168.10.1
TFTP server setup
Redboot is able to load file from remote tftp server into memory. Tftp server is lanuched by inetd daemon when a new connection comes. Therefore add the following line into /etc/inetd.conf :
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd
Default tftp root directory is /tftpboot. You can change it by calling in.tftpd with specified directory as a parameter.
Tool chain
Toolchain(gcc, ld, ...) for MPC5200 can be downloaded from ftp://rtime.felk.cvut.cz/MPC5200/MPC5200_root_9_2.tar.gz. Unpack the archive:
cd / tar xvzf MPC5200_root_9_2.tar.gz
Kernel build
Kernel sources for MPC5200 can be downloaded from ftp://rtime.felk.cvut.cz/MPC5200/linuxppc-2.6.18-1_AM.tar.gz. After compilation a built image is placed into arch/ppc/boot/image directory.
(
ftp://rtime.felk.cvut.cz/MPC5200/config-2.6.18-1_AM ftp://rtime.felk.cvut.cz/MPC5200/GNUmakefile
make INSTALL_MOD_PATH=../MPC5200_modules/ modules_install
) You can test your new image on the board as follows:
# load kernel image from tftp server into memory RedBoot> load zImage.elf # execute image; root directory (/) is on flash memory RedBoot> exec
CAUTION: you must have RedBoot release 2007_02_01 otherwise 2.6 kernel will not run!
Updating RedBoot
Download ftp://rtime.felk.cvut.cz/MPC5200/MPC5200-2007.02.01-redbootROMRAM.srec
# load RedBoot image from tftp server into memory at the address 0x100000 RedBoot>lo -b 0x100000 MPC5200-2007.02.01-redbootROMRAM.srec
# write image in flash memory RedBoot>fi cr RedBoot RedBoot>reset
If upgrade fails you can fallback to ROM Redboot image by typing 'A&M:'
NFS-root setup
During the development phase of application it must be tested many times. However, it is annoying to copy several application files to flash memory every time. The practical solution is to mount via NFS working directory or whole root directory from the point of OS running on the board.
You can download already prepared root directory from ftp://rtime.felk.cvut.cz/MPC5200/MPC5200_root_09_02.tar.gz
To export /var/MPC5200_root directory via NFS add the following line to /etc/exports:
/var/MPC5200_root 192.168.10.0/255.255.255.0(rw,sync,no_root_squash)
Then run command 'exportfs -ra' so that the change take an effect.
If you want MPC5200 to be mount as root directory instead of that one in flash memory:
# load kernel image from tftp server into memory RedBoot> load zImage.elf # execute kernel image with information where to find root directory in parameter string RedBoot> ex -c "root=/dev/nfs rw nfsroot=192.168.10.1:/var/MPC5200_root ip=dhcp"