* [PATCH 0/1] kconfig: add CPU endian selection beconfig and leconfig
@ 2015-11-26 19:59 ` Scott Branden
0 siblings, 0 replies; 14+ messages in thread
From: Scott Branden @ 2015-11-26 19:59 UTC (permalink / raw)
To: Yann E. MORIN
Cc: linux-kernel, linux-arm-kernel, bcm-kernel-feedback-list, Scott Branden
The proposed patch allows a defconfig to be changed to big or little endian
by adding "make beconfig" and "make leconfig" functionality.
This follows on from a discussion with existing arm64 builds and lack of
ability to build for a big endian defconfig as such defconfig is not in
the upstream kernel.
Discussion started on the arm mailing list:
http://www.spinics.net/lists/arm-kernel/msg462636.html
The same problem applies to various architecture families so it makes
sense to apply at a higher level as proposed.
This patchset is based on v4.4-rc1 and is available from github:
repo: https://github.com/Broadcom/arm64-linux.git
branch: kconfig-endian-v1
Scott Branden (1):
kconfig: add CPU endian selection beconfig and leconfig
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
--
2.5.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 0/1] kconfig: add CPU endian selection beconfig and leconfig
@ 2015-11-26 19:59 ` Scott Branden
0 siblings, 0 replies; 14+ messages in thread
From: Scott Branden @ 2015-11-26 19:59 UTC (permalink / raw)
To: linux-arm-kernel
The proposed patch allows a defconfig to be changed to big or little endian
by adding "make beconfig" and "make leconfig" functionality.
This follows on from a discussion with existing arm64 builds and lack of
ability to build for a big endian defconfig as such defconfig is not in
the upstream kernel.
Discussion started on the arm mailing list:
http://www.spinics.net/lists/arm-kernel/msg462636.html
The same problem applies to various architecture families so it makes
sense to apply at a higher level as proposed.
This patchset is based on v4.4-rc1 and is available from github:
repo: https://github.com/Broadcom/arm64-linux.git
branch: kconfig-endian-v1
Scott Branden (1):
kconfig: add CPU endian selection beconfig and leconfig
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
--
2.5.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
2015-11-26 19:59 ` Scott Branden
@ 2015-11-26 19:59 ` Scott Branden
-1 siblings, 0 replies; 14+ messages in thread
From: Scott Branden @ 2015-11-26 19:59 UTC (permalink / raw)
To: Yann E. MORIN
Cc: linux-kernel, linux-arm-kernel, bcm-kernel-feedback-list, Scott Branden
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
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
--
2.5.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
@ 2015-11-26 19:59 ` Scott Branden
0 siblings, 0 replies; 14+ messages in thread
From: Scott Branden @ 2015-11-26 19:59 UTC (permalink / raw)
To: linux-arm-kernel
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
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
--
2.5.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
2015-11-26 19:59 ` Scott Branden
@ 2015-11-27 15:59 ` Arnd Bergmann
-1 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2015-11-27 15:59 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Scott Branden, Yann E. MORIN, bcm-kernel-feedback-list, linux-kernel
On Thursday 26 November 2015 11:59:55 Scott Branden wrote:
> @@ -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'
>
>
Most architectures don't actually support picking the endianess, I think
it would be better to keep this architecture specific in some form. If we
limit it to ARM/ARM64, we might not need the leconfig target at all, because
that is the default for all defconfig files in the kernel aside from ixp4xx,
which we can probably ignore here.
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
@ 2015-11-27 15:59 ` Arnd Bergmann
0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2015-11-27 15:59 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday 26 November 2015 11:59:55 Scott Branden wrote:
> @@ -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'
>
>
Most architectures don't actually support picking the endianess, I think
it would be better to keep this architecture specific in some form. If we
limit it to ARM/ARM64, we might not need the leconfig target at all, because
that is the default for all defconfig files in the kernel aside from ixp4xx,
which we can probably ignore here.
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
2015-11-26 19:59 ` Scott Branden
@ 2015-11-27 18:39 ` Florian Fainelli
-1 siblings, 0 replies; 14+ messages in thread
From: Florian Fainelli @ 2015-11-27 18:39 UTC (permalink / raw)
To: Scott Branden, Yann E. MORIN
Cc: bcm-kernel-feedback-list, linux-kernel, linux-arm-kernel
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
@ 2015-11-27 18:39 ` Florian Fainelli
0 siblings, 0 replies; 14+ messages in thread
From: Florian Fainelli @ 2015-11-27 18:39 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
2015-11-27 15:59 ` Arnd Bergmann
@ 2015-11-27 23:45 ` Scott Branden
-1 siblings, 0 replies; 14+ messages in thread
From: Scott Branden @ 2015-11-27 23:45 UTC (permalink / raw)
To: Arnd Bergmann, linux-arm-kernel
Cc: Yann E. MORIN, bcm-kernel-feedback-list, linux-kernel
Hi Arnd,
Thanks for comment - I forgot to directly add you to CC list so was
going to add you in a couple days if you didn't find this patch proposal.
Response below.
On 15-11-27 07:59 AM, Arnd Bergmann wrote:
> On Thursday 26 November 2015 11:59:55 Scott Branden wrote:
>> @@ -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'
>>
>>
>
> Most architectures don't actually support picking the endianess, I think
> it would be better to keep this architecture specific in some form. If we
> limit it to ARM/ARM64, we might not need the leconfig target at all, because
> that is the default for all defconfig files in the kernel aside from ixp4xx,
> which we can probably ignore here.
Yes, I thought about placing le.config in arm64/configs. Then I would
need it in arm/configs also.
CONFIG_CPU_BIG_ENDIAN is currently used by arc, sh, c6x, powerpc, arm,
arm64, and mips. Then the next architecture comes along.
So to have the same feature on those architectures they would also need
le.config in their configs directory.
running "make leconfig" or "make beconfig" on architectures that do not
support CPU_BIG_ENDIAN has no harmful side affect other than the
endianness selection will not change.
For these reasons placing the functionality in kernel/configs alongside
xen.config seemed like the sensible thing to do. kernel/configs seems
like a very good place to add more .config selection options to as well.
Of course, whatever method is selected to switch between big and little
endian sharing a single defconfig I'm open to.
>
> Arnd
>
Thanks for comment.
Scott
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
@ 2015-11-27 23:45 ` Scott Branden
0 siblings, 0 replies; 14+ messages in thread
From: Scott Branden @ 2015-11-27 23:45 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
Thanks for comment - I forgot to directly add you to CC list so was
going to add you in a couple days if you didn't find this patch proposal.
Response below.
On 15-11-27 07:59 AM, Arnd Bergmann wrote:
> On Thursday 26 November 2015 11:59:55 Scott Branden wrote:
>> @@ -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'
>>
>>
>
> Most architectures don't actually support picking the endianess, I think
> it would be better to keep this architecture specific in some form. If we
> limit it to ARM/ARM64, we might not need the leconfig target at all, because
> that is the default for all defconfig files in the kernel aside from ixp4xx,
> which we can probably ignore here.
Yes, I thought about placing le.config in arm64/configs. Then I would
need it in arm/configs also.
CONFIG_CPU_BIG_ENDIAN is currently used by arc, sh, c6x, powerpc, arm,
arm64, and mips. Then the next architecture comes along.
So to have the same feature on those architectures they would also need
le.config in their configs directory.
running "make leconfig" or "make beconfig" on architectures that do not
support CPU_BIG_ENDIAN has no harmful side affect other than the
endianness selection will not change.
For these reasons placing the functionality in kernel/configs alongside
xen.config seemed like the sensible thing to do. kernel/configs seems
like a very good place to add more .config selection options to as well.
Of course, whatever method is selected to switch between big and little
endian sharing a single defconfig I'm open to.
>
> Arnd
>
Thanks for comment.
Scott
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
2015-11-27 18:39 ` Florian Fainelli
@ 2015-11-27 23:49 ` Scott Branden
-1 siblings, 0 replies; 14+ messages in thread
From: Scott Branden @ 2015-11-27 23:49 UTC (permalink / raw)
To: Florian Fainelli, Yann E. MORIN
Cc: bcm-kernel-feedback-list, linux-kernel, linux-arm-kernel
Hi Florian,
On 15-11-27 10:39 AM, Florian Fainelli wrote:
> 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?
You understand correct - ARM64 maintainers have only allowed 1 defconfig
upstream and it supports little endian. And it doesn't make sense to
have another defconfig with a single line difference upstreamed. Yet
the defconfig does not allow the system to boot in big endian mode.
>
> Is not this something better left to a build system which understands
> what config fragments are in general?
Every build system would need to invent their own procedure. By adding
this into the upstream kernel there is no need to.
make defconfig
make beconfig (or make leconfig)
make
>
> Since we seem to have support for fragments now with kvm and friends,
> having this does not seem to be a big stretch though.
Yes, that is why I proposed place it in a common location.
>
>>
>> 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
>>
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
@ 2015-11-27 23:49 ` Scott Branden
0 siblings, 0 replies; 14+ messages in thread
From: Scott Branden @ 2015-11-27 23:49 UTC (permalink / raw)
To: linux-arm-kernel
Hi Florian,
On 15-11-27 10:39 AM, Florian Fainelli wrote:
> 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?
You understand correct - ARM64 maintainers have only allowed 1 defconfig
upstream and it supports little endian. And it doesn't make sense to
have another defconfig with a single line difference upstreamed. Yet
the defconfig does not allow the system to boot in big endian mode.
>
> Is not this something better left to a build system which understands
> what config fragments are in general?
Every build system would need to invent their own procedure. By adding
this into the upstream kernel there is no need to.
make defconfig
make beconfig (or make leconfig)
make
>
> Since we seem to have support for fragments now with kvm and friends,
> having this does not seem to be a big stretch though.
Yes, that is why I proposed place it in a common location.
>
>>
>> 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
>>
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
2015-11-27 23:49 ` Scott Branden
@ 2015-11-30 19:26 ` Florian Fainelli
-1 siblings, 0 replies; 14+ messages in thread
From: Florian Fainelli @ 2015-11-30 19:26 UTC (permalink / raw)
To: Scott Branden, Florian Fainelli, Yann E. MORIN
Cc: bcm-kernel-feedback-list, linux-kernel, linux-arm-kernel
On 27/11/15 15:49, Scott Branden wrote:
> Hi Florian,
>
> On 15-11-27 10:39 AM, Florian Fainelli wrote:
>> 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?
> You understand correct - ARM64 maintainers have only allowed 1 defconfig
> upstream and it supports little endian. And it doesn't make sense to
> have another defconfig with a single line difference upstreamed. Yet
> the defconfig does not allow the system to boot in big endian mode.
>>
>> Is not this something better left to a build system which understands
>> what config fragments are in general?
> Every build system would need to invent their own procedure. By adding
> this into the upstream kernel there is no need to.
> make defconfig
> make beconfig (or make leconfig)
> make
In my experience build systems like OpenWrt, Yocto/OE know about config
fragments, but have a harder time dealing with running multiple make
targets within the Linux source tree...
>>
>> Since we seem to have support for fragments now with kvm and friends,
>> having this does not seem to be a big stretch though.
> Yes, that is why I proposed place it in a common location.
Fair enough.
--
Florian
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/1] kconfig: add CPU endian selection beconfig and leconfig
@ 2015-11-30 19:26 ` Florian Fainelli
0 siblings, 0 replies; 14+ messages in thread
From: Florian Fainelli @ 2015-11-30 19:26 UTC (permalink / raw)
To: linux-arm-kernel
On 27/11/15 15:49, Scott Branden wrote:
> Hi Florian,
>
> On 15-11-27 10:39 AM, Florian Fainelli wrote:
>> 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?
> You understand correct - ARM64 maintainers have only allowed 1 defconfig
> upstream and it supports little endian. And it doesn't make sense to
> have another defconfig with a single line difference upstreamed. Yet
> the defconfig does not allow the system to boot in big endian mode.
>>
>> Is not this something better left to a build system which understands
>> what config fragments are in general?
> Every build system would need to invent their own procedure. By adding
> this into the upstream kernel there is no need to.
> make defconfig
> make beconfig (or make leconfig)
> make
In my experience build systems like OpenWrt, Yocto/OE know about config
fragments, but have a harder time dealing with running multiple make
targets within the Linux source tree...
>>
>> Since we seem to have support for fragments now with kvm and friends,
>> having this does not seem to be a big stretch though.
> Yes, that is why I proposed place it in a common location.
Fair enough.
--
Florian
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-11-30 19:27 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-26 19:59 [PATCH 0/1] kconfig: add CPU endian selection beconfig and leconfig Scott Branden
2015-11-26 19:59 ` Scott Branden
2015-11-26 19:59 ` [PATCH 1/1] " Scott Branden
2015-11-26 19:59 ` Scott Branden
2015-11-27 15:59 ` Arnd Bergmann
2015-11-27 15:59 ` Arnd Bergmann
2015-11-27 23:45 ` Scott Branden
2015-11-27 23:45 ` Scott Branden
2015-11-27 18:39 ` Florian Fainelli
2015-11-27 18:39 ` Florian Fainelli
2015-11-27 23:49 ` Scott Branden
2015-11-27 23:49 ` Scott Branden
2015-11-30 19:26 ` Florian Fainelli
2015-11-30 19:26 ` Florian Fainelli
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.