Skip to contentSkip to conversation

MIPS: Add microMIPS configuration option.

PATCH New Steven J. Hill 1 participant 1 message May 11, 2012 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/9 MIPS: Add microMIPS configuration option.

From: "Steven J. Hill" <[email protected]>

This adds the option to build the Linux kernel using only the microMIPS ISA. The resulting kernel binary is, at a minimum, 20% smaller than using the MIPS32R2 ISA.

---
 arch/mips/Kconfig                      |   10 +
 arch/mips/Makefile                     |    1 +
 arch/mips/configs/sead3_defconfig      |    2 +-
 arch/mips/configs/sead3micro_defconfig | 1770 ++++++++++++++++++++++++++++++++
 4 files changed, 1782 insertions(+), 1 deletion(-)
 create mode 100644 arch/mips/configs/sead3micro_defconfig
arch/mips/Kconfig +10 -0
index a2ade2f..d0570f4 100644
@@ -2056,6 +2056,13 @@ config CPU_HAS_SMARTMIPS
 	  you don't know you probably don't have SmartMIPS and should say N
 	  here.
 
+config CPU_MICROMIPS
+	depends on SYS_SUPPORTS_MICROMIPS
+	bool "Build kernel using microMIPS ISA"
+	help
+	  When this option is enabled the kernel will be built using the
+	  microMIPS ISA
+
 config CPU_HAS_WB
 	bool
 
@@ -2121,6 +2128,9 @@ config SYS_SUPPORTS_HIGHMEM
 config SYS_SUPPORTS_SMARTMIPS
 	bool
 
+config SYS_SUPPORTS_MICROMIPS
+	bool
+
 config ARCH_FLATMEM_ENABLE
 	def_bool y
 	depends on !NUMA && !CPU_LOONGSON2
arch/mips/Makefile +1 -0
index 4fedf5a..5370458 100644
@@ -114,6 +114,7 @@ cflags-$(CONFIG_CPU_BIG_ENDIAN)		+= $(shell $(CC) -dumpmachine |grep -q 'mips.*e
 cflags-$(CONFIG_CPU_LITTLE_ENDIAN)	+= $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
 
 cflags-$(CONFIG_CPU_HAS_SMARTMIPS)	+= $(call cc-option,-msmartmips)
+cflags-$(CONFIG_CPU_MICROMIPS) += $(call cc-option,-mmicromips -mno-jals)
 
 cflags-$(CONFIG_SB1XXX_CORELIS)	+= $(call cc-option,-mno-sched-prolog) \
 				   -fno-omit-frame-pointer
arch/mips/configs/sead3_defconfig +1 -1
index 2acfdec..a2cc7fe 100644
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/mips 3.4.0-rc6 Kernel Configuration
+# Linux/mips 3.4.0-rc5 Kernel Configuration
 #
 CONFIG_MIPS=y
 
arch/mips/configs/sead3micro_defconfig new file +1770 -0

1,770 lines not on this page · raw message

Signature · 1 line
1.7.10