summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target/config/Config.in.archopts6
-rw-r--r--target/config/Config.in.binutils5
-rw-r--r--target/linux/patches/4.14.34/arm-thumb2.patch16
-rw-r--r--target/linux/patches/4.15.17/arm-thumb2.patch16
-rw-r--r--target/linux/patches/4.9.94/arm-thumb2.patch16
5 files changed, 53 insertions, 6 deletions
diff --git a/target/config/Config.in.archopts b/target/config/Config.in.archopts
index e6d5cf00e..9393a5ac8 100644
--- a/target/config/Config.in.archopts
+++ b/target/config/Config.in.archopts
@@ -10,8 +10,10 @@ config ADK_TARGET_ARCH_ARM_WITH_ARM
config ADK_TARGET_ARCH_ARM_WITH_THUMB
bool "thumb"
- select ADK_KERNEL_ARM_THUMB
- select ADK_KERNEL_THUMB2_KERNEL
+ select ADK_LINUX_KERNEL_ARM_THUMB if ADK_TARGET_OS_LINUX
+ select ADK_LINUX_KERNEL_THUMB2_KERNEL if ADK_TARGET_OS_LINUX
+ select ADK_WALDUX_KERNEL_ARM_THUMB if ADK_TARGET_OS_WALDUX
+ select ADK_WALDUX_KERNEL_THUMB2_KERNEL if ADK_TARGET_OS_WALDUX
depends on ADK_TARGET_CPU_WITH_THUMB || ADK_TARGET_CPU_WITH_THUMB2
endchoice
diff --git a/target/config/Config.in.binutils b/target/config/Config.in.binutils
index 8ba6e0898..6e3d3383c 100644
--- a/target/config/Config.in.binutils
+++ b/target/config/Config.in.binutils
@@ -7,7 +7,6 @@ default ADK_TOOLCHAIN_BINUTILS_ARC if ADK_TARGET_ARCH_ARC
default ADK_TOOLCHAIN_BINUTILS_AVR32 if ADK_TARGET_ARCH_AVR32
default ADK_TOOLCHAIN_BINUTILS_CSKY if ADK_TARGET_ARCH_CSKY
default ADK_TOOLCHAIN_BINUTILS_NDS32 if ADK_TARGET_ARCH_NDS32
-default ADK_TOOLCHAIN_BINUTILS_2_28 if ADK_TARGET_ARCH_ARM && ADK_KERNEL_THUMB2_KERNEL && ADK_TARGET_OS_LINUX
default ADK_TOOLCHAIN_BINUTILS_2_28 if ADK_TARGET_CPU_SH_J2
default ADK_TOOLCHAIN_BINUTILS_2_29 if ADK_TARGET_ARCH_CRIS
default ADK_TOOLCHAIN_BINUTILS_2_30
@@ -24,7 +23,6 @@ config ADK_TOOLCHAIN_BINUTILS_2_30
depends on !ADK_TARGET_ARCH_AVR32
depends on !ADK_TARGET_ARCH_CSKY
depends on !ADK_TARGET_ARCH_NDS32
- depends on !(ADK_TARGET_ARCH_ARM && ADK_KERNEL_THUMB2_KERNEL && ADK_TARGET_OS_LINUX)
depends on !ADK_TARGET_CPU_SH_J2
config ADK_TOOLCHAIN_BINUTILS_2_29
@@ -33,8 +31,7 @@ config ADK_TOOLCHAIN_BINUTILS_2_29
config ADK_TOOLCHAIN_BINUTILS_2_28
bool "2.28"
- depends on ADK_TARGET_CPU_SH_J2 \
- || (ADK_TARGET_ARCH_ARM && ADK_KERNEL_THUMB2_KERNEL && ADK_TARGET_OS_LINUX)
+ depends on ADK_TARGET_CPU_SH_J2
config ADK_TOOLCHAIN_BINUTILS_ARC
bool "arc-2018.03-release"
diff --git a/target/linux/patches/4.14.34/arm-thumb2.patch b/target/linux/patches/4.14.34/arm-thumb2.patch
new file mode 100644
index 000000000..d8d1f4984
--- /dev/null
+++ b/target/linux/patches/4.14.34/arm-thumb2.patch
@@ -0,0 +1,16 @@
+diff -Nur linux-4.14.34.orig/arch/arm/include/asm/assembler.h linux-4.14.34/arch/arm/include/asm/assembler.h
+--- linux-4.14.34.orig/arch/arm/include/asm/assembler.h 2018-04-12 11:32:27.000000000 +0100
++++ linux-4.14.34/arch/arm/include/asm/assembler.h 2018-04-21 17:29:06.424606334 +0100
+@@ -194,10 +194,9 @@
+ */
+ .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
+ .macro badr\c, rd, sym
+-#ifdef CONFIG_THUMB2_KERNEL
+- adr\c \rd, \sym + 1
+-#else
+ adr\c \rd, \sym
++#ifdef CONFIG_THUMB2_KERNEL
++ orr\c \rd, \rd, 1
+ #endif
+ .endm
+ .endr
diff --git a/target/linux/patches/4.15.17/arm-thumb2.patch b/target/linux/patches/4.15.17/arm-thumb2.patch
new file mode 100644
index 000000000..a5ae3d260
--- /dev/null
+++ b/target/linux/patches/4.15.17/arm-thumb2.patch
@@ -0,0 +1,16 @@
+diff -Nur linux-4.15.17.orig/arch/arm/include/asm/assembler.h linux-4.15.17/arch/arm/include/asm/assembler.h
+--- linux-4.15.17.orig/arch/arm/include/asm/assembler.h 2018-04-12 11:31:21.000000000 +0100
++++ linux-4.15.17/arch/arm/include/asm/assembler.h 2018-04-22 02:14:24.155580474 +0100
+@@ -194,10 +194,9 @@
+ */
+ .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
+ .macro badr\c, rd, sym
+-#ifdef CONFIG_THUMB2_KERNEL
+- adr\c \rd, \sym + 1
+-#else
+ adr\c \rd, \sym
++#ifdef CONFIG_THUMB2_KERNEL
++ orr\c \rd, \rd, 1
+ #endif
+ .endm
+ .endr
diff --git a/target/linux/patches/4.9.94/arm-thumb2.patch b/target/linux/patches/4.9.94/arm-thumb2.patch
new file mode 100644
index 000000000..6a42899b6
--- /dev/null
+++ b/target/linux/patches/4.9.94/arm-thumb2.patch
@@ -0,0 +1,16 @@
+diff -Nur linux-4.9.94.orig/arch/arm/include/asm/assembler.h linux-4.9.94/arch/arm/include/asm/assembler.h
+--- linux-4.9.94.orig/arch/arm/include/asm/assembler.h 2018-04-13 18:48:37.000000000 +0100
++++ linux-4.9.94/arch/arm/include/asm/assembler.h 2018-04-22 10:51:50.317450040 +0100
+@@ -192,10 +192,9 @@
+ */
+ .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
+ .macro badr\c, rd, sym
+-#ifdef CONFIG_THUMB2_KERNEL
+- adr\c \rd, \sym + 1
+-#else
+ adr\c \rd, \sym
++#ifdef CONFIG_THUMB2_KERNEL
++ orr\c \rd, \rd, 1
+ #endif
+ .endm
+ .endr