Test set-up for the coreboot distributed firmware test environment featuring greater extensibility, enhanced automation, concurrent high speed firmware flashing and decentralized operation.
The proposed system provides convenient and inexpensive architecture for interfacing the coreboot test server to systems under test (SUT). Each SUT has a Controller board for controlling and monitoring the SUTs and an In Circuit Programmer based on FT232H USB 2.0-Serial Bridge. A cluster of these SUTs connect to a concentrator computer based on Raspberry Pi (RasPi) board where it provides functions of flashing, controlling and monitoring of the SUTs. A large number of such clusters may exist which could be connected to a common LAN or the internet so that these concentrators can be accessed remotely from any computer via SSH and an individual SUT may then be controlled through the software within the concentrator. Programmable USB Power-strips are provided such that individual switches can be programmed by the test server to control power to the SUTs and other peripherals.
The project aims to make firmware testing more accessible to the coreboot distributed firmware test server.
Please refer to the system diagram (figure 1)
The idea of using concentrator is for large testing networks but it is completely optional and can be replaced by an operator's PC or the test server itself for set-ups with smaller number of SUTs.
Salient features of the proposed system
The proposed design, as mentioned in the title, offers greater extensibility, enhanced automation, concurrent high speed firmware flashing and decentralized operation in the following ways:
The architecture uses each interface within its limits and large number of system under tests (SUTs) may be added to the test system irrespective of physical proximity to the Test Server.
The most commonly available and convenient interface i.e. USB has been used to link the SUTs to the concentrator and the powerstrips to the test server.
The number of clusters that can be connected are quite large since it is connected to Ethernet. The number of SUTs per cluster however is limited to 127/2 by the USB specification. But practically these limits would never be reached due to 5m cluster radius limitation of USB 2.0 cable length limit specification. The maximum cluster radius could be up to 30m by cascading USB hubs.
Each SUT has an MCU inside for controlling Reset and Power switches and for reading motherboard voltages and optionally reading the POST code from a POST code module (if any). The MCU communicates directly to the RasPi board through a USB
The system includes programmable Power-strips to automatically power-cycle or turn-off an SUT by the test server when needed.
Concurrent high-speed flashing operations:
SPI Flashing is done using FTDI’s FT232H USB-Serial bridge configured in SPI mode. The maximum transfer rate of this chip is 40mbps.
Since each bridge is connected to a RasPi board through USB hub and is active, simultaneous flashing of the SUTs can take place.
The concentrator runs an SSH server and doesn’t necessarily need to be connected to a private LAN. An SUT can thus be located away from the test server by configuring its concentrator to be accessed through the internet.
The Concentrator – SUT system
Please refer to the diagram (figure 2):
FT232H USB-Serial Bridge
“Operating at USB Hi-Speed 480Mbps rate, this fast single channel bridge chip features either a flexible serial interface or parallel FIFO interface, with data transfer speeds up to 40Mbytes/s. Using a serial EEPROM interface, this device can be configured for a wide variety of asynchronous and synchronous serial standards, such as JTAG, SPI, I2C and UART as well as synchronous and asynchronous parallel FIFO interfaces.… FTDI provides royalty-free virtual com port and D2XX drivers for Microsoft Windows (XP – Windows7), Apple Mac OSX, and Linux.” -http://www.ftdichip.com/Products/ICs/FT232H.htm
A 93LC56B serial EEPROM contains configuration data of the FT232H chip. The configuration includes operating mode as well as its USB device PID, VID and Serial number. By default, the serial number is empty. Serial number is important and should be programmed to be able to identify an SUT uniquely on the USB hub as well as the entire test environment.
A. open source tool has already been developed to program the serial number via USB:
It is inexpensive, has inbuilt USB interface and has open-source USB bootloaders too. It is also available in DIP-20 package. Once the USB bootloader is flashed it can be programmed via USB. An Arduino can be used as an ICSP for PIC microcontrollers to flash the USB bootloader and this is explained in the following link
It has 12 I/O pins (+1 input only) including 10 analog I/O which is sufficient for our purpose and it has plenty of room for adding more functionality in future.
By receiving commands and sending responses to the SUT it is able to perform the following functions:
1. Power SW, Reset SW control
2. Sense voltage lines through analog inputs
3. Read POST codes when requested if a POST module is connected
The POST module is a board that may be developed in future to get POST code or some form of feedback from the coreboot booting process.
The power-strip controller board would be powered from a powered USB port. The relay and LED pair should consume around 40mA each and 12 such relays would consume a total of less than 500mA. The MCU itself consumes around 1 mA.
The Programmable Power Strip
Please refer to the diagram (figure 3)
The power strip has an MCU that communicates with the Test Server using USB interface.
The MCU emulates a virtual serial port and listens to its RX line for command words from the server/or concentrator whichever it is connected to. It will send confirmation word when the action is completed. It basically acts as a switch disabler. When a turn off command is received it powers on the respective relay coil and since it is NC type relay it will disconnect the corresponding circuit. The relays are interfaced to the MCU using MOSFET inverters with feedback diodes for protection against negative spikes due to the inductance of relay coil.
Switches are provided to manually turn off loads. A switch is also provided to turn off the logic board. And if the logic board is turned off it will de-energize relay coils. So in this case the power strip would behave like an ordinary switch controlled power-strip.
In Test Server:
- Console application to issue commands to power strip. Returns 0 or the result if confirmation code or the result is received else a relevant error code.
- Software to connect to an SUT by resolving the given alias and connecting through SSH and forward the given command to it.
For this an alias management system has to be designed for binding aliases to:
- concentrator IP addresses and,
- Each SUT's serial number (stored in 93LC56B) and the ip address of the connected concentrator.
- Flashrom apparently supports FT232H flashing (http://flashrom.org/FT2232SPI_Programmer)
- A console application to issue commands to the controller board and receving data from the MCU
- A console application to program serial number into the 93LC56B EEPROM in the In Circuit Programmer boards.
In Controller board (PIC18F14K50 MCU):
- Controls MUX for SUT's firmware flash when programming is desired.
- Reads and sends (to concentrator) voltage sense, POST code data when a command is given.
- Controls the RST and PWR switches as per commands received.
In Power Strip (PIC18F14K50 MCU)
A simple command line interface program to send control words to the microcontroller to control relays and receive feedback.
|File name||Size||Date submitted|
|Ayush_Sagar.tar.bz2||9.4 MB||October 11 2013 18:54 UTC|