summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaralaxmi Bingi <varalaxmi.bingi@xilinx.com>2022-04-29 14:49:20 +0530
committerMark Hatle <mhatle@xilinx.com>2022-05-04 13:51:48 -0700
commitea12b72b50072cf43ce0aa142100d2a3166f21e7 (patch)
tree8eb67a8c01acd44a1c6abbbb6f6c917e0a44dc8f
parent98ea8ecc4cea58161b0994c7519195996c41caba (diff)
downloadmeta-xilinx-ea12b72b50072cf43ce0aa142100d2a3166f21e7.tar.gz
u-boot-xlnx_%.bbappend: reorganizing u-boot recipe code
This patch will move the u-boot code from meta-xilinx-tools to meta-xilinx. Not all flows use the meta-xilinx-tools layer. Signed-off-by: Varalaxmi Bingi <varalaxmi.bingi@xilinx.com> Signed-off-by: Mark Hatle <mhatle@xilinx.com>
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc
index d9113cc7..d152c15c 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc
@@ -18,3 +18,43 @@ B = "${WORKDIR}/build"
18FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot:" 18FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot:"
19 19
20SYSROOT_DIRS += "/boot" 20SYSROOT_DIRS += "/boot"
21
22BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or "system-top")}"
23DTB_PATH ?= "/boot/devicetree/"
24DTB_NAME ?= ""
25
26EXTRA_OEMAKE += "${@'EXT_DTB=${RECIPE_SYSROOT}/${DTB_PATH}/${DTB_NAME}' if (d.getVar('DTB_NAME') != '') else '' }"
27
28python __anonymous () {
29 #check if there are any dtb providers
30 providerdtb = d.getVar("PREFERRED_PROVIDER_virtual/dtb")
31 if providerdtb:
32 d.appendVarFlag('do_configure', 'depends', ' virtual/dtb:do_populate_sysroot')
33 if d.getVar("DTB_NAME") is not None:
34 d.setVar('DTB_NAME', d.getVar('BASE_DTS')+ '.dtb')
35
36 if d.getVar('UBOOT_IMAGE_BLOB') == "1":
37 d.appendVarFlag('do_compile', 'postfuncs', ' do_blob_generate')
38}
39
40UBOOTELF_NODTB_IMAGE ?= "u-boot-nodtb.elf"
41UBOOTELF_NODTB_BINARY ?= "u-boot"
42do_deploy:prepend() {
43 cd ${B}
44
45 if [ -f "${UBOOTELF_NODTB_BINARY}" ]; then
46 install ${UBOOTELF_NODTB_BINARY} ${DEPLOYDIR}/${UBOOTELF_NODTB_IMAGE}
47 fi
48
49 #following lines are from uboot-sign.bbclass, vars are defined there
50 if [ -e "${UBOOT_DTB_BINARY}" ]; then
51 install ${UBOOT_DTB_BINARY} ${DEPLOYDIR}/${UBOOT_DTB_IMAGE}
52 ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY}
53 ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_SYMLINK}
54 fi
55 if [ -f "${UBOOT_NODTB_BINARY}" ]; then
56 install ${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}
57 ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_SYMLINK}
58 ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY}
59 fi
60}