Hello Christian,

Am Tue, Nov 30, 2021 at 11:39:26AM +0100 schrieb Christian Melki:
> This option sometimes breaks builds with various external dependencies.
> Especially vendor trees that have sourcedir path references.
> 
> Signed-off-by: Christian Melki <[email protected]>
> ---
>  platforms/u-boot.in | 10 ++++++++++
>  rules/u-boot.make   | 12 ++++++++++--
>  2 files changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index 410391fe8..0d8213f45 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -20,6 +20,16 @@ config U_BOOT_MD5
>       string
>       prompt "U-Boot source md5"
>  
> +config U_BOOT_BUILD_OOT
> +     prompt "Out of tree build"
> +     default y
> +     bool
> +     help
> +       U-Boot is usually built out of tree.
> +       But for some builds, f.ex. with firmware blobs, out of tree builds
> +       can break because of vendors using source paths to files.
> +       This is mostly a workaround for those type of builds.
> +
>  choice
>       prompt "config system"
>       default U_BOOT_CONFIGSYSTEM_LEGACY
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 38c32bf27..2c6a1ada4 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -23,9 +23,14 @@ U_BOOT_SUFFIX              := tar.bz2
>  U_BOOT_URL           := 
> https://ftp.denx.de/pub/u-boot/$(U_BOOT).$(U_BOOT_SUFFIX)
>  U_BOOT_SOURCE                := $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
>  U_BOOT_DIR           := $(BUILDDIR)/$(U_BOOT)
> -U_BOOT_BUILD_DIR     := $(U_BOOT_DIR)-build
>  U_BOOT_DEVPKG                := NO
> +ifdef PTXCONF_U_BOOT_BUILD_OOT
> +U_BOOT_BUILD_DIR     := $(U_BOOT_DIR)-build
>  U_BOOT_BUILD_OOT     := KEEP
> +else
> +U_BOOT_BUILD_DIR     := $(U_BOOT_DIR)
> +U_BOOT_BUILD_OOT     := NO
> +endif
>  
>  ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_KCONFIG
>  U_BOOT_CONFIG        := $(call ptx/in-platformconfigdir, \
> @@ -54,10 +59,13 @@ U_BOOT_WRAPPER_BLACKLIST := \
>  
>  U_BOOT_CONF_OPT              := \
>       -C $(U_BOOT_DIR) \
> -     O=$(U_BOOT_BUILD_DIR) \
>       V=$(PTXDIST_VERBOSE) \
>       $(call remove_quotes,$(PTXCONF_U_BOOT_CUSTOM_MAKE_OPTS))
>  
> +ifdef PTXCONF_U_BOOT_BUILD_OOT
> +U_BOOT_CONF_OPT              += O=$(U_BOOT_BUILD_DIR)
> +endif
> +
>  U_BOOT_MAKE_ENV              := \
>       CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
>       HOSTCC=$(HOSTCC)

LGTM.

Tested-by: Alexander Dahl <[email protected]>

Greets
Alex


_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to