* [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package
@ 2022-11-24 10:21 Neal Frager via buildroot
2022-11-24 10:21 ` [Buildroot] [PATCH v6 2/2] configs/versal_vck190: new defconfig Neal Frager via buildroot
2022-11-24 21:15 ` [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package Thomas Petazzoni via buildroot
0 siblings, 2 replies; 10+ messages in thread
From: Neal Frager via buildroot @ 2022-11-24 10:21 UTC (permalink / raw)
To: buildroot
Cc: terry.oneal, luca.ceresoli, kris.chaplin, thomas.petazzoni,
Neal Frager, michal.simek
This patch adds support for downloading versal microblaze firmware binaries.
These are necessary for booting Xilinx versal devices.
The location of these binaries is temporary, and will soon be added to the
Xilinx firmware repository. The temporary location is using the same free
distribution license as the Xilinx firmware repository.
Once these files are available on the Xilinx repository, this package will
be updated to the new location.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V1->V2:
- set defaults for version and board name
- improved format of install commands
V2->V3:
- no changes
V3->V4:
- no changes
V4->V5:
- no changes
V5->V6:
- no changes
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/versal-firmware/Config.in | 24 ++++++++++++++++++++++
package/versal-firmware/versal-firmware.mk | 23 +++++++++++++++++++++
4 files changed, 49 insertions(+)
create mode 100644 package/versal-firmware/Config.in
create mode 100644 package/versal-firmware/versal-firmware.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 2aecdb1c8f..4689453d54 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2154,6 +2154,7 @@ F: configs/zynqmp_zcu102_defconfig
F: configs/zynqmp_zcu106_defconfig
F: configs/zynqmp_kria_kv260_defconfig
F: package/bootgen/
+F: package/versal-firmware/
N: Nicola Di Lieto <nicola.dilieto@gmail.com>
F: package/uacme/
diff --git a/package/Config.in b/package/Config.in
index aef80f9ab0..ebc7df10ec 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -443,6 +443,7 @@ menu "Firmware"
source "package/sunxi-boards/Config.in"
source "package/ts4900-fpga/Config.in"
source "package/ux500-firmware/Config.in"
+ source "package/versal-firmware/Config.in"
source "package/wilc-firmware/Config.in"
source "package/wilink-bt-firmware/Config.in"
source "package/zd1211-firmware/Config.in"
diff --git a/package/versal-firmware/Config.in b/package/versal-firmware/Config.in
new file mode 100644
index 0000000000..122ef02175
--- /dev/null
+++ b/package/versal-firmware/Config.in
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_VERSAL_FIRMWARE
+ bool "versal-firmware"
+ depends on BR2_aarch64
+ help
+ Pre-built firmware files for Xilinx Versal boards.
+
+ https://github.com/nealfrager/buildroot-firmware
+
+if BR2_PACKAGE_VERSAL_FIRMWARE
+
+config BR2_PACKAGE_VERSAL_FIRMWARE_VERSION
+ string "versal firmware version"
+ default v2022.2
+ help
+ Release version of Versal firmware.
+
+config BR2_PACKAGE_VERSAL_FIRMWARE_BOARD
+ string "versal board name"
+ default vck190
+ help
+ Name of Versal target board.
+ Used for installing the appropriate firmware boot.bin.
+
+endif # BR2_PACKAGE_VERSAL_FIRMWARE
diff --git a/package/versal-firmware/versal-firmware.mk b/package/versal-firmware/versal-firmware.mk
new file mode 100644
index 0000000000..cb36d1e045
--- /dev/null
+++ b/package/versal-firmware/versal-firmware.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# versal-firmware
+#
+################################################################################
+
+VERSAL_FIRMWARE_VERSION = $(call qstrip,$(BR2_PACKAGE_VERSAL_FIRMWARE_VERSION))
+VERSAL_FIRMWARE_SITE = $(call github,nealfrager,buildroot-firmware,$(BR2_PACKAGE_VERSAL_FIRMWARE_VERSION))
+VERSAL_FIRMWARE_LICENSE = "Xilinx-Binary-Only or GPL-2.0-or-later"
+
+VERSAL_FIRMWARE_LICENSE_FILES = LICENSE
+
+VERSAL_FIRMWARE_INSTALL_TARGET = NO
+VERSAL_FIRMWARE_INSTALL_IMAGES = YES
+
+define VERSAL_FIRMWARE_INSTALL_IMAGES_CMDS
+ $(foreach f,plm.elf psmfw.elf vpl_gen_fixed.pdi,\
+ $(INSTALL) -D -m 0755 $(@D)/$(BR2_PACKAGE_VERSAL_FIRMWARE_BOARD)/$(BR2_PACKAGE_VERSAL_FIRMWARE_BOARD)_$(f) \
+ $(BINARIES_DIR)/$(BR2_PACKAGE_VERSAL_FIRMWARE_BOARD)_$(f)
+ )
+endef
+
+$(eval $(generic-package))
--
2.17.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH v6 2/2] configs/versal_vck190: new defconfig
2022-11-24 10:21 [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package Neal Frager via buildroot
@ 2022-11-24 10:21 ` Neal Frager via buildroot
2022-11-24 21:15 ` [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package Thomas Petazzoni via buildroot
1 sibling, 0 replies; 10+ messages in thread
From: Neal Frager via buildroot @ 2022-11-24 10:21 UTC (permalink / raw)
To: buildroot
Cc: terry.oneal, luca.ceresoli, kris.chaplin, thomas.petazzoni,
Neal Frager, michal.simek
This patch adds support for Xilinx Versal VCK190 evaluation board.
VCK190 features can be found here:
https://www.xilinx.com/products/boards-and-kits/vck190.html
The VCK190 is based on the Xilinx Versal family:
https://www.xilinx.com/products/silicon-devices/acap/versal.html
The VC1902 included with the VCK190 evaluation board has Xilinx
AI Engine acclerators designed for accelerating machine learning
applications. Also included is an upgrade from prior Zynq and
ZynqMP families to ARM Cortex-A72 cores.
While the Linux kernel for Versal is quite similar to ZynqMP,
the boot process has significantly changed.
Triple-redundant MicroBlaze cores are used to boot and setup
Versal devices. For this reason, current buildroot support
will download pre-built firmware images and use Xilinx bootgen
to generate the boot.bin for the vck190.
Signed-off-by: Neal Frager <neal.frager@amd.com>
---
V1->V2:
- removed uboot.fragment and using BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS instead
- squashed versal_vck190_defconfig and board files into single patch
V2->V3:
- correct console name to ttyAMA0
- added necessary extlinux.conf append flags
V3->V4:
- switch to stripped u-boot.elf binary
- clean up bootgen.bif file format
V4->V5:
- using new BR2_TARGET_UBOOT_FORMAT_BIN_ELF config
V5->V6:
- using new BR2_TARGET_UBOOT_FORMAT_REMAKE_ELF config
---
DEVELOPERS | 2 ++
board/versal/genimage.cfg | 30 ++++++++++++++++++
board/versal/post-build.sh | 16 ++++++++++
board/versal/post-image.sh | 35 +++++++++++++++++++++
board/versal/readme.txt | 54 +++++++++++++++++++++++++++++++++
configs/versal_vck190_defconfig | 38 +++++++++++++++++++++++
6 files changed, 175 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
create mode 100644 configs/versal_vck190_defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 4689453d54..63d0758858 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2146,9 +2146,11 @@ 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/
+F: configs/versal_vck190_defconfig
F: configs/zynq_zc706_defconfig
F: configs/zynqmp_zcu102_defconfig
F: configs/zynqmp_zcu106_defconfig
diff --git a/board/versal/genimage.cfg b/board/versal/genimage.cfg
new file mode 100644
index 0000000000..d994d3a2bf
--- /dev/null
+++ b/board/versal/genimage.cfg
@@ -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"
+ }
+}
diff --git a/board/versal/post-build.sh b/board/versal/post-build.sh
new file mode 100755
index 0000000000..ff8f8a6071
--- /dev/null
+++ b/board/versal/post-build.sh
@@ -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} clk_ignore_unused root=/dev/${ROOT} rw rootwait
+ __HEADER_EOF
diff --git a/board/versal/post-image.sh b/board/versal/post-image.sh
new file mode 100755
index 0000000000..890522c31d
--- /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 }
+ { 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
diff --git a/board/versal/readme.txt b/board/versal/readme.txt
new file mode 100644
index 0000000000..9f234be620
--- /dev/null
+++ b/board/versal/readme.txt
@@ -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.
diff --git a/configs/versal_vck190_defconfig b/configs/versal_vck190_defconfig
new file mode 100644
index 0000000000..d87df221c6
--- /dev/null
+++ b/configs/versal_vck190_defconfig
@@ -0,0 +1,38 @@
+BR2_aarch64=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/versal/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/versal/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="ttyAMA0,115200 mmcblk0p2 vck190"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,linux-xlnx,xlnx_rebase_v5.15_LTS_2022.2)/xlnx_rebase_v5.15_LTS_2022.2.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="xilinx_versal"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/versal-vck190-rev1.1"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,arm-trusted-firmware,xlnx_rebase_v2.6_2022.2)/xlnx_rebase_v2.6_2022.2.tar.gz"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="versal"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,u-boot-xlnx,xlnx_rebase_v2022.01_2022.2)/xlnx_rebase_v2022.01_2022.2.tar.gz"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="xilinx_versal_virt"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=versal-vck190-rev1.1"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_FORMAT_REMAKE_ELF=y
+BR2_PACKAGE_VERSAL_FIRMWARE=y
+BR2_PACKAGE_VERSAL_FIRMWARE_VERSION="v2022.2"
+BR2_PACKAGE_VERSAL_FIRMWARE_BOARD="vck190"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_BOOTGEN=y
--
2.17.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package
2022-11-24 10:21 [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package Neal Frager via buildroot
2022-11-24 10:21 ` [Buildroot] [PATCH v6 2/2] configs/versal_vck190: new defconfig Neal Frager via buildroot
@ 2022-11-24 21:15 ` Thomas Petazzoni via buildroot
2022-11-25 9:29 ` Frager, Neal via buildroot
1 sibling, 1 reply; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-24 21:15 UTC (permalink / raw)
To: Neal Frager
Cc: michal.simek, kris.chaplin, terry.oneal, luca.ceresoli,
Neal Frager via buildroot
On Thu, 24 Nov 2022 03:21:43 -0700
Neal Frager via buildroot <buildroot@buildroot.org> wrote:
> This patch adds support for downloading versal microblaze firmware binaries.
> These are necessary for booting Xilinx versal devices.
>
> The location of these binaries is temporary, and will soon be added to the
> Xilinx firmware repository. The temporary location is using the same free
> distribution license as the Xilinx firmware repository.
>
> Once these files are available on the Xilinx repository, this package will
> be updated to the new location.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
I wanted to apply this... but there is a serious licensing issue I
believe, see below.
> diff --git a/package/versal-firmware/Config.in b/package/versal-firmware/Config.in
> new file mode 100644
> index 0000000000..122ef02175
> --- /dev/null
> +++ b/package/versal-firmware/Config.in
> @@ -0,0 +1,24 @@
> +config BR2_PACKAGE_VERSAL_FIRMWARE
> + bool "versal-firmware"
> + depends on BR2_aarch64
> + help
> + Pre-built firmware files for Xilinx Versal boards.
> +
> + https://github.com/nealfrager/buildroot-firmware
> +
> +if BR2_PACKAGE_VERSAL_FIRMWARE
> +
> +config BR2_PACKAGE_VERSAL_FIRMWARE_VERSION
> + string "versal firmware version"
Drop "versal" here: this option appears indented under
"versal-firmware", so repeating "versal" is not needed.
> + default v2022.2
Quotes around v2022.2
> +config BR2_PACKAGE_VERSAL_FIRMWARE_BOARD
> + string "versal board name"
> + default vck190
Same comments here.
> + help
> + Name of Versal target board.
> + Used for installing the appropriate firmware boot.bin.
> +
> +endif # BR2_PACKAGE_VERSAL_FIRMWARE
> diff --git a/package/versal-firmware/versal-firmware.mk b/package/versal-firmware/versal-firmware.mk
> new file mode 100644
> index 0000000000..cb36d1e045
> --- /dev/null
> +++ b/package/versal-firmware/versal-firmware.mk
> @@ -0,0 +1,23 @@
> +################################################################################
> +#
> +# versal-firmware
> +#
> +################################################################################
> +
> +VERSAL_FIRMWARE_VERSION = $(call qstrip,$(BR2_PACKAGE_VERSAL_FIRMWARE_VERSION))
> +VERSAL_FIRMWARE_SITE = $(call github,nealfrager,buildroot-firmware,$(BR2_PACKAGE_VERSAL_FIRMWARE_VERSION))
Use $(VERSAL_FIRMWARE_VERSION) here
> +VERSAL_FIRMWARE_LICENSE = "Xilinx-Binary-Only or GPL-2.0-or-later"
> +
> +VERSAL_FIRMWARE_LICENSE_FILES = LICENSE
I really don't understand how this repository code can be under
GPL-2.0-or-later. The GPL implies that source code is available as the
GPL explicitly states that the software should be provided under its
"preferred form of modification", which a closed source binary
definitely is not.
So when the LICENSE file says:
COPYRIGHT TEXT:
---------------
The files distributed with this project are provided in binary form under the following free and
permissive binary-only license; source files are not provided. While the following free and
permissive license is similar to the MIT open source license, this it is NOT the MIT open source
license or any other OSI-approved open-source license.
Copyright (c) 2022 Xilinx, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Files:
kv260/kv260_pmufw.elf
zcu102/zcu102_pmufw.elf
zcu106/zcu106_pmufw.elf
vck190/vck190_plm.elf
vck190/vck190_psmfw.elf
vck190/vck190_vpl_gen_fixed.pdi
---------------------------------------------------------------------------------------------------
COPYRIGHT TEXT:
---------------
Copyright (C) 2010 - 2022 <Xilinx, Inc> This program is free software; you can
redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version. This program is distributed in
the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. You should have received a copy of
the GNU General Public License along with this program; if not, see
<http://www.gnu.org/licenses/>
SPDX-License-Identifier: GPL-2.0 /
Files:
kv260/kv260_pmufw.elf
zcu102/zcu102_pmufw.elf
zcu106/zcu106_pmufw.elf
vck190/vck190_plm.elf
vck190/vck190_psmfw.elf
vck190/vck190_vpl_gen_fixed.pdi
The first part somewhat makes sense, but the second part certainly does
not make sense. If those binary files contain GPLv2 code, providing
only the binaries is a violation of the GPL.
So I'm sorry, but this needs to be fixed up before we can consider
applying this package.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package
2022-11-24 21:15 ` [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package Thomas Petazzoni via buildroot
@ 2022-11-25 9:29 ` Frager, Neal via buildroot
2022-11-25 11:02 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 10+ messages in thread
From: Frager, Neal via buildroot @ 2022-11-25 9:29 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Simek, Michal, Chaplin, Kris, O'Neal, Terry,
luca.ceresoli@bootlin.com, Neal Frager via buildroot
[-- Attachment #1: Type: text/plain, Size: 4221 bytes --]
Hi Thomas,
> This patch adds support for downloading versal microblaze firmware binaries.
> These are necessary for booting Xilinx versal devices.
>
> The location of these binaries is temporary, and will soon be added to
> the Xilinx firmware repository. The temporary location is using the
> same free distribution license as the Xilinx firmware repository.
>
> Once these files are available on the Xilinx repository, this package
> will be updated to the new location.
>
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> I wanted to apply this... but there is a serious licensing issue I believe, see below.
Thank you for your review and feedback. Licensing is still something that I do not understand as well as I probably should.
> diff --git a/package/versal-firmware/Config.in
> b/package/versal-firmware/Config.in
> new file mode 100644
> index 0000000000..122ef02175
> --- /dev/null
> +++ b/package/versal-firmware/Config.in
> @@ -0,0 +1,24 @@
> +config BR2_PACKAGE_VERSAL_FIRMWARE
> + bool "versal-firmware"
> + depends on BR2_aarch64
> + help
> + Pre-built firmware files for Xilinx Versal boards.
> +
> + https://github.com/nealfrager/buildroot-firmware
> +
> +if BR2_PACKAGE_VERSAL_FIRMWARE
> +
> +config BR2_PACKAGE_VERSAL_FIRMWARE_VERSION
> + string "versal firmware version"
> Drop "versal" here: this option appears indented under "versal-firmware", so repeating "versal" is not needed.
Ok, no problem.
> + default v2022.2
> Quotes around v2022.2
Ok. I will fix this.
> +config BR2_PACKAGE_VERSAL_FIRMWARE_BOARD
> + string "versal board name"
> + default vck190
> Same comments here.
Understood. I will fix this too.
> + help
> + Name of Versal target board.
> + Used for installing the appropriate firmware boot.bin.
> +
> +endif # BR2_PACKAGE_VERSAL_FIRMWARE
> diff --git a/package/versal-firmware/versal-firmware.mk
> b/package/versal-firmware/versal-firmware.mk
> new file mode 100644
> index 0000000000..cb36d1e045
> --- /dev/null
> +++ b/package/versal-firmware/versal-firmware.mk
> @@ -0,0 +1,23 @@
> +#####################################################################
> +###########
> +#
> +# versal-firmware
> +#
> +#####################################################################
> +###########
> +
> +VERSAL_FIRMWARE_VERSION = $(call
> +qstrip,$(BR2_PACKAGE_VERSAL_FIRMWARE_VERSION))
> +VERSAL_FIRMWARE_SITE = $(call
> +github,nealfrager,buildroot-firmware,$(BR2_PACKAGE_VERSAL_FIRMWARE_VE
> +RSION))
> Use $(VERSAL_FIRMWARE_VERSION) here
No problem. Thanks for catching this.
> +VERSAL_FIRMWARE_LICENSE = "Xilinx-Binary-Only or GPL-2.0-or-later"
> +
> +VERSAL_FIRMWARE_LICENSE_FILES = LICENSE
> I really don't understand how this repository code can be under GPL-2.0-or-later. The GPL implies that source code is available as the GPL explicitly states that the software should be provided under its "preferred form of modification", which a closed source binary definitely is not.
> The first part somewhat makes sense, but the second part certainly does not make sense. If those binary files contain GPLv2 code, providing only the binaries is a violation of the GPL.
> So I'm sorry, but this needs to be fixed up before we can consider applying this package.
I copied the LICENSE file from the Xilinx/ubuntu-firmware repo below. Looking more closely at it, I believe you are right that the license should just be Xilinx-Binary-Only.
I will update the LICENSE file to only include the binary portion as described in the below license:
https://github.com/Xilinx/ubuntu-firmware/blob/main/LICENSE
The source code for the versal_plm and versal_psmfw applications comes from the same Xilinx/embeddedsw repository as the zynqmp_pmufw, so the source and binary licenses for all of these files should be the same.
https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps
If I modify the LICENSE file and remove the commentary about GPL, do you think this could be acceptable for inclusion in buildroot? If there is anything else I need to add, please let me know.
Thanks again for your help.
Best regards,
Neal Frager
AMD
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 15860 bytes --]
[-- Attachment #3: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package
2022-11-25 9:29 ` Frager, Neal via buildroot
@ 2022-11-25 11:02 ` Thomas Petazzoni via buildroot
2022-11-25 11:18 ` Frager, Neal via buildroot
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-25 11:02 UTC (permalink / raw)
To: Frager, Neal
Cc: Simek, Michal, Chaplin, Kris, O'Neal, Terry,
luca.ceresoli@bootlin.com, Neal Frager via buildroot
Hello,
On Fri, 25 Nov 2022 09:29:05 +0000
"Frager, Neal" <neal.frager@amd.com> wrote:
> I copied the LICENSE file from the Xilinx/ubuntu-firmware repo below.
> Looking more closely at it, I believe you are right that the license
> should just be Xilinx-Binary-Only.
>
> I will update the LICENSE file to only include the binary portion as
> described in the below license:
> https://github.com/Xilinx/ubuntu-firmware/blob/main/LICENSE
>
> The source code for the versal_plm and versal_psmfw applications
> comes from the same Xilinx/embeddedsw repository as the zynqmp_pmufw,
> so the source and binary licenses for all of these files should be
> the same. https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps
Is this the full source code needed to build the versal-firmware? If
so, why do we use a precompiled binary? We should instead build it from
source from this repository.
> If I modify the LICENSE file and remove the commentary about GPL, do
> you think this could be acceptable for inclusion in buildroot? If
> there is anything else I need to add, please let me know.
Yes, if the pre-compiled binaries are distributed under the
Xilinx-Binary-Only license, then that's OK.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package
2022-11-25 11:02 ` Thomas Petazzoni via buildroot
@ 2022-11-25 11:18 ` Frager, Neal via buildroot
2022-11-25 11:33 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 10+ messages in thread
From: Frager, Neal via buildroot @ 2022-11-25 11:18 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Simek, Michal, Chaplin, Kris, O'Neal, Terry,
luca.ceresoli@bootlin.com, Neal Frager via buildroot
[-- Attachment #1: Type: text/plain, Size: 2246 bytes --]
Hi Thomas,
> Le 25 nov. 2022 à 06:02, Thomas Petazzoni <thomas.petazzoni@bootlin.com> a écrit :
>
> Hello,
>
>> On Fri, 25 Nov 2022 09:29:05 +0000
>> "Frager, Neal" <neal.frager@amd.com> wrote:
>>
>> I copied the LICENSE file from the Xilinx/ubuntu-firmware repo below.
>> Looking more closely at it, I believe you are right that the license
>> should just be Xilinx-Binary-Only.
>>
>> I will update the LICENSE file to only include the binary portion as
>> described in the below license:
>> https://github.com/Xilinx/ubuntu-firmware/blob/main/LICENSE
>>
>> The source code for the versal_plm and versal_psmfw applications
>> comes from the same Xilinx/embeddedsw repository as the zynqmp_pmufw,
>> so the source and binary licenses for all of these files should be
>> the same. https://github.com/Xilinx/embeddedsw/tree/master/lib/sw_apps
>
> Is this the full source code needed to build the versal-firmware? If
> so, why do we use a precompiled binary? We should instead build it from
> source from this repository.
Yes, it is the full source code, just like there is the full source code for the zynqmp pmufw. The problem is that all 3 of these applications are running on a microblaze.
So to build them, we need to be able to work with two compilers. A microblaze compiler for all the firmware applications and an ARM compiler for the rest.
Normally, it would be much better if we could build the pmufw for zynqmp and the plm and psmfw applications for versal. We have discussed this before, but do you have any new ideas for how we could configure buildroot to download and build two compilers for two different architectures?
>
>> If I modify the LICENSE file and remove the commentary about GPL, do
>> you think this could be acceptable for inclusion in buildroot? If
>> there is anything else I need to add, please let me know.
>
> Yes, if the pre-compiled binaries are distributed under the
> Xilinx-Binary-Only license, then that's OK.
>
Great, I have modified the license file accordingly.
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
Best regards,
Neal Frager
AMD
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 14624 bytes --]
[-- Attachment #3: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package
2022-11-25 11:18 ` Frager, Neal via buildroot
@ 2022-11-25 11:33 ` Thomas Petazzoni via buildroot
2022-11-25 13:18 ` Frager, Neal via buildroot
2022-11-25 14:14 ` Frager, Neal via buildroot
0 siblings, 2 replies; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-25 11:33 UTC (permalink / raw)
To: Frager, Neal
Cc: Simek, Michal, Chaplin, Kris, O'Neal, Terry,
luca.ceresoli@bootlin.com, Neal Frager via buildroot
Hello Neal,
On Fri, 25 Nov 2022 11:18:43 +0000
"Frager, Neal" <neal.frager@amd.com> wrote:
> Yes, it is the full source code, just like there is the full source
> code for the zynqmp pmufw. The problem is that all 3 of these
> applications are running on a microblaze.
>
> So to build them, we need to be able to work with two compilers. A
> microblaze compiler for all the firmware applications and an ARM
> compiler for the rest.
>
> Normally, it would be much better if we could build the pmufw for
> zynqmp and the plm and psmfw applications for versal. We have
> discussed this before, but do you have any new ideas for how we could
> configure buildroot to download and build two compilers for two
> different architectures?
Sure: we are already doing that for some ARM64 platforms that need to
build ARM32 firmware: this needs a different compiler.
It is for this reason that we have the package/arm-gnu-toolchain/
package, which downloads and installs a pre-compiled bare-metal ARM32
toolchain. Then this toolchain is for example used by
boot/arm-trusted-firmware/ in some situations:
ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN),y)
ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-arm-gnu-toolchain
endif
So if you have a Microblaze bare metal toolchain available somewhere,
we could create a package for it, and build the firmware from source.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package
2022-11-25 11:33 ` Thomas Petazzoni via buildroot
@ 2022-11-25 13:18 ` Frager, Neal via buildroot
2022-11-25 14:13 ` Thomas Petazzoni via buildroot
2022-11-25 14:14 ` Frager, Neal via buildroot
1 sibling, 1 reply; 10+ messages in thread
From: Frager, Neal via buildroot @ 2022-11-25 13:18 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Simek, Michal, Chaplin, Kris, O'Neal, Terry,
luca.ceresoli@bootlin.com, Neal Frager via buildroot
[-- Attachment #1: Type: text/plain, Size: 2304 bytes --]
Hi Thomas,
> Yes, it is the full source code, just like there is the full source
> code for the zynqmp pmufw. The problem is that all 3 of these
> applications are running on a microblaze.
>
> So to build them, we need to be able to work with two compilers. A
> microblaze compiler for all the firmware applications and an ARM
> compiler for the rest.
>
> Normally, it would be much better if we could build the pmufw for
> zynqmp and the plm and psmfw applications for versal. We have
> discussed this before, but do you have any new ideas for how we could
> configure buildroot to download and build two compilers for two
> different architectures?
> Sure: we are already doing that for some ARM64 platforms that need to build ARM32 firmware: this needs a different compiler.
> It is for this reason that we have the package/arm-gnu-toolchain/ package, which downloads and installs a pre-compiled bare-metal ARM32 toolchain. Then this toolchain is for example used by boot/arm-trusted-firmware/ in some situations:
> ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN),y)
> ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-arm-gnu-toolchain endif
> So if you have a Microblaze bare metal toolchain available somewhere, we could create a package for it, and build the firmware from source.
This is a good idea! It seems adding a microblaze compiler should be easier than I thought.
I am not aware of any pre-built microblaze compiler that we could just download, but perhaps using a package, we could download and build a microblaze gcc compiler from sources?
The Xilinx 2022.2 tools use a gcc 11.2.0 compiler with the following patch set for microblaze. It would be great if we could develop a package that builds the exact same compiler for buildroot.
https://github.com/Xilinx/meta-xilinx/tree/xlnx-rel-v2022.2/meta-microblaze/recipes-devtools/gcc/gcc-11
Once we have a microblaze compiler available in buildroot, we could then build the zynqmp pmufw as well as the versal plm and psmfw applications from the Xilinx/embeddedsw sources.
Then we would only have the vck190_vpl_gen_fixed.pdi file for versal that would need to be downloaded from a repository since it requires Vivado for generating it.
Best regards,
Neal Frager
AMD
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 15396 bytes --]
[-- Attachment #3: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package
2022-11-25 13:18 ` Frager, Neal via buildroot
@ 2022-11-25 14:13 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-25 14:13 UTC (permalink / raw)
To: Frager, Neal
Cc: Simek, Michal, Chaplin, Kris, O'Neal, Terry,
luca.ceresoli@bootlin.com, Neal Frager via buildroot
Hello Neal,
On Fri, 25 Nov 2022 13:18:38 +0000
"Frager, Neal" <neal.frager@amd.com> wrote:
> This is a good idea! It seems adding a microblaze compiler should be
> easier than I thought.
>
> I am not aware of any pre-built microblaze compiler that we could
> just download, but perhaps using a package, we could download and
> build a microblaze gcc compiler from sources?
This is much more difficult, we really don't have the infrastructure to
do that in Buildroot right now. It requires building another binutils
and another gcc than the target gcc, and Buildroot is clearly not
prepared/designed for this.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package
2022-11-25 11:33 ` Thomas Petazzoni via buildroot
2022-11-25 13:18 ` Frager, Neal via buildroot
@ 2022-11-25 14:14 ` Frager, Neal via buildroot
1 sibling, 0 replies; 10+ messages in thread
From: Frager, Neal via buildroot @ 2022-11-25 14:14 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Simek, Michal, Chaplin, Kris, O'Neal, Terry,
luca.ceresoli@bootlin.com, Neal Frager via buildroot
[-- Attachment #1: Type: text/plain, Size: 1957 bytes --]
> Yes, it is the full source code, just like there is the full source
> code for the zynqmp pmufw. The problem is that all 3 of these
> applications are running on a microblaze.
>
> So to build them, we need to be able to work with two compilers. A
> microblaze compiler for all the firmware applications and an ARM
> compiler for the rest.
>
> Normally, it would be much better if we could build the pmufw for
> zynqmp and the plm and psmfw applications for versal. We have
> discussed this before, but do you have any new ideas for how we could
> configure buildroot to download and build two compilers for two
> different architectures?
> Sure: we are already doing that for some ARM64 platforms that need to build ARM32 firmware: this needs a different compiler.
> It is for this reason that we have the package/arm-gnu-toolchain/ package, which downloads and installs a pre-compiled bare-metal ARM32 toolchain. Then this toolchain is for example used by boot/arm-trusted-firmware/ in some situations:
> ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN),y)
> ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-arm-gnu-toolchain endif
> So if you have a Microblaze bare metal toolchain available somewhere, we could create a package for it, and build the firmware from source.
I have gone ahead and made a v7 of the versal-firmware package anyway with the fixes you have requested.
Even if we add a microblaze compiler package as a next step, the vck190_vpl_gen_fixed.pdi will still need to be downloaded from a binary repo, so the versal-firmware repo is needed in any case.
Please let me know if any further changes are needed for v7.
I will look into how to best implement a microblaze compiler package as a next step, so that the versal plm and psmfw elf files can be built instead of just downloaded and installed.
Thanks again for your help and feedback!
Best regards,
Neal Frager
AMD
[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 15172 bytes --]
[-- Attachment #3: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-11-25 14:14 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-24 10:21 [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package Neal Frager via buildroot
2022-11-24 10:21 ` [Buildroot] [PATCH v6 2/2] configs/versal_vck190: new defconfig Neal Frager via buildroot
2022-11-24 21:15 ` [Buildroot] [PATCH v6 1/2] package/versal-firmware: new package Thomas Petazzoni via buildroot
2022-11-25 9:29 ` Frager, Neal via buildroot
2022-11-25 11:02 ` Thomas Petazzoni via buildroot
2022-11-25 11:18 ` Frager, Neal via buildroot
2022-11-25 11:33 ` Thomas Petazzoni via buildroot
2022-11-25 13:18 ` Frager, Neal via buildroot
2022-11-25 14:13 ` Thomas Petazzoni via buildroot
2022-11-25 14:14 ` Frager, Neal via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox