summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2017-12-03 19:03:12 +1000
committerManjukumar Matha <manjukumar.harthikote-matha@xilinx.com>2017-12-04 14:24:24 -0800
commitb1a0592fbc175dbc53201b077b2239993d98a122 (patch)
treeb85c2a5e4ead55615c954a2370af8e640c37e166
parentd8c635715f41fb49a63426e5f6863b419ef9a0cd (diff)
downloadmeta-xilinx-b1a0592fbc175dbc53201b077b2239993d98a122.tar.gz
u-boot-spl-zynq-init.inc: Add virtual/boot-bin provider
Add back the PROVIDES for virtual/boot-bin and additionally improve the logic that enables the provide so that U-Boot can be built without providing virtual/boot-bin. In order for the u-boot recipe to provide virtual/boot-bin for Zynq and ZynqMP targets the selected provider for virtual/boot-bin must be the current u-boot (e.g. u-boot or u-boot-xlnx) or the provider must be unset. When u-boot provides virtual/boot-bin it is only enabling the deployment of boot.bin. In cases where it is not the provider it forcibly prevents the deployment of boot.bin. This ensures that the platform-init files are still provided even if SPL is not used for the boot.bin. Additionally for ZynqMP if u-boot is not providing the boot.bin do not depend on virtual/pmu-firmware. Since the boot.bin is what contains the pmu binary. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
-rw-r--r--recipes-bsp/u-boot/u-boot-spl-zynq-init.inc21
1 files changed, 19 insertions, 2 deletions
diff --git a/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc b/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc
index 2123e271..50eae1f1 100644
--- a/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc
+++ b/recipes-bsp/u-boot/u-boot-spl-zynq-init.inc
@@ -34,8 +34,12 @@ python () {
34 return c[0:len(c) - len(i)] 34 return c[0:len(c) - len(i)]
35 return c 35 return c
36 36
37 if d.getVar("SOC_FAMILY") not in ["zynq", "zynqmp"]:
38 # continue on this is not a zynq/zynqmp target
39 return
40
37 # Determine if target machine needs to provide a custom platform init files 41 # Determine if target machine needs to provide a custom platform init files
38 if d.getVar("SPL_BINARY") and d.getVar("SOC_FAMILY") in ["zynq", "zynqmp"]: 42 if d.getVar("SPL_BINARY"):
39 hasconfigs = [strip_config_name(c) for c in (d.getVar("HAS_PLATFORM_INIT") or "").split()] 43 hasconfigs = [strip_config_name(c) for c in (d.getVar("HAS_PLATFORM_INIT") or "").split()]
40 currentconfig = strip_config_name(d.getVar("UBOOT_MACHINE")) 44 currentconfig = strip_config_name(d.getVar("UBOOT_MACHINE"))
41 45
@@ -46,7 +50,20 @@ python () {
46 # setup task to modify platform init after unpack and before configure 50 # setup task to modify platform init after unpack and before configure
47 bb.build.addtask("do_zynq_platform_init", "do_configure", "do_prepare_recipe_sysroot", d) 51 bb.build.addtask("do_zynq_platform_init", "do_configure", "do_prepare_recipe_sysroot", d)
48 52
49 if "boot.bin" in d.getVar("SPL_BINARY") and d.getVar("SOC_FAMILY") in ["zynqmp"]: 53 if "boot.bin" not in d.getVar("SPL_BINARY"):
54 # not deploying the boot.bin, just building SPL
55 return
56
57 # assume that U-Boot is to provide the boot.bin if no other provides are selected or U-Boot is selected
58 providesbin = not(d.getVar("PREFERRED_PROVIDER_virtual/boot-bin")) or d.getVar("PREFERRED_PROVIDER_virtual/boot-bin") == d.getVar("PN")
59 if providesbin:
60 # add provides, if U-Boot is set to provide boot.bin
61 d.appendVar("PROVIDES", " virtual/boot-bin")
62 else:
63 # prevent U-Boot from deploying the boot.bin
64 d.setVar("SPL_BINARY", "")
65
66 if providesbin and d.getVar("SOC_FAMILY") in ["zynqmp"]:
50 # depend on the pmu-firmware build 67 # depend on the pmu-firmware build
51 d.appendVar("DEPENDS", " virtual/pmu-firmware") 68 d.appendVar("DEPENDS", " virtual/pmu-firmware")
52 # determine the path relative to the source tree 69 # determine the path relative to the source tree