Skip to content

Commit ba1c8ec

Browse files
committed
Add initial readme for AMD Xilinx Kria KR260
Signed-off-by: the-snowwhite <[email protected]>
1 parent 5042a4e commit ba1c8ec

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
## Running machinekit-hal on the Kria KR260 board
2+
3+
First Iteration of the KR260 port runs on the Xilinx Ubuntu Desktop 22.04 LTS from Canonical:
4+
https://ubuntu.com/download/amd-xilinx
5+
6+
## Docker based build image for building custom bitfiles:
7+
8+
docker pull thesnowwhite/bionic-vivado-sdk:2022.2
9+
sudo mkdir /tftpboot
10+
/usr/bin/docker run --rm --privileged --memory 48g --shm-size 1g --device /dev/snd -itv $(pwd):/work -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --net=host -e TZ=Europe/Copenhagen -v $HOME/.Xauthority:/home/vivado/.Xauthority -v $HOME/.Xresources:/home/vivado/.Xresources -v $HOME/.Xilinx:/home/vivado/.Xilinx -v /tftpboot:/tftpboot --name xilinx-sdk bionic-vivado-sdk:2022.2 /bin/bash
11+
12+
## To enable running hostmot2 based machinekit-hal the mksocfpga fpga firmware can be auto loaded
13+
14+
15+
wget
16+
17+
sudo mkdir -p /lib/firmware/xilinx/machinekit
18+
sudo cp kr260_xck26.bit kria_kr260_xck26_ol.dtbo /lib/firmware/xilinx/machinekit
19+
20+
sudo sh -c 'cat <<EOF > "/lib/firmware/xilinx/machinekit/shell.json"
21+
{
22+
"shell_type" : "XRT_FLAT",
23+
"num_slots": "1"
24+
}
25+
EOF'
26+
27+
sudo sh -c 'cat <<EOF > "/etc/dfx-mgrd/default_firmware"
28+
machinekit
29+
EOF'
30+
31+
## Until the machinekit-hal cloudsmith Jammy packages get online the debs are provided here:
32+
33+
wget
34+
35+
Then install the following packages:
36+
37+
sudo apt install ./machinekit-hal_0.5.21099-1.git2c2ff0e51~jammy_arm64.deb \
38+
./libmachinekit-hal_0.5.21099-1.git2c2ff0e51~jammy_arm64.deb \
39+
40+
41+
42+
43+
## Hal is then invoked with:
44+
45+
halrun -I
46+
47+
loadrt hostmot2
48+
newinst hm2_soc_ol hm2-socfpga0 already_programmed=1 -- config="num_pwmgens=3 num_stepgens=6"
49+
50+
exit
51+
52+
## To check what happened in the log:
53+
54+
cat /var/log/syslog | grep 'rtapi\|msgd'
55+
56+
57+
## The syslog can be cleared with:
58+
59+
sudo sh -c 'echo "" > /var/log/syslog'

0 commit comments

Comments
 (0)