Project

General

Profile

Actions

action #60650

closed

coordination #60518: [functional][u][rpi][epic] Add support for real systems without IPMI or KVM-IP in openQA/os-autoinst

[functional][u][rpi] Add a system to flash a remote USB disk (and or µSD card) for generalhw backend

Added by ggardet_arm over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
New test
Target version:
-
Start date:
2019-12-04
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

To test real hardware (Raspberry Pi 3/4 would be the first targets), we need to flash a USB stick (or uSD card, or any storage) remotely.

The easiest way seems to use another board with USB OTG, connected to a USB host of the SUT, and attach the image to boot as a USB mass storage gadget to emulate a USB disk.
We need to:

  • Choose the hardware with a (working) USB OTG port, an Ethernet port and a (fast) storage big enough
  • Create script to automate the copy/clean-up and mount/umount of this image on USB OTG

Another solution could have been to use WiFi SD card such as Flash Air [1], but AFAIK:

  • there is no uSD version
  • you can copy files to FAT partition only
  • SD card must powered-up to be accessible, and the board would boot then.

[1] https://www.toshiba-memory.com/products/toshiba-wireless-sd-cards-flashair-w-04/

Actions #1

Updated by ggardet_arm over 4 years ago

Investigations on aarch64 hardware with an OTG port (usable as a peripheral to be able to connect to an host):

  • Raspberry Pi 4: need to check if the board could be powered from header pins and OTG port used to connect to USB host
  • HiKey960: USB support is not upstream yet https://en.opensuse.org/HCL:HiKey_960#Known_issues
  • NVIDIA Jetson Nano: USB OTG works fine on openSUSE Tumbleweed, with linux-next (kernel 5.4 has PCIe errors)
  • Nanopi Neo2: Need to check if USB OTG is compatible with external 5V and working on openSUSE

Some armv7 boards have a USB OTG port (usable as a peripheral to be able to connect to an host):

Actions #2

Updated by ggardet_arm over 4 years ago

We could also use a USB switch https://www.iogear.com/usb-switch.htm with a USB stick or USB HDD.
If the selection is manual, we would need to hack it to perform the switch from code (probably via a GPIO and a relay) and check the current input selected (GPIO or just check if present on "flasher" host or not, if only 2 hosts).

This should be tested to check if RPi3/4 can actually boot from a USB stick connected via this kind of system.

Actions #3

Updated by ggardet_arm over 4 years ago

Side notes:

Actions #4

Updated by ggardet_arm over 4 years ago

  • Status changed from New to In Progress

I used a BD-SL-i.MX6 board (formerly known as SabreLite) to mount a JeOS image on USB g_mass_storage gadget for RPi3. (*.raw.xz image is copied to SabreLite via SSH, the image is then uncompressed and mounted on USB gadget).
Raspberry Pi 3 does not boot directly from this USB mass storage gadget (RPi limitation?), so I flashed an SD card with only firmware files and u-boot. U-Boot uses grub, kernel, dtb and rootfs from USB.

Actions #5

Updated by ggardet_arm over 4 years ago

Another solution would be a PCIe card with USB otg (or USB-C?) port, usable with g_mass_storage gadget, if it exists.

Actions #6

Updated by mgriessmeier over 4 years ago

  • Subject changed from Add a system to flash a remote USB disk for generalhw backend to [functional][u][rpi] Add a system to flash a remote USB disk for generalhw backend
  • Assignee set to ggardet_arm
Actions #7

Updated by okurz over 4 years ago

  • Category set to New test
Actions #8

Updated by ggardet_arm about 4 years ago

Add to the list:

  • NVIDIA Jetson Nano
  • Nanopi Neo2
Actions #9

Updated by ggardet_arm about 4 years ago

According to Yousaf, usb gadget works fine on Jetson Nano with openSUSE Tumbleweed with kernel next-20200228 1 on Jetson nano. Kernel v5.4 has some PCIe errors.

Actions #10

Updated by ggardet_arm about 4 years ago

For systems unable to boot from USB, but are able to boot from µSD cards, I have been pointed to SDWire and SD_MUX boards which are open hardware.
There is also https://shop.linux-automation.com/index.php?route=product/product&product_id=50 which is probably more expensive and is not open hardware, but still has open source software.

Actions #11

Updated by ggardet_arm about 4 years ago

  • Subject changed from [functional][u][rpi] Add a system to flash a remote USB disk for generalhw backend to [functional][u][rpi] Add a system to flash a remote USB disk (and or µSD card) for generalhw backend
Actions #12

Updated by ggardet_arm about 4 years ago

  • Status changed from In Progress to Resolved

We have enough solutions to close this ticket.

Actions

Also available in: Atom PDF