All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shreyansh Jain <shreyansh.jain@nxp.com>
To: David Hunt <david.hunt@intel.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>
Subject: Re: [PATCH v1 2/2] mk: add sensible default target with defconfig
Date: Wed, 24 May 2017 11:40:09 +0530	[thread overview]
Message-ID: <da8fe17f-ab54-431a-5c5e-af4b542d4ec2@nxp.com> (raw)
In-Reply-To: <1495535304-159542-3-git-send-email-david.hunt@intel.com>

Hello David,

On Tuesday 23 May 2017 03:58 PM, David Hunt wrote:
> Users can now use 'make defconfig' to generate a configuration using
> the most appropriate defaults for the current machine.
>
> <arch-machine-execenv-toolchain>
>   arch taken from uname -m
>   machine defaults to native
>   execenv is taken from uname, Linux=linuxapp, otherwise bsdapp
>   toolchain is taken from $CC -v to see which compiler to use
>
> Signed-off-by: David Hunt <david.hunt@intel.com>
> ---
>  mk/rte.sdkconfig.mk | 15 ++++++++++++---
>  mk/rte.sdkroot.mk   |  4 ++--
>  2 files changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
> index 1f2d6bd..4f30d56 100644
> --- a/mk/rte.sdkconfig.mk
> +++ b/mk/rte.sdkconfig.mk
> @@ -60,16 +60,25 @@ showconfigs:
>
>  .PHONY: notemplate
>  notemplate:
> -	@printf "No template specified. "
> -	@echo "Use T=template among the following list:"
> +	@printf "No template specified. Use 'make defconfig' or "
> +	@echo "use T=template from the following list:"
>  	@$(MAKE) -rR showconfigs | sed 's,^,  ,'
>
> +
> +.PHONY: defconfig
> +defconfig:
> +	@$(MAKE) config T=$(shell uname -m)-native-$(shell uname | \

The idea to have 'make defconfig' do the works looks great to me.
I am just worried about the above line - it wouldn't allow
configurations like
arm64-dpaa2-linuxapp-gcc or arm64-armv8a-linuxapp-gcc
Basically, having the MACHINE default to 'native' would not be right in 
all cases.

But, I don't have a better idea about how to detect this automatically.
Or, we might use RTE_MACHINE someway.

> +		awk '{ if ($$0 == "Linux") {print "linuxapp"} else \
> +		{print "bsdapp"} }')-$(shell ${CC} -v 2>&1 \
> +		| grep " version " | cut -d ' ' -f 1)
> +
>  .PHONY: config
>  ifeq ($(RTE_CONFIG_TEMPLATE),)
>  config: notemplate
>  else
>  config: $(RTE_OUTPUT)/include/rte_config.h $(RTE_OUTPUT)/Makefile
> -	@echo "Configuration done"
> +	@echo "Configuration done using "$(shell basename \
> +		$(RTE_CONFIG_TEMPLATE) | sed "s/defconfig_//g")
>  endif
>
>  $(RTE_OUTPUT):
> diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
> index 9bdaf20..8019603 100644
> --- a/mk/rte.sdkroot.mk
> +++ b/mk/rte.sdkroot.mk
> @@ -90,8 +90,8 @@ export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n
>  .PHONY: default
>  default: all
>
> -.PHONY: config showconfigs showversion showversionum
> -config showconfigs showversion showversionum:
> +.PHONY: defconfig config showconfigs showversion showversionum
> +defconfig config showconfigs showversion showversionum:
>  	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@
>
>  .PHONY: cscope gtags tags etags
>

Other than that, I tried this patch for x86 and it worked fine.

-
Shreyansh

  reply	other threads:[~2017-05-24  6:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 10:28 mk: make config enhancements David Hunt
2017-05-23 10:28 ` [PATCH v1 1/2] mk: allow use of environment var for make config David Hunt
2017-05-23 10:28 ` [PATCH v1 2/2] mk: add sensible default target with defconfig David Hunt
2017-05-24  6:10   ` Shreyansh Jain [this message]
2017-05-25 13:04     ` Hunt, David
2017-05-25 13:19       ` Shreyansh Jain
2017-05-26  8:52   ` [PATCH v2 0/2] mk: make config enhancements David Hunt
2017-05-26  8:52     ` [PATCH v2 1/2] mk: allow use of environment var for make config David Hunt
2017-06-07  8:39       ` Hunt, David
2017-06-07  9:36         ` Shreyansh Jain
2017-06-07 10:28           ` Hunt, David
2017-06-07 11:46             ` Shreyansh Jain
2017-06-07 12:07               ` Bruce Richardson
2017-06-07 14:37       ` [PATCH v3 0/3] mk: make config enhancements David Hunt
2017-06-07 14:37         ` [PATCH v3 1/3] mk: add sensible default target with defconfig David Hunt
2017-06-12  8:36           ` Jerin Jacob
2017-08-03 22:39           ` Thomas Monjalon
2017-08-04  8:22             ` Hunt, David
2017-08-04  9:36               ` Thomas Monjalon
2017-08-04  9:53                 ` Hunt, David
2017-08-04 10:05                   ` Thomas Monjalon
2017-08-04 10:42                     ` Hunt, David
2017-08-04 10:28           ` [PATCH v4] " David Hunt
2017-08-04 10:39             ` [PATCH v5] " David Hunt
2017-08-05  8:24               ` Thomas Monjalon
2017-06-07 14:37         ` [PATCH v3 2/3] mk: allow use of environment var for template David Hunt
2017-06-12  8:37           ` Jerin Jacob
2017-08-03 22:42           ` Thomas Monjalon
2017-06-07 14:37         ` [PATCH v3 3/3] doc: update build-sdk-quick txt file David Hunt
2017-06-12 12:50           ` Mcnamara, John
2018-02-13 12:18             ` Ferruh Yigit
2018-02-13 23:41               ` Thomas Monjalon
2018-04-11  8:44                 ` Hunt, David
2018-04-11  8:49                   ` Thomas Monjalon
2017-05-26  8:52     ` [PATCH v2 2/2] mk: add sensible default target with defconfig David Hunt
2017-05-29  7:31     ` [PATCH v2 0/2] mk: make config enhancements Shreyansh Jain

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=da8fe17f-ab54-431a-5c5e-af4b542d4ec2@nxp.com \
    --to=shreyansh.jain@nxp.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.