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.
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/
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):
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.
- 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.
Another solution would be a PCIe card with USB otg (or USB-C?) port, usable with g_mass_storage gadget, if it exists.
- 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
Add to the list:
- NVIDIA Jetson Nano
- Nanopi Neo2
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.
- 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
- Status changed from In Progress to Resolved
We have enough solutions to close this ticket.
Also available in: Atom
PDF