* [Buildroot] [PATCH 1/1] linux: align endiness based on BR config
@ 2016-05-19 13:17 oferh at marvell.com
2016-06-11 14:20 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: oferh at marvell.com @ 2016-05-19 13:17 UTC (permalink / raw)
To: buildroot
From: Ofer Heifetz <oferh@marvell.com>
Linux endiness should be based on BR2_ENDIAN,
this commit alignes linux endian with BR.
Signed-off-by: Ofer Heifetz <oferh@marvell.com>
---
linux/linux.mk | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/linux/linux.mk b/linux/linux.mk
index d88060e..58af369 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -209,6 +209,16 @@ LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS)
# If no package has yet set it, set it from the Kconfig option
LINUX_NEEDS_MODULES ?= $(BR2_LINUX_NEEDS_MODULES)
+ifeq ($(BR2_ENDIAN),"BIG")
+define LINUX_FIXUP_CONFIG_ENDIANNESS
+ $(call KCONFIG_ENABLE_OPT,CONFIG_CPU_BIG_ENDIAN,$(@D)/.config)
+endef
+else
+define LINUX_FIXUP_CONFIG_ENDIANNESS
+ $(call KCONFIG_ENABLE_OPT,CONFIG_CPU_LITTLE_ENDIAN,$(@D)/.config)
+endef
+endif
+
define LINUX_KCONFIG_FIXUP_CMDS
$(if $(LINUX_NEEDS_MODULES),
$(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config))
@@ -216,6 +226,7 @@ define LINUX_KCONFIG_FIXUP_CMDS
$(foreach opt, $(LINUX_COMPRESSION_OPT_),
$(call KCONFIG_DISABLE_OPT,$(opt),$(@D)/.config)
)
+ $(LINUX_FIXUP_CONFIG_ENDIANNESS)
$(if $(BR2_arm)$(BR2_armeb),
$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
$(if $(BR2_TARGET_ROOTFS_CPIO),
--
2.8.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] linux: align endiness based on BR config
2016-05-19 13:17 [Buildroot] [PATCH 1/1] linux: align endiness based on BR config oferh at marvell.com
@ 2016-06-11 14:20 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-06-11 14:20 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 19 May 2016 16:17:03 +0300, oferh at marvell.com wrote:
> From: Ofer Heifetz <oferh@marvell.com>
>
> Linux endiness should be based on BR2_ENDIAN,
> this commit alignes linux endian with BR.
>
> Signed-off-by: Ofer Heifetz <oferh@marvell.com>
> ---
> linux/linux.mk | 11 +++++++++++
> 1 file changed, 11 insertions(+)
Applied to master with a few minor tweaks (endiness -> endianness,
added a comment in the .mk file, etc.).
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-11 14:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-19 13:17 [Buildroot] [PATCH 1/1] linux: align endiness based on BR config oferh at marvell.com
2016-06-11 14:20 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox