Board Provisioning Notes

From eLinux.org
Revision as of 10:06, 15 October 2019 by Tim Bird (talk | contribs) (Created page with "This page has notes about "board provisioning", which is the process by which the software under test gets installed onto or made available to the board under test. The board...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page has notes about "board provisioning", which is the process by which the software under test gets installed onto or made available to the board under test.

The board provisioning layer is responsible for instantiating the software on the device under test. This is a critical element of test automation. The wide variety of execution models, firmwares and hardware configurations, make it a challenge to create a generalized provisioning system. Essentially, the different variables or choices involved in provisioning make for an N-dimensional matrix of possibilities for solving the problem.


There are several different elements which might be involved in provisioning.

  • firmware or bootloader
  • kernel image
  • rootfs image
  • board power control
  • board button control
  • bus or network

It is very often the case that a particular lab or provisioning framework will require some specific element to be fixed. That is, for a particular dimension, the lab or framework does not provide any degrees of freedom, or they limit the degrees of freedom. This makes it hard to compare systems, or integrate them into a single framework.

provisioning styles

network-based

  • pxe-based boot
    • apply power, and firmware loads kernel image from network (using pxe)
    • presumably the rootfs also comes from the network (e.g. using NFS)
  • tftp-based boot
    • apply power, and firmware loads kernel image from network (using tftp)
    • presumably the rootfs also comes from the network (e.g. using NFS)

bus-based

  • android
    • uses fastboot to provide RAM-based kernel image

issues

  • power control - ability to reboot the board (or instantiate a virtual machine)
    • every provisioning system requires instantiating new software, which means booting with a different image
    • some provisioning systems require booting multiple times - once to enter a provisioning mode, and once to boot the software under test
  • button control - ability to press or hold buttons while a board boots
    • some hardware requires entering a special mode for provisioning, that is only accessible by holding buttons down or pressing buttons during boot
  • firmware control - ability to navigate menus or make selections in a firmware interface, during the provisioning process
    • requires expect-like functionality in order to make this generalizable
    • this might be done over USB (simulated keyboard), or serial port (using serial console)
    • some firmware is modal, requiring one mode for provisioning and a different mode for booting
  • networking - ability to transfer images to the board during provisioning
  • USB - ability to use USB during provisioning operations
    • this might involve image transfer, firmware contro and/or status and error detection
  • serial port - ability to use USB or serial for provisioning operations
    • this might involve image transfer, firmware control and/or status and error detection
  • status and error detection - ability to detect the power, network, bus, hardware, firmware, installation and/or operational status of a device, during provisioning

what's missing

  • generic expect
  • hardware control of buttons

a generic model of provisioning

Here are the steps for a generic provisioning model. This is one where the machine is taken from an unprovisioned state, to one where the device is provisioned and opearting with the new software. In order to be generic, this includes many operations which might not be required for the provisioning of a particular specific system.

Steps:

1. transfer images to host transfer area
1.1 (eg. put image into tftp boot area)
1.2 (eg. put rootfs into nfs hosting area)
2. get into provisioning mode
2.1 turn power off
2.2 turn power on
2.3 apply hardware control (button holds or presses) required to enter provisioning mode
2.4 interact with firmware to enter provisioning mode (select menus or provide inputs)
2.5 interact with hardware during provisioning mode (e.g. depress and release buttons)
2.6 transfer images to device
2.6.1 transmit image
2.6.2 detect image transfer complete
3. get into software execution mode
3.1 turn power off
3.2 turn power on
3.3 apply hardware control (button holds or presses) required to enter execution mode
3.4 interact with firmware to enter execution mode (select menus or provide inputs)
3.5 interact with hardware to enter execution mode
3.6 detect execution mode entered