summaryrefslogtreecommitdiff
path: root/target/linux/generic/patches-2.6.39/334-mips-fix-compiling-failure-of-relocate_kernel.patch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-01-07 16:29:16 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-01-07 16:29:16 +0000
commitc2243d1fb9e44f9f4dbf83f8e85b4d52b30aea82 (patch)
treefea5a7ecead9e3e4bb44cb019e8caad46453fd00 /target/linux/generic/patches-2.6.39/334-mips-fix-compiling-failure-of-relocate_kernel.patch
parent66663e28094813f57d1d1124bd7397d2189f5ee5 (diff)
generic: improve MIPS kexec support
It is based on patches from the linux-longsoon-community git tree: http://dev.lemote.com/cgit/linux-loongson-community.git/ Now the kernel can use the command line parameter from kexec-tools. Runtime tested on ar71xx with 2.6.39.4 (the wathdog must be stopped before executing the new kernel). Compile tested with lantiq (3.1.4) and brcm47xx (3.0.12). git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29674 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-2.6.39/334-mips-fix-compiling-failure-of-relocate_kernel.patch')
-rw-r--r--target/linux/generic/patches-2.6.39/334-mips-fix-compiling-failure-of-relocate_kernel.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/target/linux/generic/patches-2.6.39/334-mips-fix-compiling-failure-of-relocate_kernel.patch b/target/linux/generic/patches-2.6.39/334-mips-fix-compiling-failure-of-relocate_kernel.patch
new file mode 100644
index 0000000000..46a7395d5d
--- /dev/null
+++ b/target/linux/generic/patches-2.6.39/334-mips-fix-compiling-failure-of-relocate_kernel.patch
@@ -0,0 +1,83 @@
+From 4aded085fa0057a9a1e1dcec631f950307360c1f Mon Sep 17 00:00:00 2001
+From: Wu Zhangjin <wuzhangjin@gmail.com>
+Date: Tue, 11 Jan 2011 13:46:19 +0000
+Subject: MIPS: Fix compiling failure of relocate_kernel.S
+
+The following errors is fixed with the help of <asm/asm_nosec.h>. for
+this file need to put different symbols in the same section, the
+original LEAF, NESTED and EXPORT (without explicit section indication)
+must be used, <asm/asm_nosec.h> does it.
+
+arch/mips/kernel/relocate_kernel.S: Assembler messages:
+arch/mips/kernel/relocate_kernel.S:162: Error: operation combines symbols in different segments
+
+Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
+---
+(limited to 'arch/mips/kernel')
+
+--- a/arch/mips/kernel/relocate_kernel.S
++++ b/arch/mips/kernel/relocate_kernel.S
+@@ -7,6 +7,7 @@
+ */
+
+ #include <asm/asm.h>
++#include <asm/asm_nosec.h>
+ #include <asm/asmmacro.h>
+ #include <asm/regdef.h>
+ #include <asm/page.h>
+--- /dev/null
++++ b/arch/mips/include/asm/asm_nosec.h
+@@ -0,0 +1,53 @@
++/*
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file "COPYING" in the main directory of this archive
++ * for more details.
++ *
++ * Copyright (C) 1995, 1996, 1997, 1999, 2001 by Ralf Baechle
++ * Copyright (C) 1999 by Silicon Graphics, Inc.
++ * Copyright (C) 2001 MIPS Technologies, Inc.
++ * Copyright (C) 2002 Maciej W. Rozycki
++ * Copyright (C) 2010 Wu Zhangjin <wuzhangjin@gmail.com>
++ *
++ * Derive from <asm/asm.h>
++ *
++ * Override the macros without -ffunction-sections and -fdata-sections support.
++ * If several functions or data must be put in the same section, please include
++ * this header file after the <asm/asm.h> to override the generic definition.
++ */
++
++#ifndef __ASM_ASM_NOSEC_H
++#define __ASM_ASM_NOSEC_H
++
++#undef LEAF
++#undef NESTED
++#undef EXPORT
++
++/*
++ * LEAF - declare leaf routine
++ */
++#define LEAF(symbol) \
++ .globl symbol; \
++ .align 2; \
++ .type symbol, @function; \
++ .ent symbol, 0; \
++symbol: .frame sp, 0, ra
++
++/*
++ * NESTED - declare nested routine entry point
++ */
++#define NESTED(symbol, framesize, rpc) \
++ .globl symbol; \
++ .align 2; \
++ .type symbol, @function; \
++ .ent symbol, 0; \
++symbol: .frame sp, framesize, rpc
++
++/*
++ * EXPORT - export definition of symbol
++ */
++#define EXPORT(symbol) \
++ .globl symbol; \
++symbol:
++
++#endif /* __ASM_ASM_NOSEC_H */