Sei sulla pagina 1di 9

Client : National Research Foundation (NRF)

Project : MeerKAT
Type: AI – Assembly Instruction

ROACH-2 Production Test Machine Setup

Document number.............................................................................. R2000-0000-002


Revision....................................................................................................................... 1
Classification.............................................................................. Company Confidential
Author................................................................................................................. A Rust
Date............................................................................................................. 3 July 2015
Company Confidential R1000-0000-002, Rev 1

Document Approval
Role Name Designation Affiliation Signature/Date

Submitted A Rust DBE SKA SA

Approved JR Manley CBF TL SKA SA

Approved F Karels QA SKA SA

Document History
Revision Date of Issue ECP/ECN number Comments

1 7 July 2015 n/a First release

Document Software
Function Package Version Filename

Word Processor Google docs n/a https://docs.google.com/a/ska.ac.za/document/d/1tq


w4C6uZ6EULl1OykTFL_vQTnK52UBr0aYqTg44E5
wg/edit?usp=sharing_eid

Company Details

Name SKA South Africa

Physical/Postal Third Floor, The Park


Address Park Road (off Alexandra road)
Pinelands
7405
SOUTH AFRICA

Tel. +27 21 506 7300

Fax. +27 21 506 7375

Website www.ska.ac.za

7 July 2015 Company Confidential Page 2 of 9


Company Confidential R1000-0000-002, Rev 1

a. Install Debian and update to the testing version (create a test user that everyone using the machine
for testing can access).
■ edit /etc/apt/sources.list:

● deb http://debian.mirror.ac.za/debian testing main non-free contrib


● deb-src http://debian.mirror.ac.za/debian testing main non-free contrib
■ sudo apt-get update
■ sudo apt-get dist-upgrade
b. Add test user to sudoers (vim /etc/sudoers)
■ Edit sudoers (visudo)
● under "# User privilege specification" add the following line:
testuser ALL=(ALL) ALL
c. Install the following packages (sudo apt-get install packag)
■ vim
■ git
■ subversion
■ openssh-server
■ make
■ python-setuptools
■ python-dev
■ swig
■ minicom
■ libftdi-dev
■ libtool
■ autopoint
■ flex
■ automake
■ autoconf
■ bison
■ pkg-config
d. Clone testing library from Github
■ git clone https://github.com/ska-sa/roach2_testing
e. Install Python 2.7
■ sudo apt-get install build-essential
■ sudo apt-get install libreadline5-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev
libgdbm-dev libc6-dev libbz2-dev
■ Download and install python 2.7 source
● wget ​http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
● tar -xvf Python-2.7.3.tgz
● cd Python-2.7.2/
● ./configure
● make
● sudo make altinstall
■ sudo apt-get install ipython

7 July 2015 Company Confidential Page 3 of 9


Company Confidential R1000-0000-002, Rev 1

f. Edit ​Group Permissions


■ edit /etc/group and add testuser to the end of the following lines:
■ dialout
staff

g. Install Libraries needed for UrJTAG


■ USB development libraries: sudo apt-get install libusb-dev
■ compile “libftdi-0.19(hack).tar.gz” (this file is available in the github repository under
support_sw/):
■ tar -zxvf libftdi-0.19\(hack\).tar.gz
mv libftdi-0.19\(orig\) libftdi-0.19
cd libftdi-0.19
./configure --enable-python-binding
sudo make install
sudo ldconfig -v

h. Install UrJTAG
■ This file is available in the github repository under support_sw/
■ tar -zxvf urjtag_python.tar.gz
cd urjtag_python/urjtag
■ This may be needed: autoreconf -f -i -Wall,no-obsolete
./configure --without-ftd2xx --enable-python
libtoolize --force
autoreconf -i
sudo make install

i. Add FTDI rules to udev


■ udev rules must be set for the ftdi libraries:
● sudo vim /etc/udev/rules.d/ftdi.rules
type: ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="666"
save
● sudo service udev restart

7 July 2015 Company Confidential Page 4 of 9


Company Confidential R1000-0000-002, Rev 1

j. Minicom Setup
■ The USB and serial Minicom configuration files must be created:
● become root "sudo -s"
run "minicom -s ttyS0"
select "Serial port setup"
press A
change to "/dev/ttyS0"
set hardware and software flow control to no
press "esc"
select "Modem and dialing"
clear init string and reset string
select "Save setup as ttyS0"
select "Exit from Minicom"

■ Do the same for ttyUSB2 and ttyUSB3 (replace ttyS0 with ttyUSB in above instructions).
■ Exit root

7 July 2015 Company Confidential Page 5 of 9


Company Confidential R1000-0000-002, Rev 1

k. Network Interfaces
■ There should be 3 NICs in the test machine, one for network access, one for the PPC
network and one for the FPGA network.
■ The network interfaces are controlled in the following file: /etc/network/interfaces
■ The primary interface must be set up according to the network the machine will be
connected to, but the PPC and FPGA interfaces should be set as specified below.
■ Note in the sample file below the primary network interface is set to static, this may be a
dynamic (get’s ip address from a DHCP server) depending on the network.
■ Sample “interfaces” file (edit this file as sudo):
■ # This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface


auto lo
iface lo inet loopback

# The primary network interface


auto eth0
iface eth0 inet static
address 192.168.4.40
netmask 255.255.255.0
broadcast 192.168.4.255
gateway 192.168.4.254

# The PowerPC network interface


auto eth1
iface eth1 inet static
address 192.168.40.1
netmask 255.255.255.0
broadcast 192.168.40.255

# The FPGA network interface


