buildroot/board/zynqmp/kria
Neal Frager 6c060f3d1a board/zynqmp/kria/readme.txt: add usb start
When halting the boot process in u-boot, the 'usb start' command does not
automatically run.  Since the SD card is connected over a USB to SD card
bridge on the kd240 and kr260 boards, the readme.txt instructions should
document that the 'usb start' command needs to be manually enterred when
following the reflashing instructions.  Otherwise, the command to read the
boot.bin and u-boot.itb files from the SD card will fail.

Signed-off-by: Neal Frager <neal.frager@amd.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit e02e59d124647af71b30eb224a78b53e77db61f5)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-12-06 20:49:50 +01:00
..
kd240 configs/zynqmp_kria_kd240_defconfig: new defconfig 2023-12-16 10:48:23 +01:00
kr260 configs/zynqmp_kria_kr260_defconfig: new defconfig 2023-12-03 19:22:55 +01:00
kv260 configs/zynqmp: bump to xilinx-v2023.1 2023-08-06 17:39:15 +02:00
readme.txt board/zynqmp/kria/readme.txt: add usb start 2024-12-06 20:49:50 +01:00
uboot.fragment board/zynqmp/kria/uboot.fragment: remove unnecessary configs 2023-01-27 11:22:09 +01:00

readme.txt

**************************************************
Xilinx Kria SOM Starter Kits - ZynqMP SoC
**************************************************

This document describes the Buildroot support for the Kria KD240,
KR260 and KV260 starter kits by Xilinx, based on Kria SOM including the
Zynq UltraScale+ MPSoC (aka ZynqMP).  It has been tested with 
the KD240, KR260 and KV260 production boards.

Evaluation board features can be found here with the links below.

KD240:
https://www.xilinx.com/products/som/kria/kd240-drives-starter-kit.html

KR260:
https://www.xilinx.com/products/som/kria/kr260-robotics-starter-kit.html

KV260:
https://www.xilinx.com/products/som/kria/kv260-vision-starter-kit.html

How to build it
===============

Configure Buildroot: (use the command for the specific board)

    $ make zynqmp_kria_kd240_defconfig
    $ make zynqmp_kria_kr260_defconfig
    $ 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.

How to write boot.bin and u-boot.itb to QSPI boot flash
=======================================================

The Kria SOMs are preconfigured to boot initially from QSPI.
This makes these boards different from other ZynqMP boards
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.

In addition, the Kria Starter Kits QSPI comes pre-flashed with
a utility designed to make updating the QSPI flash memory
easier.

Instructions for using these utilities to update the files
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

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
commands below.

KV260 Flashing Instructions:
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

KD240 / KR260 Flashing Instructions:
Flashing u-boot.itb:
    $ usb start
    $ sf probe
    $ fatload usb 0 0x1000000 u-boot.itb
    $ sf erase 0xf80000 +$filesize
    $ sf write 0x1000000 0xf80000 $filesize

Flashing boot.bin:
    $ usb start
    $ sf probe
    $ fatload usb 0 0x1000000 boot.bin
    $ sf erase 0x200000 +$filesize
    $ sf write 0x1000000 0x200000 $filesize

It is possible to boot the Buildroot generated SD card image without
updating the QSPI boot.bin image, so this is an optional step.