@@ -2161,6 +2161,7 @@ F: package/pkg-qmake.mk
F: package/qt5/qt5opcua/
N: Neal Frager <neal.frager@amd.com>
+F: board/versal/
F: board/zynq/
F: board/zynqmp/
F: board/zynqmp/kria/
new file mode 100644
@@ -0,0 +1,30 @@
+image boot.vfat {
+ vfat {
+ files = {
+ "boot.bin",
+ "system.dtb",
+ "Image"
+ }
+ file extlinux/extlinux.conf {
+ image = extlinux.conf
+ }
+ }
+
+ size = 32M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ }
+}
new file mode 100755
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# genimage will need to find the extlinux.conf
+# in the binaries directory
+
+BOARD_DIR="$(dirname $0)"
+CONSOLE=$2
+ROOT=$3
+
+mkdir -p "${BINARIES_DIR}"
+cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
+ label linux
+ kernel /Image
+ devicetree /system.dtb
+ append console=${CONSOLE} root=/dev/${ROOT} rw rootwait
+ __HEADER_EOF
new file mode 100755
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# By default U-Boot loads DTB from a file named "system.dtb", so
+# let's use a symlink with that name that points to the *first*
+# devicetree listed in the config.
+
+FIRST_DT=$(sed -nr \
+ -e 's|^BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/([-_/[:alnum:]\\.]*).*"$|\1|p' \
+ ${BR2_CONFIG})
+
+[ -z "${FIRST_DT}" ] || ln -fs ${FIRST_DT}.dtb ${BINARIES_DIR}/system.dtb
+
+BOARD_DIR="$(dirname $0)"
+
+support/scripts/genimage.sh -c $BOARD_DIR/genimage.cfg
new file mode 100644
@@ -0,0 +1,54 @@
+******************************************
+Xilinx VCK190 board - Versal
+******************************************
+
+This document describes the Buildroot support for the VCK190
+board by Xilinx, based on Versal. It has been tested with the
+VCK190 production board.
+
+Evaluation board features can be found here with the link below.
+
+VCK190:
+https://www.xilinx.com/products/boards-and-kits/vck190.html
+
+
+How to build it
+===============
+
+Configure Buildroot:
+
+ $ make versal_vck190_defconfig
+
+Compile everything and build the rootfs image:
+
+ $ make
+
+Result of the build
+-------------------
+
+After building, you should get a tree like this:
+
+ output/images/
+ +-- boot.bin
+ +-- boot.vfat
+ +-- Image
+ +-- rootfs.ext2
+ +-- rootfs.ext4 -> rootfs.ext2
+ +-- sdcard.img
+ +-- system.dtb -> versal-vck190-rev1.1.dtb
+ `-- versal-vck190-rev1.1.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.
This patch adds board support for generating images for versal boards. Signed-off-by: Neal Frager <neal.frager@xilinx.com> --- DEVELOPERS | 1 + board/versal/genimage.cfg | 30 +++++++++++++++++++++ board/versal/post-build.sh | 16 +++++++++++ board/versal/post-image.sh | 15 +++++++++++ board/versal/readme.txt | 54 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 board/versal/genimage.cfg create mode 100755 board/versal/post-build.sh create mode 100755 board/versal/post-image.sh create mode 100644 board/versal/readme.txt