mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig
Date: Tue, 16 Oct 2018 09:52:55 +0200	[thread overview]
Message-ID: <20181016075255.hsgbolfjjmyo5lcn@pengutronix.de> (raw)
In-Reply-To: <20181010120338.2717-2-a.fatoum@pengutronix.de>

On Wed, Oct 10, 2018 at 02:03:33PM +0200, Ahmad Fatoum wrote:
> while at it, remove U_BOOT_PATH, because it's PATH=$(CROSS_PATH) already
> by default.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  rules/u-boot.make | 42 ++++++++++++++++++++++++++++++++++--------
>  1 file changed, 34 insertions(+), 8 deletions(-)
> 
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index aa7a01ca8fea..46cfc192825a 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -26,6 +26,9 @@ U_BOOT_SOURCE	:= $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
>  U_BOOT_DIR	:= $(BUILDDIR)/$(U_BOOT)
>  U_BOOT_LICENSE	:= GPL-2.0-only
>  
> +U_BOOT_CONFIG	:= $(call ptx/in-platformconfigdir, \
> +		$(call remove_quotes, $(PTXCONF_U_BOOT_CONFIG)))

So, I'm pretty sure that the u-boot 'config' was simply a make target in
the past, not a config file.
Has this changed for all target or do we need an option to support both?

> +
>  # ----------------------------------------------------------------------------
>  # Prepare
>  # ----------------------------------------------------------------------------
> @@ -37,17 +40,26 @@ U_BOOT_WRAPPER_BLACKLIST := \
>  	TARGET_DEBUG \
>  	TARGET_BUILD_ID
>  
> -U_BOOT_PATH	:= PATH=$(CROSS_PATH)
> -U_BOOT_MAKE_OPT	:= CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
> +U_BOOT_CONF_ENV	:= KCONFIG_NOTIMESTAMP=1
> +U_BOOT_CONF_TOOL	:= kconfig
> +U_BOOT_CONF_OPT	:= CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
>  U_BOOT_MAKE_PAR	:= NO
>  U_BOOT_TAGS_OPT	:= ctags cscope etags
> +U_BOOT_MAKE_OPT	:= $(U_BOOT_CONF_OPT)
>  
> -$(STATEDIR)/u-boot.prepare:
> -	@$(call targetinfo)
> -	cd $(U_BOOT_DIR) && \
> -		$(U_BOOT_PATH) \
> -		$(MAKE) $(U_BOOT_MAKE_OPT) $(PTXCONF_U_BOOT_CONFIG)
> -	@$(call touch)
> +ifdef PTXCONF_U_BOOT
> +$(U_BOOT_CONFIG):
> +	@echo
> +	@echo "****************************************************************************"
> +	@echo "***** Please generate a u-boot config with 'ptxdist menuconfig u-boot' *****"
> +	@echo "****************************************************************************"
> +	@echo
> +	@echo
> +	@exit 1
> +endif
> +
> +
> +$(STATEDIR)/u-boot.prepare: $(U_BOOT_CONFIG)
>  
>  # ----------------------------------------------------------------------------
>  # Install
> @@ -91,4 +103,18 @@ $(STATEDIR)/u-boot.clean:
>  	@rm -f $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec $(IMAGEDIR)/u-boot.elf
>  	@rm -f $(IMAGEDIR)/u-boot.imx
>  
> +# ----------------------------------------------------------------------------
> +# oldconfig / menuconfig
> +# ----------------------------------------------------------------------------
> +
> +u-boot_oldconfig u-boot_menuconfig u-boot_nconfig: $(STATEDIR)/u-boot.extract
> +	@$(call world/kconfig-setup, U_BOOT)
> +
> +	@cd $(U_BOOT_DIR) && \
> +		$(U_BOOT_PATH) $(U_BOOT_ENV) $(MAKE) $(U_BOOT_CONF_OPT) \
> +		$(subst u-boot_,,$@)
> +
> +	@$(call world/kconfig-sync, U_BOOT)

I think world/kconfig should be possible here (see kernel/barebox templates
for an example).
This open coded version is only needed if _MAKEVARS is used.

Michael

> +
> +
>  # vim: syntax=make
> -- 
> 2.19.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2018-10-16  7:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig Ahmad Fatoum
2018-10-16  7:52   ` Michael Olbrich [this message]
2018-10-16  8:02     ` Alexander Dahl
2018-10-16  8:25   ` Michael Olbrich
2018-10-10 12:03 ` [ptxdist] [PATCH 3/7] u-boot: add V=$(PTXDIST_VERBOSE) to make options Ahmad Fatoum
2018-10-11  6:52   ` Alexander Dahl
2018-10-10 12:03 ` [ptxdist] [PATCH 4/7] u-boot: run install(1)/rm(1) with -v Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 5/7] u-boot: add u-boot{-dtb, -with-spl-pbl}.bin image installation options Ahmad Fatoum
2019-02-05  7:30   ` Alexander Dahl
2019-02-05  9:29     ` Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary Ahmad Fatoum
2018-10-16  8:13   ` Michael Olbrich
2018-10-16 10:58   ` Denis OSTERLAND
2018-10-16 11:27     ` Alexander Dahl
2018-10-16 12:26       ` Michael Olbrich
2018-10-16 13:13         ` Alexander Dahl
2019-04-04 14:17         ` Alexander Dahl
2018-10-16 11:20   ` Alexander Dahl
2018-10-10 12:03 ` [ptxdist] [PATCH 7/7] u-boot: allow generation of boot script Ahmad Fatoum
2018-10-11  6:44 ` [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Alexander Dahl
2018-10-11  9:05   ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181016075255.hsgbolfjjmyo5lcn@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox