> -----Original Message-----
> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
> boun...@yoctoproject.org] On Behalf Of Nathan Rossi
> Sent: Sunday, December 03, 2017 1:03 AM
> To: meta-xilinx@yoctoproject.org
> Subject: [meta-xilinx] [PATCH 1/2] 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 <nat...@nathanrossi.com>
> ---
>  recipes-bsp/u-boot/u-boot-spl-zynq-init.inc | 21 +++++++++++++++++++--
>  1 file 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 2123e27168..50eae1f129 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 () {
>                  return c[0:len(c) - len(i)]
>          return c
> 
> +    if d.getVar("SOC_FAMILY") not in ["zynq", "zynqmp"]:
> +        # continue on this is not a zynq/zynqmp target
> +        return
> +
>      # Determine if target machine needs to provide a custom platform init 
> files
> -    if d.getVar("SPL_BINARY") and d.getVar("SOC_FAMILY") in ["zynq", 
> "zynqmp"]:
> +    if d.getVar("SPL_BINARY"):
>          hasconfigs = [strip_config_name(c) for c in 
> (d.getVar("HAS_PLATFORM_INIT")
> or "").split()]
>          currentconfig = strip_config_name(d.getVar("UBOOT_MACHINE"))
> 
> @@ -46,7 +50,20 @@ python () {
>              # setup task to modify platform init after unpack and before 
> configure
>              bb.build.addtask("do_zynq_platform_init", "do_configure",
> "do_prepare_recipe_sysroot", d)
> 
> -    if "boot.bin" in d.getVar("SPL_BINARY") and d.getVar("SOC_FAMILY") in
> ["zynqmp"]:
> +    if "boot.bin" not in d.getVar("SPL_BINARY"):
> +        # not deploying the boot.bin, just building SPL
> +        return
> +
> +    # assume that U-Boot is to provide the boot.bin if no other provides are 
> selected
> or U-Boot is selected
> +    providesbin = not(d.getVar("PREFERRED_PROVIDER_virtual/boot-bin")) or
> d.getVar("PREFERRED_PROVIDER_virtual/boot-bin") == d.getVar("PN")
> +    if providesbin:
> +        # add provides, if U-Boot is set to provide boot.bin
> +        d.appendVar("PROVIDES", " virtual/boot-bin")
> +    else:
> +        # prevent U-Boot from deploying the boot.bin
> +        d.setVar("SPL_BINARY", "")
> +
> +    if providesbin and d.getVar("SOC_FAMILY") in ["zynqmp"]:
>          # depend on the pmu-firmware build
>          d.appendVar("DEPENDS", " virtual/pmu-firmware")
>          # determine the path relative to the source tree
> --

ACK and applied the series

Thanks,
Manju
-- 
_______________________________________________
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to