Tims minnowboard test provisioning

Tim is (in early 2018), trying to come up with a provisioning system for the Minnowboard turbot in his lab.

He put out a request for information on the automated-testing e-mail list, and got back lots of options. See https://lists.yoctoproject.org/pipermail/automated-testing/2018-January/subject.html#152

Here is an evaluation of those options, along with his own test experiences setting this up for his lab:

= principles =
 * If possible to avoid hardware, that would be good.
 * I don't mind special hardware
 * I want to boot the machine for testing as similar to how it will be used in production as possible
 * This means that automatic boot from sdcard is preferable to network boot, or especially boot with network filesystem.
 * fewer package dependencies is better
 * fewer runtime host dependencies is better

= issues =
 * the default configuration of the board is to boot using grub, from the sdcard
 * the default control of booting is via hdmi screen and keyboard
 * how easy is it to configure grub to be usable over serial console (I'd rather not)
 * can you control this with timing?
 * boot to stable kernel as default
 * boot to kernel under test using keystrokes (to USB?)

host-controlled USB keyboard options
One way to control boot would be with a host-controlled USB keyboard. That is, use a device that allows the host computer to send keystrokes through the USB port.

Here are some options:
 * use a network-connected USB keyboard?
 * one person made a Raspberry Pi Zero act like a USB keyboard (https://www.raspberrypi.org/forums/viewtopic.php?t=151940)
 * use a web-connected KVM (with USB and video?)
 * This one looks interesting: Lantronix Spider KVM
 * Information: https://www.lantronix.com/products/lantronix-spider (Note that the video is VGA, not HDMI)
 * kind of pricey ($392) http://store.lantronix.com/product_p/sls200usb0-01.htm
 * use a Teensy board, connected to the host via USB-serial
 * https://github.com/Flowm/etherkey
 * use hagstrom electronics ASCII to USB keyboard/mouse cable, or RS-232 to USB keyboard/mouse cable
 * https://www.hagstromelectronics.com/usb-asc232-shp.html $89
 * https://www.hagstromelectronics.com/usb-km232-protocol-converter-shp.html $89

= suggestions =
 * use LAVA, with network download of kernel and ramdisk (suggested by Matt Hart)
 * No specifics were mentioned
 * Collabora is using LAVA on a Minnowboard. An example usage is here:
 * https://lava.collabora.co.uk/scheduler/job/105394
 * use labgrid and SD-USB-Mux (suggested by Robert Schwebel)
 * SD-USB-Mux info at: https://www.pengutronix.de/en/2017-10-23-usb-sd-mux-automated-sd-card-juggler.html
 * use ci-rt project stuff for this (suggested by Thomas Gleixner)
 * supports debian-packaged kernels - good for kbuild?
 * presumably this uses r4d for low-level board control, and libvirt and
 * r4d requires sqlite3 python-sqlalchemy python-pysimplesoap snimpy snmp-mibs-downloader
 * daemon must be running at all times (ugh)
 * presumably starts new kernel using kexec
 * does it support non-x86_64? What platforms support kexec?
 * use efi network boot of grub, then temp kernel and initramfs to write to USB, then reboot to grub again and boot
 * not sure if this uses serial console grub (probably)
 * uses efi network boot and dnsmask to deliver grub to target
 * uses LAVA to control grub for both boots
 * NOTE: this one actually provisions something

= overview of provisioning/booting options =
 * install kernel to SD card, boot from grub (kernel selection at boot)
 * install kernel to USB flash, boot from grub (kernel selection at boot?)
 * install kernel to host, boot from network
 * install kernel to target fs, kexec boot from local file

= action items =
 * get an SD-USB-Mux for testing from Robert Schwebel
 * can a wireless SD card be used for this?
 * find out if r4d relies on kexec support
 * find out if configuring grub for serial port control requires rebuilding grub
 * test grub with serial control
 * see if LAVA grub control can be separated from rest of LAVA
 * see if temp kernel and initramfs for writing to SD card or USB already exist
 * see if scripts for
 * find out about efi network boot
 * find out about grub serial console
 * find out about dnsmasq

= Completed action items =
 * find out what sispmctl is - used by: https://energenie4u.co.uk/catalogue/product/ENER011
 * Answer: a program (available as a Debian package) specifically for controlling this product