[Buildroot] [PATCH v1 2/3] add board/versal

Frager, Neal neal.frager at amd.com
Thu Nov 3 09:03:07 UTC 2022


Hi Luca,

> --- /dev/null
> +++ b/board/versal/genimage.cfg
> @@ -0,0 +1,30 @@
> +image boot.vfat {
> +	vfat {
> +		files = {
> +			"boot.bin",
> +			"system.dtb",

> system.dtb is stored in the FAT partition...

The system.dtb in the FAT partition is for the Linux kernel.

> --- /dev/null
> +++ b/board/versal/post-image.sh
> @@ -0,0 +1,35 @@
> +#!/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)"
> +BOARD_NAME=$4
> +
> +mkdir -p "${BINARIES_DIR}"
> +cat <<-__HEADER_EOF > "${BINARIES_DIR}/bootgen.bif"
> +	the_ROM_image:
> +	{
> +	image {
> +		{ type=bootimage, file=${BINARIES_DIR}/${BOARD_NAME}_vpl_gen_fixed.pdi }
> +		{ type=bootloader, file=${BINARIES_DIR}/${BOARD_NAME}_plm.elf }
> +		{ core=psm, file=${BINARIES_DIR}/${BOARD_NAME}_psmfw.elf }
> +	}
> +	image {
> +		id = 0x1c000000, name=apu_subsystem 
> +		{ type=raw, load=0x00001000, file=${BINARIES_DIR}/system.dtb }

> ...and also in boot.bin. What's the reason for this? One copy is for U-Boot and the other for the kernel?

Yes, the system.dtb packaged inside the boot.bin is for u-boot.  

For versal products, the bootloader is the plm (platform loader and manager) which runs on a triple-redundant microblaze.
The plm does what the fsbl/spl does for zynq and zynqmp products.  It parses the images in the boot.bin and boots tf-a and u-boot.

Best regards,
Neal Frager
AMD



More information about the buildroot mailing list