Getting Started with KV260
This document explains how to build, deploy, and boot the Cassini distro on Xilinx KV260 Platform.
Building KV260 Images
Note
When building on main
branch, the preparation script:
kas/scripts/generate_kv260_env.py
must be executed before attempting the following steps. This script
pins the SHAs for layers involved in KV260 build according to the
meta-ts base.yml to follow the same update pace as meta-ts.
One of the provided kas configuration files can be used to build images which target KV260:
kas/kv260-psa.yml
uses U-Boot as BL33, and has trusted-services.kas/kv260-edk2.yml
uses EDK-II as BL33, and has trusted-services.kas/kv260-ftpm.yml
uses U-Boot as BL33, and has fTPM, and no trusted-services.
These will be referred to below as <kv260-variant>
To build an image with default options for any variant:
kas build --update kas/cassini.yml:kas/<kv260-variant>.yml
Builds will produce the firmware images here:
build/tmp/deploy/images/<zynqmp-machine>/ImageA.bin
build/tmp/deploy/images/<zynqmp-machine>/ImageB.bin
and a Cassini distribution image here:
build/tmp/deploy/images/<zynqmp-machine>/cassini-image-base-<zynqmp-machine>.rootfs.wic.gz
build/tmp/deploy/images/<zynqmp-machine>/cassini-image-base-<zynqmp-machine>.rootfs.wic.bmap
where <zynqmp-machine> can be derived from this table:
<kv260-variant> |
<zynqmp-machine> |
---|---|
kv260-psa |
zynqmp-kria-starter-psa |
kv260-edk2 |
zynqmp-kria-starter-psa |
kv260-ftpm |
zynqmp-kria-starter |
For other build options, refer to Build System
Flashing the Firmware
Connect KV260 Ethernet port to the host machine
Power up the device while holding FWUEN button
In a browser, visit:
http://192.168.0.111/
, this will open Xilinx tool for flashing the firmwareUpload ImageA.bin and ImageB.bin
Reset the device
Note
The ethernet port on the host machine must be configured to have an IP address on the same network as
192.168.0.111
. For example:
IP address:
192.168.0.110
Subnet mask:
255.255.0.0
Flashing the Distro Image
Insert the SD card into the host machine
Check if the SD card is seen by the host machine via
lsblk
.
This will output, for example:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT <sd card> 179:0 0 16G 0 disk ├─p1 179:1 0 256M 0 part └─p2 179:2 0 512M 0 part
Flash the image onto the SD card using
bmap-tools
:
sudo bmaptool copy --bmap cassini-image-base-<zynqmp-machine>.rootfs.wic.bmap cassini-image-base-<zynqmp-machine>.rootfs.wic.gz /dev/<sd card>
Eject the SD card from the host machine, and insert it into KV260
Connecting to the serial port
Connect a cable between the USB port of the host machine and the micro-USB port of KV260 and then power on the device.
Check for new TTY USB devices detected by the host machine, via:
ls /dev/ttyUSB*
This will output, for example:
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3
ttyUSB1
is used for logs of both secure and non-secure sides.PMU uses one of the other ports, while the rest are not used at the moment.
Connect to the serial console using any terminal client (picocom, minicom, or screen should all work).
sudo picocom -b 115200 /dev/ttyUSB1