DAFT
Automated Flasher Tester
Install / Use
/learn @intel/DAFTREADME
Distributed Automatic Flasher Tester (DAFT)
Contents
- Overview
- 1.1. DAFT setup
- 1.2. How it works
- Creating DAFT setup
- 2.1 Required hardware
- 2.2 BBB booting overview
- 2.3 Setting up BeagleBone Black and DUT filesystems on the host PC
- 2.4 Configuring host PC
- 2.4.1 Secondary network interface
- 2.4.2 DHCP server
- 2.4.3 TFTP server
- 2.4.4 NFS server
- 2.4.5 NTP server
- 2.4.6 Changing BBB filesystem permissions
- 2.4.7 Changing NFS workspace that BBB and DUT support image will mount
- 2.4.8 Install and configure DAFT software
- 2.5 Setting BeagleBone Black to boot from NFS
- 2.6 Setting up relay
- 2.7 Connecting hardware
- 2.8 Setting up DUT
- 2.9 Using DAFT
- 2.10 Adding more devices
- DAFT and AFT settings and commandline interface
- 3.1 DAFT settings
- 3.2 DAFT commandline interface
- 3.3 AFT settings
- 3.4 AFT commandline interface
- 3.5 Detailed DAFT run
- Creating BeagleBone Black filesystem for NFS
- Creating support image for DUT
- Troubleshooting
- 6.1 PC to BBB serial connection
- 6.2 Beaglebone Black booting
- 6.3 DHCP problems
- 6.4 TFTP problems
- 6.5 NFS problems
1. Overview
DAFT hardware setup.
DAFT (Distributed Automatic Flasher Tester) is a tool for automated flashing and testing of an OS image on a real device. Its goal is to both standardize and simplify the testing on a variety of devices, while keeping minimal the cost and the complexity of the setup. In particular, it strives to use only inexpensive off-the shelf hardware components and to keep one single configuration that can be used by both large testing farms and individual testers/developers. This guide explains how to setup and use DAFT. Note that this guide was written for Ubuntu so you might have to do additional steps in other distributions.
1.1 DAFT setup
DAFT setup consists of a PC, Beaglebone black(s) (BBB) and device(s) under test (DUT). Role of the BBB is to control the DUT so flashing and testing can be done. Every DUT in the setup needs one BBB to control it. BBB has the ability to emulate keyboard, mass storage and ethernet device at the same time through one USB OTG port. It also has different kinds of input/output pins like GPIO and I2C which enables lots of possibilities with testing. For example at the time of writing GPIO pins are used to control a relay that is used to turn the DUT on/off. Role of the PC is to control the BBBs and to provide them the image to be flashed and tested. PC also provides BBBs the filesystem that they boot from using NFS and TFTP.
DAFT is also split code wise with testing_harness including the code BBB uses and pc_host including the code the PC uses. The program that BBB uses is called AFT (Automatic Flasher Tester) and the program that the PC uses is DAFT.
1.2 How it works
At the highest level DAFT is called from the command line with the device type and the image file to be tested as its arguments:
daft joule os-image.img
DAFT will then procede to flash the image to the device. After that has been done successfully the new image is booted and tests are executed. Tests aren't strictly part of DAFT but rather DAFT includes tools and libraries to interact with the device so own test can be written or existing test suites can be integrated.
2. Creating DAFT setup
Fewest mandatory steps to create DAFT setup with one device under test (DUT) and BeagleBone Black (BBB):
- Get required hardware
- BBB booting overview
- Setting up BeagleBone Black and DUT filesystems on the PC
- Configure host PC
- Set BeagleBone Black to boot from NFS
- Set up relay
- Connect hardware together
- Set up DUT
- Use DAFT
When the setup has been completed check the section on adding more devices.
2.1 Required hardware
1. USB to USB-mini cable 2. BeagleBone Black 3. Micro SD card 4. USB-Serial cable
5. Ethernet cable 6. BBB power supply 7. DUT power supply 8. Power jack extension
cable 9. Relay 10. Dupont cables 11. DUT (Minnowboard MAX) 12. Micro SD card
13. Secondary network interface 14. Ubuntu PC
List of hardware needed for DAFT setup:
- PC preferably with Ubuntu
- Other distros should work also but this guide is written using Ubuntu
- Secondary network interface for PC if it doesn't have one
- Easiest option is USB ethernet adapter, cheapest is PCI network card
- BeagleBone Black
- Micro SD card for BBB U-Boot (optional)
- Ethernet cable
- USB to USB-mini cable
- BeagleBone Black should come with one
- USB-serial cable (recommended)
- Used for debugging BBB/DUT or for recording serial data from DUT
- Device to test with: Joule or Minnowboard MAX/Turbot
- If DUT is Minnowboard (it has no internal storage), micro SD card or USB stick is required so testable image can be flashed to it
- Power supplies for BBB and DUT
- GPIO controllable relay
- BBB GPIO pin output is 3.3V and max 6mA, VDD pins are 5V/3.3V 250mA, so relay has to be operable within those limits
- Relay with and amplifier in the input would be preferred so BBB GPIO pin doesn't have to drive the coil
- 3x Dupont cables to connect relay to BBB
- DC plug extension cable (recommended)
- So you don't have to cut power supply cable
- Flat extension cables that have easily separable ground and DC cables are recommended
At the time of writing only Joule and Minnowboard MAX/Turbot are supported as DUT but any PC like device with BIOS should work with small tweaks. Older version of the setup was also tested to work with Gigabyte NUC, Intel Edison, BeagleBone Black and Intel Galileo V2 but they might require some work on the BeagleBone filesystem to make them work.
2.2 BBB booting overview
This section will give you an overview of the BBB booting components, boot sequence and how it relates to the PC Host. This should give you a good understanding of why we need to setup various different services and what is their role.

BeagleBone Black booting with the PC Host.
The above diagram shows the general steps when setting up the BBB and booting it:
- Connect the PC Host to the BBB via serial.
- Get an IP adress for the BBB from the DHCP server.
- Get the BBB bootsystem kernel via TFTP. The BBB will fetch the bootsystem kernel from the PC Host via TFTP.
- BBB executes the kernel, which is the bootsystem core and is needed to be able to boot the rest of the system via NFS.
- Boot the rest of the system via NFS.
2.3 Setting up BeagleBone Black and DUT filesystems on the host PC
Here we will set up the filesystems for BBB and DUT support image. The filesystems will be made available via NFS, which we will set up in sections 2.4 to 2.5.
2.3.1 Setting up BeagleBone Black filesystem on NFS
If you don't have a BBB filesystem for NFS you can make a BBB filesystem for NFS from scratch. If you have a ready made one you can use it with the following commands
<pre> mkdir /daft cd /daft sudo wget address-to-bbb-fs sudo tar -xzf <b>bbb_fs.tar.gz</b> </pre>If your bbb_fs folder has a different name than bbb_fs it is helpful to rename it to bbb_fs.
2.3.2 Setting up DUT support image
If you don't have a DUT support image yet you can make one by navigating to Creating support image for DUT. If you have a DUT support image you can simply move the support_image.img to /daft/support_img/ folder on your host PC.
<pre> mkdir /daft/support_img sudo mv <b>address-to-image</b>/support_image.img /daft/support_img/ </pre>2.4 Configuring host PC
In this section, we set up the necessary services to enable the devices to communicate with and access files on the host PC. The phases here correspond to [BBB boot
