USB Experiments (KV260)

A small adventure

February 1, 2025 — posted by  profile icon Aaron H.

USB Experiments With My AMD Kria KV260

As an owner of an AMD Kria KV260 board, I've been on a hell-bent on finding a more reliable alternative to crappy NAND (USB drives, SD cards) for 24/7 use. Just thought I'd leave some notes with respect to some of the tests that I've run on this board—hopefully it should save you/a friend some time.

Preamble

I began by going through AMD's documentation, which states that the Kria KV260 (starter board) has only one officially supported boot method (SD card). It also supports USB drives, which I confirmed with a cheap-o Kingston DataTraveler. Though, as mentioned previously: this was more of a stop-gap sol., and I found myself revisiting the issue with my USB drive on its last legs. Just to get things to boot, I temporarily re-installed the SD card that I'd originally used with the board, and fired it up.

This brings me to the elephant in the room: USB SATA enclosures. Some support UASP, some don't—they all seem to have a hodgepodge of different features (some SSD enclosures being sold don't even have TRIM!). Anyway, the board makes it very clear to you when it doesn't like a particular SSD (SATA) enclosure. For those enclosures, booting requires attaching your device a serial port, restarting the USB controller, and waiting patiently for the USB device list to re-enumerate.

Tested SATA Enclosures

In all, I've tested 3 SATA enclosures:

Device/Model Name Vendor USB/SATA Bridge (Controller) Ordered From Working?
"KingData" ENC3A11 Realtek Semiconductor RTL9201 Amazon.ca NO1
"Orico" 25PW1 JMicron Technology Corp. JMS576 CanadaComputers.com NO1
"UGREEN" 50743 ASMedia ASM235CM Amazon.ca YES

The latter (ASMedia) enclsoure was something I stumbled upon on James Chambers' site (which has a helpful article abt. USB-SATA boot compatibility for RPi CM4). Interestingly, this sort of coincided with my experience w/ the Kria KV260 (ARM)—ASMedia drives seemed to have the highest success rate for USB boot.

At Last

After having burned through two other enclosures, I stumbled across the last tested enclosure (based on the ASM235). I formatted the drive, "dd"'ed the contents of my KV260's SD card over, and plugged it in. I was finally able to get past the bootloader, into Linux:

root@kria:~# lsusb 
Bus 002 Device 004: ID 174c:235c ASMedia Technology Inc. Ugreen Storage Device 

Even more exciting was the boot screen (over serial):

CLI output from KV260 serial showing a USB device has been detected

Final Thoughts

Well, as usual—with the right hardware (USB-SATA enclosure), it's perfectly possible to boot the AMD Kria KV260 from a USB-SATA bridge (without having to tamper with the SOM itself, and adding your own SATA compat.). Theoretically, you could run a NAS/the like with the board, but I wouldn't recommend it. The SOM included w/ the Kria board only has 4 GB of memory (RAM), so you won't be doing anything super intensive here.

TL;DR: I'd recommend trying an ASM235-based enclosure, or checking out James' community-created compatibility list. Now, I get to run my small logging server, 24/7 :-)

No more plugging into serial, setting the baud rate to 115200, and manually resetting the USB controller in the bootloader just to boot from an attached SSD!

Added Bonus: YABS (Yet-Another-Benchmark-Script)

To test stability (mainly for the USB enclosure), I ran a quick yabs.sh to stress the system:

root@kria:~# curl -sL https://yabs.sh | bash -s -- -g
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
#              Yet-Another-Bench-Script              #
#                     v2025-01-01                    #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #

Sun Feb  2 03:52:43 UTC 2025

ARM compatibility is considered *experimental*

Basic System Information:
---------------------------------
Uptime     : 0 days, 0 hours, 6 minutes
Processor  : Cortex-A53
CPU cores  : 4 @ 1333.3330 MHz
AES-NI     : ✔ Enabled
VM-x/AMD-V : ❌ Disabled
RAM        : 3.8 GiB
Swap       : 0.0 KiB
Disk       : 938.9 GiB
Distro     : Ubuntu 22.04.5 LTS
Kernel     : 5.15.0-1041-xilinx-zynqmp
VM Type    : NONE
IPv4/IPv6  : ✔ Online / ❌ Offline

IPv4 Network Information:
---------------------------------
ISP        : Bell Canada
ASN        : AS577 Bell Canada
Host       : Sympatico HSE
Location   : Toronto, Ontario (ON)
Country    : Canada

fio Disk Speed Tests (Mixed R/W 50/50) (Partition /dev/sda2):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 68.70 MB/s   (17.1k) | 101.13 MB/s   (1.5k)
Write      | 68.66 MB/s   (17.1k) | 104.14 MB/s   (1.6k)
Total      | 137.37 MB/s  (34.3k) | 205.28 MB/s   (3.2k)
           |                      |
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 129.11 MB/s    (252) | 141.96 MB/s    (138)
Write      | 140.16 MB/s    (273) | 158.39 MB/s    (154)
Total      | 269.27 MB/s    (525) | 300.36 MB/s    (292)

iperf3 Network Speed Tests (IPv4):
---------------------------------
Provider        | Location (Link)           | Send Speed      | Recv Speed      | Ping
-----           | -----                     | ----            | ----            | ----
Clouvider       | London, UK (10G)          | 1.64 Gbits/sec  | 629 Mbits/sec   | 103 ms
Eranium         | Amsterdam, NL (100G)      | 1.18 Gbits/sec  | 1.62 Gbits/sec  | 111 ms
Uztelecom       | Tashkent, UZ (10G)        | 995 Mbits/sec   | 355 Mbits/sec   | 210 ms
Leaseweb        | Singapore, SG (10G)       | 653 Mbits/sec   | 635 Mbits/sec   | 262 ms
Clouvider       | Los Angeles, CA, US (10G) | 1.77 Gbits/sec  | 1.19 Gbits/sec  | 73.7 ms
Leaseweb        | NYC, NY, US (10G)         | 1.77 Gbits/sec  | 1.91 Gbits/sec  | 21.9 ms
Edgoo           | Sao Paulo, BR (1G)        | 1.17 Gbits/sec  | 510 Mbits/sec   | 155 ms

YABS completed in 3 min 51 sec
Footnotes
  1. Working = NO: When an SSD is recognized after the USB controller is reset in the bootloader.