Commit 6014b728 authored by Deepak Saxena's avatar Deepak Saxena Committed by Russell King

[ARM PATCH] 1538/1: arch/arm/Makefile and KConfig Big-Endian changes

Patch from Deepak Saxena

This patch adds some hooks to arch/arm/Makefile to enable proper building
of big-endian kernels.  It also adds an option to the the top level
arm KConfig that only allows a big-endian kernel to be built if the sub-arch
KConfig sets the CONFIG_ARCH_SUPPORTS_BIG_ENDIAN boolean to true. This is
mainly there to keep people from attemtpting to build a big-endian kernel
for a system that is not capable of running in big-endian mode.
parent 7725a57a
...@@ -377,6 +377,15 @@ config ARM_THUMB ...@@ -377,6 +377,15 @@ config ARM_THUMB
If you don't know what this all is, saying Y is a safe choice. If you don't know what this all is, saying Y is a safe choice.
config CPU_BIG_ENDIAN
bool "Build big-endian kernel"
depends on ARCH_SUPPORTS_BIG_ENDIAN
help
Say Y if you plan on running a kernel in big-endian mode.
Note that your board must be properly built and your board
port must properly enable and big-endian related features
of your chipset/board/processor.
config CPU_ICACHE_DISABLE config CPU_ICACHE_DISABLE
bool "Disable I-Cache" bool "Disable I-Cache"
depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020 depends on CPU_ARM920T || CPU_ARM922T || CPU_ARM926T || CPU_ARM1020
......
...@@ -24,6 +24,12 @@ ifeq ($(CONFIG_DEBUG_INFO),y) ...@@ -24,6 +24,12 @@ ifeq ($(CONFIG_DEBUG_INFO),y)
CFLAGS +=-g CFLAGS +=-g
endif endif
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
CFLAGS += -mbig-endian
AS += -EB
LD += -EB
endif
# Select CPU dependent flags. Note that order of declaration is important; # Select CPU dependent flags. Note that order of declaration is important;
# the options further down the list override previous items. # the options further down the list override previous items.
# #
...@@ -76,7 +82,11 @@ endif ...@@ -76,7 +82,11 @@ endif
ifeq ($(CONFIG_CPU_32),y) ifeq ($(CONFIG_CPU_32),y)
PROCESSOR := armv PROCESSOR := armv
head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o head-y := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
LDFLAGS_BLOB += --oformat elf32-littlearm ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
LDFLAGS_BLOB += --oformat elf32-bigarm
else
LDFLAGS_BLOB += --oformat elf32-littlearm
endif
textaddr-y := 0xC0008000 textaddr-y := 0xC0008000
endif endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment