[meta-xilinx] [RFC 2/2] u-boot-xlnx: Update recipe to use platform-headers from sysroot
Nathan Rossi
nathan.rossi at xilinx.com
Mon Nov 17 19:45:38 PST 2014
* Use the ps7_init_gpl.[ch] from the sysroot as provided by the
virtual/zynq7-platform-headers dependency
* Add patch to u-boot-xlnx_2014.1 to support ps7_init_gpl.[ch]
* Move definition of SPL_BINARY to the specific machine configs that
have it available
Signed-off-by: Nathan Rossi <nathan.rossi at xilinx.com>
---
conf/machine/zc702-zynq7.conf | 1 +
conf/machine/zc706-zynq7.conf | 1 +
conf/machine/zedboard-zynq7.conf | 1 +
recipes-bsp/u-boot/u-boot-xlnx.inc | 11 ++++---
.../u-boot-xlnx/zynq-Use-GPLed-files-for-SPL.patch | 38 ++++++++++++++++++++++
recipes-bsp/u-boot/u-boot-xlnx_2014.01.bb | 5 ++-
6 files changed, 52 insertions(+), 5 deletions(-)
create mode 100644 recipes-bsp/u-boot/u-boot-xlnx/zynq-Use-GPLed-files-for-SPL.patch
diff --git a/conf/machine/zc702-zynq7.conf b/conf/machine/zc702-zynq7.conf
index 8613d4f..f2d56cf 100644
--- a/conf/machine/zc702-zynq7.conf
+++ b/conf/machine/zc702-zynq7.conf
@@ -15,6 +15,7 @@ require conf/machine/include/machine-xilinx-board.inc
# ZC70x machine definition known by Xilinx UBOOT
UBOOT_MACHINE = "zynq_zc70x_config"
+SPL_BINARY = "boot.bin"
SERIAL_CONSOLE = "115200 ttyPS0"
diff --git a/conf/machine/zc706-zynq7.conf b/conf/machine/zc706-zynq7.conf
index 1d0731a..cfcd4eb 100644
--- a/conf/machine/zc706-zynq7.conf
+++ b/conf/machine/zc706-zynq7.conf
@@ -15,6 +15,7 @@ require conf/machine/include/machine-xilinx-board.inc
# ZC70x machine definition known by Xilinx UBOOT
UBOOT_MACHINE = "zynq_zc70x_config"
+SPL_BINARY = "boot.bin"
SERIAL_CONSOLE = "115200 ttyPS0"
diff --git a/conf/machine/zedboard-zynq7.conf b/conf/machine/zedboard-zynq7.conf
index 2b5119c..2661b4f 100644
--- a/conf/machine/zedboard-zynq7.conf
+++ b/conf/machine/zedboard-zynq7.conf
@@ -14,6 +14,7 @@ require conf/machine/include/machine-xilinx-board.inc
# Zedboard machine definition known by Xilinx UBOOT
UBOOT_MACHINE = "zynq_zed_config"
+SPL_BINARY = "boot.bin"
SERIAL_CONSOLE = "115200 ttyPS0"
diff --git a/recipes-bsp/u-boot/u-boot-xlnx.inc b/recipes-bsp/u-boot/u-boot-xlnx.inc
index 2eac46e..d327a65 100644
--- a/recipes-bsp/u-boot/u-boot-xlnx.inc
+++ b/recipes-bsp/u-boot/u-boot-xlnx.inc
@@ -10,13 +10,16 @@ S = "${WORKDIR}/git"
PACKAGE_ARCH = "${MACHINE_ARCH}"
include u-boot-extra.inc
+inherit zynq7-platform-headers
-SPL_BINARY_zynq = "boot.bin"
+DEPENDS_zynq += "${@bb.utils.contains('SPL_BINARY', 'boot.bin', 'virtual/zynq7-platform-headers', '', d)}"
do_configure_prepend () {
- if test -e ${WORKDIR}/ps7_init.h; then
- cp ${WORKDIR}/ps7_init.h ${S}/board/xilinx/zynq/
- cp ${WORKDIR}/ps7_init.c ${S}/board/xilinx/zynq/
+ if test "${SPL_BINARY}" = "boot.bin"; then
+ if test -e ${PLATFORM_HEADERS_STAGE_DIR}/ps7_init_gpl.h; then
+ cp ${PLATFORM_HEADERS_STAGE_DIR}/ps7_init_gpl.h ${S}/board/xilinx/zynq/
+ cp ${PLATFORM_HEADERS_STAGE_DIR}/ps7_init_gpl.c ${S}/board/xilinx/zynq/
+ fi
fi
}
diff --git a/recipes-bsp/u-boot/u-boot-xlnx/zynq-Use-GPLed-files-for-SPL.patch b/recipes-bsp/u-boot/u-boot-xlnx/zynq-Use-GPLed-files-for-SPL.patch
new file mode 100644
index 0000000..736561f
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-xlnx/zynq-Use-GPLed-files-for-SPL.patch
@@ -0,0 +1,38 @@
+From c044cc5087e500a567a547a0ee193ecec280e5e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=B6ren=20Brinkmann?= <soren.brinkmann at xilinx.com>
+Date: Fri, 24 Oct 2014 06:57:00 +1000
+Subject: [PATCH] zynq: Use GPLed files for SPL
+
+The latest Xilinx tools generate ps7_init files that are explicitly
+available under GPL. Change the makefile to allow drop in of those files
+for building the SPL.
+
+Signed-off-by: Soren Brinkmann <soren.brinkmann at xilinx.com>
+Upstream-status: Backport [re-write for xilinx-v2014.1 u-boot]
+---
+ board/xilinx/zynq/Makefile | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/board/xilinx/zynq/Makefile b/board/xilinx/zynq/Makefile
+index 2bc7d4c..3415327 100644
+--- a/board/xilinx/zynq/Makefile
++++ b/board/xilinx/zynq/Makefile
+@@ -7,11 +7,12 @@
+
+ obj-y := board.o
+
+-ifneq ($(wildcard ps7_init.c),)
+-ifneq ($(wildcard ps7_init.h),)
+-obj-$(CONFIG_SPL_BUILD) += ps7_init.o
++ifneq ($(wildcard ps7_init_gpl.c),)
++ifneq ($(wildcard ps7_init_gpl.h),)
++obj-$(CONFIG_SPL_BUILD) += ps7_init_gpl.o
+ ifeq ($(CONFIG_SPL_BUILD),y)
+ $(shell touch xil_io.h)
+ endif
+ endif
+ endif
++
+--
+2.1.1
+
diff --git a/recipes-bsp/u-boot/u-boot-xlnx_2014.01.bb b/recipes-bsp/u-boot/u-boot-xlnx_2014.01.bb
index 972ca7f..03db11a 100644
--- a/recipes-bsp/u-boot/u-boot-xlnx_2014.01.bb
+++ b/recipes-bsp/u-boot/u-boot-xlnx_2014.01.bb
@@ -6,6 +6,9 @@ LIC_FILES_CHKSUM = "file://README;beginline=1;endline=6;md5=157ab8408beab40cd8ce
SRCREV = "2a0536fa48db1fc5332e3cd33b846d0da0c8bc1e"
PV = "v2014.01${XILINX_EXTENSION}+git${SRCPV}"
+FILESEXTRAPATHS += "${THISDIR}/u-boot-xlnx:"
+SRC_URI_append += "file://zynq-Use-GPLed-files-for-SPL.patch"
+
UBOOT_ENV_zc702-zynq7 = "uEnv"
+SRC_URI_append_zc702-zynq7 += "file://uEnv.txt"
-SRC_URI_append_zc702-zynq7 = " file://ps7_init.h file://ps7_init.c file://uEnv.txt"
--
2.1.1
More information about the meta-xilinx
mailing list