Setup and Unit Testing
Setting up a fresh PandA
INSTALL LINUX:
- Put SD card in reader attached to a PC
- Obtain the latest boot-x.x.zip for the rootfs build files from here:
https://www.ohwr.org/project/pandabox/wikis/documents (In dls they are
unzipped in
/dls_sw/work/targetOS/PandA-sd-card
) - Unzip/copy these files to a blank microSD card
- Unmount SD card
- Put the microSD card into the panda
- Prepare a blank USB key with relevant z-packages, optional ssh keys,
and panda-config.txt. ZPKG files and panda-config.txt can be
downloaded from: https://www.ohwr.org/project/pandabox/wikis/documents (In dls
they are cached in
/dls_sw/work/targetOS/PandA-usb-stick
). You need:-
panda-fpga
fmc_lback-sfp_lback-x.x.zpg@ for the FPGA firmware -
panda-server
x.x.zpg@ for the TCP server -
panda-webserver
x.x.zpg@ for the web GUI -
panda-config.txt
for the fixed IP address for the test procedure - optional authorized_keys file as described here: https://www.ssh.com/ssh/authorized_keys/
-
- Unmount the USB key
- Insert the USB key into the panda device
- Make sure switches on the picoZ and carrier board are in the correct
position. They should all be set to 1 (all 'up') as in the following
picture
- The JP26 Jumper is located near the USB port in the back left of the
board on the USB circuit (see following picture). Make sure this is
NOT connected. *If left connected it will cause the picozed to keep
rebooting when a USB key is
present
- Insert the Control encoder boards (Orange dot)
- Insert the FMC loop back card
- Connect the PandA unit to the serial port and open a serial terminal
(screen) with the following command, then hit 'Enter'
screen /dev/ttyS0 115200
*NOTE: to exit from screen use "CTRL + a + \" - Connect the power cable and ethernet cable
- Power on the panda and watch the output on the serial console
- If you are reinstalling packages on a previously set up panda, the MAC address stored in the /qspi directory on the Panda will be used and there will be no prompt to enter a new MAC.
- The boot process takes a couple of minutes. When booted the front
panel ERR LED will change to flashing red and there will be a prompt
to enter the appropriate MAC address. This is case sensitive and
should be entered in the following format: XX:XX:XX:XX:XX:XX
- If the MAC was entered incorrectly, or a mistake has been made, simply put some extra digits on the end (to give it an incorrect format) and hit Enter. This will cause the validation to fail and you will be prompted to enter it again.
- When the LEDS change back to ERR (front panel): Flashing red, then it is booted and ready for software installation
INSTALL PANDA SOFTWARE:
- Open the following link: http://192.168.0.100:8080/
- Return to the main admin page and click 'Install zpg files from USB'
- Select the usb mount (sda1), and the appropriate zpkg files:
-
panda-fpga
fmc_lback-sfp_lback-x.x.zpg@ -
panda-server
x.x.zpg@ -
panda-webserver
x.x.zpg@
-
- Click 'Install Selected' and scroll down to see the text "Writing state to disk" then "Top". This will take a couple of minutes.
- Visually check the LED status. if anything is different from below
it is an error:
- D4 (main board): solid green
- STA (front panel): blinking green
- RDY (front panel): solid green
OPTIONALLY ADD SSH KEYS
- If you placed an authorized_keys file on the USB stick you can add these keys so people can login over ssh
- Return to the main admin page and click 'Append SSH Keys from USB'
- Select the usb mount (sda1), the SSH keys that will be appended are now listed.
- Click 'Append to authorized keys'
- Return to the main admin page (click 'Top') and click 'Show Authorized SSH Keys'
- The authorized users and their keys will be shown
Hardware Testing
- ENVIRONMENT SETUP (this only needs to be done once)
- Get the PandABox-tst repository. Navigate to an appropriate
directory and execute the following commands:
mkdir PandABox-tst
-
git clone git
ohwr.org:rack-19/pandabox/pandabox-tst.git PandABox-tst@ cd PandABox-tst
- In dls you can just
cd /dls_sw/work/targetOS/PandABox-tst
- Get the PandABox-tst repository. Navigate to an appropriate
directory and execute the following commands:
- RUN TESTS
- Execute the following command:
@ ./run_tests.py 192.168.0.100@ - Follow the script instructions *If a test fails, you will be prompted to check the connectors and try again. There is only one retry.
- When finished, the script will prompt you if you want to view the log. Logs are also stored in the 'log' directory.
- After the hardware tests are complete; power off the PandA and remove the loop back connectors, USB key, and FMC loopback card.
- Install the appropriate encoder daughter cards beamline use
- Install the appropriate FMC card for beamline use
- Install the appropriate z-packages for beamline use
- Screw on lid
- Put a sticker with the MAC address on the front panel underneath the Ethernet port
- Execute the following command:
TEST CONFIG SETUP
- The test script is able to be configured to test different components as desired. The default is to test everything unplugged and plugged, however, when debugging a specific area it might be useful to only test one component.
- Tests are configured by editing the config file (PandATests/config) by specifying a test followed by a block number if relevant. Comments are defined by a '#'. See the following example:
#<test> <block number>Unplugged LoopBack Fmc Encoder 1 Encoder 2
- List of possible tests:
> Sfp
> Ttl
> TtlLoopBack
> TtlUnplugged
> Fmc
> LvdsLoopBack
> LvdsUnplugged
> Encoder
> EncoderUnplugged
> LoopBack
> Unplugged