[U-Boot] [PATCH v3 4/7] tegra: Always build a boot image with the same filename

Stephen Warren swarren at wwwdotorg.org
Mon Feb 1 23:52:50 CET 2016


On 01/31/2016 06:10 PM, Simon Glass wrote:
> Adjust the Makefile to build u-boot-tegra.bin which contains a device tree
> if OF_SEPARATE is enabled, and does not if not. This mirrors U-Boot's new
> approach of using u-boot.bin to handle both cases.

> diff --git a/Makefile b/Makefile

>   # enable combined SPL/u-boot/dtb rules for tegra
>   ifeq ($(CONFIG_TEGRA)$(CONFIG_SPL),yy)
> -ALL-y += u-boot-nodtb-tegra.bin
> +ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin
>   ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb-tegra.bin
>   endif

This seems different to the ALL-y entries for u-boot.bin and its 
-dtb/-nodtb variants. I believe that in that case, only u-boot.bin is in 
ALL-Y. No doubt my next comment is related.

> @@ -1080,9 +1080,12 @@ OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
>   u-boot-nodtb-tegra.bin: spl/u-boot-spl u-boot-nodtb.bin FORCE
>   	$(call if_changed,pad_cat)
>
> -OBJCOPYFLAGS_u-boot-dtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
> -u-boot-dtb-tegra.bin: spl/u-boot-spl u-boot-dtb.bin FORCE
> +OBJCOPYFLAGS_u-boot-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
> +u-boot-tegra.bin: spl/u-boot-spl u-boot-dtb.bin FORCE
>   	$(call if_changed,pad_cat)
> +
> +u-boot-dtb-tegra.bin: u-boot-tegra.bin FORCE
> +	$(call if_changed,copy)
>   endif

That looks different to how the main u-boot.bin is handled too. There, 
u-boot.bin is a copy of u-boot-nodtb.bin or u-boot-dtb.bin depending on 
whether a DTB is in use. Here, the copy operation is backwards; 
u-boot-dt-tegra.bin gets copied from u-boot-tegra.bin (which actually 
might not contain a DTB if OF_SEPARATE isn't enabled).

Shouldn't the two sets of rules use identical schemes for the dependency 
chain so it's easy to compare the rules?


More information about the U-Boot mailing list