linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: f.fainelli@gmail.com (Florian Fainelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
Date: Fri, 27 Nov 2015 10:39:36 -0800	[thread overview]
Message-ID: <5658A368.7080509@gmail.com> (raw)
In-Reply-To: <1448567995-8784-2-git-send-email-sbranden@broadcom.com>

Le 26/11/2015 11:59, Scott Branden a ?crit :
> Add support for switching defconfig between big and little endian CPU.
> Various CPU types have ability to select big and little endian
> CPU in the kernel configuration.
> 
> "make beconfig" will set CONFIG_CPU_BIG_ENDIAN
> "make leconfig" will unset CONFIG_CPU_BIG_ENDIAN

I believe I understand what you are trying to achieve here, which is to
have an identical defconfig file that you can share between a big-endian
and little-endian kernel?

Is not this something better left to a build system which understands
what config fragments are in general?

Since we seem to have support for fragments now with kvm and friends,
having this does not seem to be a big stretch though.

> 
> Signed-off-by: Scott Branden <sbranden@broadcom.com>
> ---
>  kernel/configs/be.config |  1 +
>  kernel/configs/le.config |  1 +
>  scripts/kconfig/Makefile | 10 ++++++++++
>  3 files changed, 12 insertions(+)
>  create mode 100644 kernel/configs/be.config
>  create mode 100644 kernel/configs/le.config
> 
> diff --git a/kernel/configs/be.config b/kernel/configs/be.config
> new file mode 100644
> index 0000000..c5cdc99
> --- /dev/null
> +++ b/kernel/configs/be.config
> @@ -0,0 +1 @@
> +CONFIG_CPU_BIG_ENDIAN=y
> diff --git a/kernel/configs/le.config b/kernel/configs/le.config
> new file mode 100644
> index 0000000..be479cf
> --- /dev/null
> +++ b/kernel/configs/le.config
> @@ -0,0 +1 @@
> +# CONFIG_CPU_BIG_ENDIAN is not set
> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index d79cba4..2e8007e 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -126,6 +126,14 @@ PHONY += tinyconfig
>  tinyconfig:
>  	$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
>  
> +PHONY += beconfig
> +beconfig: be.config
> +	@:
> +
> +PHONY += leconfig
> +leconfig: le.config
> +	@:
> +
>  # Help text used by make help
>  help:
>  	@echo  '  config	  - Update current config utilising a line-oriented program'
> @@ -151,6 +159,8 @@ help:
>  	@echo  '  kvmconfig	  - Enable additional options for kvm guest kernel support'
>  	@echo  '  xenconfig       - Enable additional options for xen dom0 and guest kernel support'
>  	@echo  '  tinyconfig	  - Configure the tiniest possible kernel'
> +	@echo  '  beconfig	  - Update current config to use big endian CPU'
> +	@echo  '  leconfig	  - Update current config to use little endian CPU'
>  
>  # lxdialog stuff
>  check-lxdialog  := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
> 


-- 
Florian

  parent reply	other threads:[~2015-11-27 18:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 19:59 [PATCH 0/1] kconfig: add CPU endian selection beconfig and leconfig Scott Branden
2015-11-26 19:59 ` [PATCH 1/1] " Scott Branden
2015-11-27 15:59   ` Arnd Bergmann
2015-11-27 23:45     ` Scott Branden
2015-11-27 18:39   ` Florian Fainelli [this message]
2015-11-27 23:49     ` Scott Branden
2015-11-30 19:26       ` Florian Fainelli

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=5658A368.7080509@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).