[meta-xilinx] [PATCH 3/5] platform-init.bb: Update to xilinx-platform-init
Nathan Rossi
nathan at nathanrossi.com
Wed Apr 26 04:41:28 PDT 2017
Update to use xilinx-platform-init.bbclass. And change to providing the
generic 'virtual/xilinx-platform-init' as opposed to a zynq7 specific
one.
Remove the 'zynq7-platform-init.inc' this include was only useful for
recipes that provide/package only platform-init files. Which means it is
no more useful that the platform-init.bb recipe itself. Layers that want
to provide additional platform-init files can bbappend to the
platform-init recipe.
Signed-off-by: Nathan Rossi <nathan at nathanrossi.com>
---
recipes-bsp/platform-init/platform-init.bb | 28 ++++++++++++++++++-----
recipes-bsp/platform-init/zynq7-platform-init.inc | 22 ------------------
2 files changed, 22 insertions(+), 28 deletions(-)
delete mode 100644 recipes-bsp/platform-init/zynq7-platform-init.inc
diff --git a/recipes-bsp/platform-init/platform-init.bb b/recipes-bsp/platform-init/platform-init.bb
index 5a98c55db1..32509b0786 100644
--- a/recipes-bsp/platform-init/platform-init.bb
+++ b/recipes-bsp/platform-init/platform-init.bb
@@ -1,9 +1,13 @@
SUMMARY = "Xilinx Platform Headers"
-DESCRPTION = "Xilinx ps7_init_gpl.c/h platform headers, used for building u-boot-spl and fsbl"
+DESCRPTION = "Xilinx ps*_init_gpl.c/h platform init code, used for building u-boot-spl and fsbl"
HOMEPAGE = "http://www.xilinx.com"
SECTION = "bsp"
-include zynq7-platform-init.inc
+INHIBIT_DEFAULT_DEPS = "1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit xilinx-platform-init
COMPATIBLE_MACHINE = "$^"
COMPATIBLE_MACHINE_picozed-zynq7 = "picozed-zynq7"
@@ -11,12 +15,24 @@ COMPATIBLE_MACHINE_picozed-zynq7 = "picozed-zynq7"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
-SRC_URI = "file://ps7_init_gpl.c file://ps7_init_gpl.h"
+PROVIDES += "virtual/xilinx-platform-init"
+
+SRC_URI = "${@" ".join(["file://%s" % f for f in (d.getVar('PLATFORM_INIT_FILES') or "").split()])}"
S = "${WORKDIR}"
-do_install_append() {
- install -m 0644 ${S}/ps7_init_gpl.c ${D}${PLATFORM_INIT_DIR}/
- install -m 0644 ${S}/ps7_init_gpl.h ${D}${PLATFORM_INIT_DIR}/
+SYSROOT_DIRS += "${PLATFORM_INIT_DIR}"
+
+do_compile() {
+ :
}
+do_install() {
+ install -d ${D}${PLATFORM_INIT_DIR}
+ for i in ${PLATFORM_INIT_FILES}; do
+ install -m 0644 ${S}/$i ${D}${PLATFORM_INIT_DIR}/
+ done
+}
+
+FILES_${PN} += "${PLATFORM_INIT_DIR}/*"
+
diff --git a/recipes-bsp/platform-init/zynq7-platform-init.inc b/recipes-bsp/platform-init/zynq7-platform-init.inc
deleted file mode 100644
index 2282428976..0000000000
--- a/recipes-bsp/platform-init/zynq7-platform-init.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-inherit zynq7-platform-paths
-
-PROVIDES += "virtual/zynq7-platform-init"
-
-INHIBIT_DEFAULT_DEPS = "1"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-SYSROOT_DIRS += "${PLATFORM_INIT_DIR}"
-
-do_compile() {
- :
-}
-
-do_install() {
- install -d ${D}${PLATFORM_INIT_DIR}
-}
-
-FILES_${PN} += " \
- ${PLATFORM_INIT_DIR}/ps7_init_gpl.c \
- ${PLATFORM_INIT_DIR}/ps7_init_gpl.h \
- "
-
--
2.11.0
More information about the meta-xilinx
mailing list