auto eth2
iface eth2 inet static
address 192.168.41.1
netmask 255.255.255.0
broadcast 192.168.41.255

■ After editing the interfaces file each interface must be cycled for the new settings to take
effect:
■ sudo ifconfig ethX down
sudo ifconfig ethX up

7 July 2015 Company Confidential Page 6 of 9


Company Confidential R1000-0000-002, Rev 1

■ Determine which interface is which and label accordingly (unplug all NICs except the
primary network):
■ run "/sbin/ifconfig -a"
Note that only one interface should say "RUNNING", this is the primary network
connection to the outside.
Plug a cable into a NIC and wait until the link lights come on
Run "/sbin/ifconfig -a" again
Another interface will now say "RUNNING".
Label eth0 as the primary network connection
Label eth1 as the PPC interface.
Label eth2 as the FPGA interface.

l. Install and configure a DHCP and TFTP server


■ sudo apt-get install dnsmasq
■ Create a dnsmasq configuration file in /etc/dnsmasq.conf with the following contents:
bogus-priv
filterwin2k
interface=ethX # this is the NIC connected to the PPC
bind-interfaces
dhcp-range=192.168.40.50,192.168.40.99,12h
read-ethers
dhcp-mac=roach1,02:*:00:*:*:*
dhcp-mac=roach2,02:*:01:*:*:*
dhcp-option=3
dhcp-option=option:ntp-server,192.168.40.1
dhcp-option=net:roach1,17,192.168.40.1:/home/nfs/roach1/current,noloc
k
dhcp-option=net:roach2,17,192.168.40.1:/home/nfs/roach2/current,noloc
k
dhcp-boot=uImage
enable-tftp
tftp-root=/home/nfs/roach2/boot
dhcp-leasefile=/var/lib/misc/​dnsmasq​.leases
dhcp-authoritative
■ Note this is a DHCP server that will lease IP addresses to machines connecting to the
ethX NIC. If an external network is plugged into ethX bogus IP address will be leased to
random machines! People might be cross… so make sure the ethX NIC is identified and
only connects to ROACH PPC links.

7 July 2015 Company Confidential Page 7 of 9


Company Confidential R1000-0000-002, Rev 1

m. Install and configure nfs for ​ROACH2


■ Untar and install the ​ROACH2​ network file system (The nfs image is available on github at
https://github.com/ska-sa/roach2_nfs_uboot):
● All actions must be performed as root.
go to roach2_nfs_uboot directory
sudo -s
mkdir -p /home/nfs/roach2
cp -r boot /home/nfs/roach2
tar -xzvf (roach2 nfs tarball) -C /home/nfs/roach2
cd /home/nfs/roach2
ln -s debian_stable_devel current
exit sudo (ctrl-d)

■ Install nfs kernel server:


● sudo apt-get install nfs-kernel-server
Add the following line to /etc/exports
/home/nfs 192.168.0.0/16(rw,subtree_check,no_root_squash)
n. Install python packages
■ easy_install pyserial
■ easy_install iniparse
■ easy_install xmodem
■ sudo easy_install katcp
■ easy_install construct
■ easy_install spead
■ sudo apt-get install python-h5py
■ easy_install corr
● If that does not work:
○ get corr tarball from ​http://pypi.python.org/pypi/corr/
○ tar -xzvf corr-0.6.9.tar.gz
○ cd corr-0.6.9
○ sudo python setup.py install
■ Get libmpsse from code.google.com
● svn checkout http://libmpsse.googlecode.com/svn/trunk/ libmpsse-read-only
● cd libmpsse-read-only/src
● ./configure
● make
● make install
o. Reboot
p. Clone production test software
■ Create suitable directory
■ git clone ​https://github.com/ska-sa/roach2_testing
■ To run the test program go to roach_testing/roach2_production_test and run
roach2_ats.py
■ NB. If testing a rev1 board run “./roach2_ats.py 1”

7 July 2015 Company Confidential Page 8 of 9


Company Confidential R1000-0000-002, Rev 1

Optional:
q. Install Xilinx in /opt/Xilinx
■ Download Xilinx 12.4 Labtools. This can be downloaded from ​http://www.xilinx.com
■ Untar (tar -xvf Xilinx_LabTools_12.4_M.81d.2.0.tar) and install by running “sudo ./xsetup”
in the Xilinx directory.
■ Generate a webpack licence on the website, a lic file will be emailed to you. During
installation select the webpack licence and follow instructions.
■ To run Xilinx Impact type the following in a terminal (source runs a pearl script that sets up
the Xilinx paths):
■ source /opt/Xilinx/12.4/LabTools/settings64.sh
impact

r. Install ELDK
■ The ELDK iso is 2Gb so downloading it will take some time.
■ download the iso image: wget
ftp://ftp.sunet.se/pub/Linux/distributions/eldk/4.2/ppc-linux-x86/iso/ppc-2008-04-01.iso
To check whether its a 32-bit or 64-bit OS run "uname -a". If 32 bit no need to install
ia32-libs. Skip the next step.
As the ELDK is compiled for 32-bit host systems, a compatibility layer is required on 64-bit
systems: "sudo apt-get install ia32-libs"
Mount iso image: overruns:0 frame:0
TX packets:0 errors:0 dropped:0
sudo mkdir /mnt/cdrom 8 people have recommended Alec

sudo mount -o loop ppc-2008-04-01.iso /mnt/cdrom


cd /mnt/cdrom
sudo ./install -d /opt/eldk ppc_4xx ppc_4xxFP

7 July 2015 Company Confidential Page 9 of 9

Potrebbero piacerti anche