2022-05-05 17:54:23 +02:00
|
|
|
**************************************************
|
|
|
|
Xilinx Kria SOM Starter Kits - ZynqMP SoC
|
|
|
|
**************************************************
|
|
|
|
|
2023-12-13 14:48:49 +01:00
|
|
|
This document describes the Buildroot support for the Kria KD240,
|
|
|
|
KR260 and KV260 starter kits by Xilinx, based on Kria SOM including the
|
2022-05-05 17:54:23 +02:00
|
|
|
Zynq UltraScale+ MPSoC (aka ZynqMP). It has been tested with
|
2023-12-13 14:48:49 +01:00
|
|
|
the KD240, KR260 and KV260 production boards.
|
2022-05-05 17:54:23 +02:00
|
|
|
|
2023-10-26 13:50:34 +02:00
|
|
|
Evaluation board features can be found here with the links below.
|
2022-05-05 17:54:23 +02:00
|
|
|
|
2023-12-13 14:48:49 +01:00
|
|
|
KD240:
|
|
|
|
https://www.xilinx.com/products/som/kria/kd240-drives-starter-kit.html
|
2023-10-26 13:50:34 +02:00
|
|
|
|
|
|
|
KR260:
|
|
|
|
https://www.xilinx.com/products/som/kria/kr260-robotics-starter-kit.html
|
2022-05-05 17:54:23 +02:00
|
|
|
|
2023-12-13 14:48:49 +01:00
|
|
|
KV260:
|
|
|
|
https://www.xilinx.com/products/som/kria/kv260-vision-starter-kit.html
|
|
|
|
|
2022-05-05 17:54:23 +02:00
|
|
|
How to build it
|
|
|
|
===============
|
|
|
|
|
2023-12-13 14:48:49 +01:00
|
|
|
Configure Buildroot: (use the command for the specific board)
|
2022-05-05 17:54:23 +02:00
|
|
|
|
2023-12-13 14:48:49 +01:00
|
|
|
$ make zynqmp_kria_kd240_defconfig
|
|
|
|
$ make zynqmp_kria_kr260_defconfig
|
2022-05-05 17:54:23 +02:00
|
|
|
$ make zynqmp_kria_kv260_defconfig
|
|
|
|
|
|
|
|
Compile everything and build the rootfs image:
|
|
|
|
|
|
|
|
$ make
|
|
|
|
|
|
|
|
Result of the build
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
After building, you should get a tree like this:
|
|
|
|
|
|
|
|
output/images/
|
|
|
|
+-- atf-uboot.ub
|
|
|
|
+-- bl31.bin
|
|
|
|
+-- boot.bin
|
|
|
|
+-- boot.vfat
|
|
|
|
+-- Image
|
|
|
|
+-- rootfs.ext2
|
|
|
|
+-- rootfs.ext4 -> rootfs.ext2
|
|
|
|
+-- sdcard.img
|
|
|
|
+-- system.dtb -> smk-k26-revA-sck-kv-g-revB.dtb
|
|
|
|
+-- u-boot.itb
|
|
|
|
`-- smk-k26-revA-sck-kv-g-revB.dtb
|
|
|
|
|
|
|
|
How to write the SD card
|
|
|
|
========================
|
|
|
|
|
|
|
|
WARNING! This will destroy all the card content. Use with care!
|
|
|
|
|
|
|
|
The sdcard.img file is a complete bootable image ready to be written
|
|
|
|
on the boot medium. To install it, simply copy the image to an SD
|
|
|
|
card:
|
|
|
|
|
|
|
|
# dd if=output/images/sdcard.img of=/dev/sdX
|
|
|
|
|
|
|
|
Where 'sdX' is the device node of the SD.
|
|
|
|
|
|
|
|
Eject the SD card, insert it in the board, and power it up.
|
|
|
|
|
2022-05-17 20:38:40 +02:00
|
|
|
How to write boot.bin and u-boot.itb to QSPI boot flash
|
|
|
|
=======================================================
|
2022-05-05 17:54:23 +02:00
|
|
|
|
|
|
|
The Kria SOMs are preconfigured to boot initially from QSPI.
|
|
|
|
This makes these boards different from other ZynqMP boards
|
2022-05-17 20:38:40 +02:00
|
|
|
in that the boot.bin and u-boot.itb files need to be flashed
|
|
|
|
into the QSPI boot flash such that U-Boot can then load all
|
|
|
|
of the remaining images from the SD card.
|
2022-05-05 17:54:23 +02:00
|
|
|
|
2023-12-13 14:48:49 +01:00
|
|
|
In addition, the Kria Starter Kits QSPI comes pre-flashed with
|
2022-05-05 17:54:23 +02:00
|
|
|
a utility designed to make updating the QSPI flash memory
|
|
|
|
easier.
|
|
|
|
|
2022-05-17 20:38:40 +02:00
|
|
|
Instructions for using these utilities to update the files
|
2022-05-05 17:54:23 +02:00
|
|
|
in QSPI flash can be found on the wiki link below.
|
|
|
|
|
|
|
|
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/1641152513/Kria+K26+SOM#Boot-Firmware-Updates
|
|
|
|
|
2022-05-17 20:38:40 +02:00
|
|
|
Additionally, it is possible to use u-boot for updating the
|
|
|
|
QSPI with new boot.bin and u-boot.itb images with the u-boot
|
2023-10-26 13:50:34 +02:00
|
|
|
commands below.
|
2022-05-17 20:38:40 +02:00
|
|
|
|
2023-10-26 13:50:34 +02:00
|
|
|
KV260 Flashing Instructions:
|
2022-05-17 20:38:40 +02:00
|
|
|
Flashing u-boot.itb:
|
|
|
|
$ sf probe
|
|
|
|
$ fatload mmc 1 0x1000000 u-boot.itb
|
|
|
|
$ sf erase 0xf80000 +$filesize
|
|
|
|
$ sf write 0x1000000 0xf80000 $filesize
|
|
|
|
|
|
|
|
Flashing boot.bin:
|
|
|
|
$ sf probe
|
|
|
|
$ fatload mmc 1 0x1000000 boot.bin
|
|
|
|
$ sf erase 0x200000 +$filesize
|
|
|
|
$ sf write 0x1000000 0x200000 $filesize
|
|
|
|
|
2023-12-13 14:48:49 +01:00
|
|
|
KD240 / KR260 Flashing Instructions:
|
2023-10-26 13:50:34 +02:00
|
|
|
Flashing u-boot.itb:
|
|
|
|
$ sf probe
|
|
|
|
$ fatload usb 0 0x1000000 u-boot.itb
|
|
|
|
$ sf erase 0xf80000 +$filesize
|
|
|
|
$ sf write 0x1000000 0xf80000 $filesize
|
|
|
|
|
|
|
|
Flashing boot.bin:
|
|
|
|
$ sf probe
|
|
|
|
$ fatload usb 0 0x1000000 boot.bin
|
|
|
|
$ sf erase 0x200000 +$filesize
|
|
|
|
$ sf write 0x1000000 0x200000 $filesize
|
|
|
|
|
2022-05-05 17:54:23 +02:00
|
|
|
It is possible to boot the Buildroot generated SD card image without
|
|
|
|
updating the QSPI boot.bin image, so this is an optional step.
|