Commit 16b610c4 authored by Benoit Rat's avatar Benoit Rat

sw: alpha-pts: improve documentation

parent 4c9b635b
......@@ -6,42 +6,70 @@
Setup
========
1. you need to setup a tftp server on your PC. \
1. you need to setup a DHCP+TFTP server on your PC. \
In some distribution, you can use the package `dnsmasq`[^wrssetup] to ease the instalation
#. Then you need to setup a NFS server in `/tftpboot`.
#. You need to compile[^builddoc] binaries from the lastest branch of `wrs-switch-sw`, and install it to your switch.
#. Then you need to extract the filesystem on your `/tftpboot` directory.
2. Then you need to setup a NFS server in `/tftpboot`.
3. You need to compile binaries from the lastest branch of `wrs-switch-sw`.
Below a small exemple on how to look it but you should look at the official documentation[^builddoc].\
\
`wr-switch-sw/build/wrs_build-all`[^clean] \
`wr-switch-sw/build/wrs_build-all --pack`
4. You need to put in the TFTP's root directory (`/tftpboot`)
the firmware you want to flash at the end of the test by copying
~~~~~~~{.bash}
mkdir -p /tftpboot/rootfs-test
sudo tar -xzf ${WRS_OUTPUT_DIR}/images/wrs-image.tar.gz -C /tftpboot/rootfs-test
cp ${WRS_OUTPUT_DIR}/images/at91bootstrap.bin /tftpboot
cp ${WRS_OUTPUT_DIR}/images/barebox.bin /tftpboot
cp ${WRS_OUTPUT_DIR}/images/zImage /tftpboot
cp ${WRS_OUTPUT_DIR}/images/wrs-image.jffs2.img /tftpboot
~~~~~~~~~~~~~~
#. And finally use the install scripts to send the files to tftpboot
5. Then you need to extract the filesystem on your `/tftpboot` directory.
~~~~~~~{.bash}
sudo ../install.sh /tftpboot/rootfs-test/
mkdir -p /tftpboot/rootfs-test
sudo tar -xzf ${WRS_OUTPUT_DIR}/images/wrs-image.tar.gz -C /tftpboot/rootfs-test
~~~~~~~~~~~~~~
#. You might also want put in the TFTP's root directory (`/tftpboot`)
the firmware you want to flash at the end of the test by copying
6. And finally use the install scripts to send the files to tftpboot
~~~~~~~{.bash}
cp ${WRS_OUTPUT_DIR}/images/at91bootstrap.bin /tftpboot
cp ${WRS_OUTPUT_DIR}/images/barebox.bin /tftpboot
cp ${WRS_OUTPUT_DIR}/images/zImage /tftpboot
cp ${WRS_OUTPUT_DIR}/images/wrs-image.jffs2.img /tftpboot
sudo wr-switch-testing/sw/install.sh /tftpboot/rootfs-test/
~~~~~~~~~~~~~~
[^wrssetup]: A small tutorial written for Ubuntu 12.04, can be found [here](https://www.dropbox.com/s/okfjzm79y5e6bq5/wr-switch.pdf)
[^builddoc]: Read the wrs-build.pdf inside the `wrs-switch-sw/doc/` folder to build the switch binaries.
[^clean]: You can use the `--clean` flag to make sure to rebuild everything.
Flashing
==========
Once the compilation is done, you need to check the DDR and install the bootloaders
into the dataflash for each board to test.
Do do this you need to connect the left-USB port to your
machine and execute[^flashdoc]:
~~~~~~~{.bash}
wr-switch-sw/build/flash-wrs -c --build
~~~~~~~~~~~~~~~~
[^flashdoc]: Read the wrs-build.pdf inside the `wrs-switch-sw/doc/` folder to understand better how to flash the board.
Usage
========
Once the setup is done, boot your board and select
Once the board is flashed, boot your board by pressing reset button. Connect to USB serial (Test)
minicom -D /dev/ttyUSB0 -b 115200
and select
boot from nfs (test)
......@@ -148,6 +176,9 @@ each test in the source code.
Troubleshoots
============
NAND
----------
It seems that the NAND test does not performs well on every board when
it reach the address `0x08040000`
......@@ -159,7 +190,15 @@ There is also an error when we try to erase a bad block, it is why we only
use `flash_eraseall -j` to erase NAND flash at the beginning of the test.
Dataflash
------------
In case the dataflash is failling you can load the bootloaders directly to
the ddr by using the following command:
wr-switch-sw/build/flash-wrs --test
--------------------------------------------------------
*This document is written in
[markdown syntax](http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown),
and can be compiled by executing `pandoc README.mkd -o README.pdf`*
and can be compiled by executing `pandoc --toc --number-section README.mkd -o README.pdf`*
% Alpha PTS scripts
% Benoit RAT, benoit@sevensols.com
% July 2012
Binaries
============
* **fpga_scbtest.bit** & **cpu_rt.bin** correspond to a fix version of the
switch HDL (`bfbeadaaa3cdbc73e38c20dcc06901262fb9bad4`).
They are going to be removed when a fixed HDL version is going
to be release.
* **fpga_qdr2temp.bit** is the bitstream to check & stress the QDRII while
monitoring the temperatures and using UART to display their values.
For the moment, this bitstream is completely isolated from
the ARM. The corresponding source code can be found in
`/hdl/qdr2temp/` folder
**CAUTIONS**: This bitstream is designed to increase the temperature,
therefore it can be armful if it is not used with a FAN.
--------------------------------------------------------
*This document is written in
[markdown syntax](http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown),
and can be compiled by executing `pandoc --toc --number-section README.mkd -o README.pdf`*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment