1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
From 0b8dfe085180b58b81d2657c76b080168e3bc8df Mon Sep 17 00:00:00 2001
From: Birger Koblitz <git@birger-koblitz.de>
Date: Wed, 19 Jan 2022 18:14:02 +0100
Subject: [PATCH] realtek: Add RTL931X sub-target
We add the RTL931X sub-target with kernel configuration for
a dual core MIPS InterAptive CPU.
Submitted-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Submitted-by: Birger Koblitz <git@birger-koblitz.de>
---
arch/mips/Makefile | 10 +++++++++++++--
arch/mips/kernel/head.S | 4 ++++
aarch/mips/kernel/vmlinux.lds.S | 4 ++++
3 files changed, 18 insertions(+), 2 deletions(-)
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -307,14 +307,24 @@ endif
KBUILD_AFLAGS += $(cflags-y)
KBUILD_CFLAGS += $(cflags-y)
+ifdef CONFIG_931X
+KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y)
+bootvars-y = VMLINUX_LOAD_ADDRESS=$(load-y) \
+ VMLINUX_ENTRY_ADDRESS=$(entry-y) \
+ PLATFORM="$(platform-y)" \
+ ITS_INPUTS="$(its-y)"
+else
KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y) -DLINKER_LOAD_ADDRESS=$(load-ld)
-KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)
-
bootvars-y = VMLINUX_LOAD_ADDRESS=$(load-y) \
LINKER_LOAD_ADDRESS=$(load-ld) \
VMLINUX_ENTRY_ADDRESS=$(entry-y) \
PLATFORM="$(platform-y)" \
ITS_INPUTS="$(its-y)"
+endif
+KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)
+
+
+
ifdef CONFIG_32BIT
bootvars-y += ADDR_BITS=32
endif
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -60,12 +60,14 @@
.endm
#ifndef CONFIG_NO_EXCEPT_FILL
+#ifndef CONFIG_RTL931X
/*
* Reserved space for exception handlers.
* Necessary for machines which link their kernels at KSEG0.
*/
.fill 0x400
#endif
+#endif
EXPORT(_stext)
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -55,7 +55,11 @@ SECTIONS
/* . = 0xa800000000300000; */
. = 0xffffffff80300000;
#endif
+#ifdef CONFIG_RTL931X
+ . = 0x80220000;
+#else
. = LINKER_LOAD_ADDRESS;
+#endif
/* read-only */
_text = .; /* Text and read-only data */
.text : {
|