Initial Commit
- initial default booting image
This commit is contained in:
30
board/versal/genimage.cfg
Normal file
30
board/versal/genimage.cfg
Normal file
@@ -0,0 +1,30 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"boot.bin",
|
||||
"system.dtb",
|
||||
"Image"
|
||||
}
|
||||
file extlinux/extlinux.conf {
|
||||
image = extlinux.conf
|
||||
}
|
||||
}
|
||||
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
1
board/versal/post-build.sh
Symbolic link
1
board/versal/post-build.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
../zynqmp/post-build.sh
|
||||
33
board/versal/post-image.sh
Executable file
33
board/versal/post-image.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/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:]\\.]*).*"$|\2|p' \
|
||||
"${BR2_CONFIG}")
|
||||
|
||||
[ -z "${FIRST_DT}" ] || ln -fs "${FIRST_DT}.dtb" "${BINARIES_DIR}/system.dtb"
|
||||
|
||||
BOARD_DIR="$(dirname "$0")"
|
||||
|
||||
cat <<-__HEADER_EOF > "${BINARIES_DIR}/bootgen.bif"
|
||||
the_ROM_image:
|
||||
{
|
||||
image {
|
||||
{ type=bootimage, file=${BINARIES_DIR}/boot.pdi }
|
||||
{ type=bootloader, file=${BINARIES_DIR}/plm.elf }
|
||||
{ core=psm, file=${BINARIES_DIR}/psmfw.elf }
|
||||
}
|
||||
image {
|
||||
id = 0x1c000000, name=apu_subsystem
|
||||
{ type=raw, load=0x00001000, file=${BINARIES_DIR}/u-boot.dtb }
|
||||
{ core=a72-0, exception_level=el-3, trustzone, file=${BINARIES_DIR}/bl31.elf }
|
||||
{ core=a72-0, exception_level=el-2, file=${BINARIES_DIR}/u-boot.elf }
|
||||
}
|
||||
}
|
||||
__HEADER_EOF
|
||||
|
||||
"${HOST_DIR}/bin/bootgen" -arch versal -image "${BINARIES_DIR}/bootgen.bif" -o "${BINARIES_DIR}/boot.bin" -w on
|
||||
support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"
|
||||
112
board/versal/readme.txt
Normal file
112
board/versal/readme.txt
Normal file
@@ -0,0 +1,112 @@
|
||||
This document describes the Buildroot support for the following
|
||||
Xilinx Versal boards:
|
||||
|
||||
******************************************
|
||||
Supported Versal Boards:
|
||||
Xilinx VCK190 board
|
||||
Xilinx VEK280 board
|
||||
Xilinx VPK120 board
|
||||
Xilinx VPK180 board
|
||||
******************************************
|
||||
|
||||
Evaluation board features can be found here with the links below.
|
||||
|
||||
VCK190:
|
||||
https://www.amd.com/en/products/adaptive-socs-and-fpgas/evaluation-boards/vck190.html
|
||||
|
||||
VEK280:
|
||||
https://www.amd.com/en/products/adaptive-socs-and-fpgas/evaluation-boards/vek280.html
|
||||
|
||||
VPK120:
|
||||
https://www.amd.com/en/products/adaptive-socs-and-fpgas/evaluation-boards/vpk120.html
|
||||
|
||||
VPK180:
|
||||
https://www.amd.com/en/products/adaptive-socs-and-fpgas/evaluation-boards/vpk180.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.
|
||||
|
||||
Support for other boards:
|
||||
=========================
|
||||
|
||||
If you want to build a system for other boards based on the same SoC, and the
|
||||
board is already supported by the upstream kernel, U-Boot, and
|
||||
xilinx-prebuilt, you simply need to change the following Buildroot options:
|
||||
|
||||
- Kernel Device Tree file name (BR2_LINUX_KERNEL_INTREE_DTS_NAME)
|
||||
- U-Boot (BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=<dts file name>")
|
||||
- xilinx-prebuilt (BR2_TARGET_XILINX_PREBUILT_BOARD)
|
||||
|
||||
Custom versal board support:
|
||||
|
||||
To generate a boot.bin image, Versal boards require a PDI (Programmable Device
|
||||
Image) generated by Xilinx Vivado which contains all the hardware specific
|
||||
boot information, such as clock, MIO and DDR initializations as well as any
|
||||
customizations in the programmable logic. Since this PDI can only be generated
|
||||
by Xilinx Vivado, Buildroot needs access to the prebuilt image. The Buildroot
|
||||
xilinx-prebuilt package has support for Versal XSA files exported from Xilinx
|
||||
Vivado.
|
||||
|
||||
Using the option BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA, Buildroot can obtain
|
||||
the prebuilt PDI from the XSA file.
|
||||
|
||||
1) Start with a defconfig supported by Buildroot (e.g. VCK190)
|
||||
make versal_vck190_defconfig
|
||||
|
||||
2) make menuconfig
|
||||
Visit the following menu and enable BR2_TARGET_XILINX_PREBUILT_VERSAL_XSA
|
||||
|
||||
Bootloaders --->
|
||||
xilinx-prebuilt --->
|
||||
[*] download a prebuilt Versal XSA
|
||||
|
||||
3) Within the same menuconfig, configure location of XSA. It can be in the
|
||||
local file system or downloadable from an https:// location.
|
||||
|
||||
Bootloaders --->
|
||||
xilinx-prebuilt --->
|
||||
(<path to XSA>) URL of custom XSA
|
||||
|
||||
4) make
|
||||
|
||||
The resulting output/images will contain a boot.bin that includes the custom
|
||||
PDI file extracted from the Xilinx Vivado exported XSA file.
|
||||
Reference in New Issue
Block a user