mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
75 lines
1.7 KiB
Diff
75 lines
1.7 KiB
Diff
|
--- 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)
|
||
|
|
||
|
@@ -79,11 +81,13 @@ FEXPORT(__kernel_entry)
|
||
|
j kernel_entry
|
||
|
#endif /* CONFIG_BOOT_RAW */
|
||
|
|
||
|
+#ifndef CONFIG_RTL931X
|
||
|
#ifdef CONFIG_IMAGE_CMDLINE_HACK
|
||
|
.ascii "CMDLINE:"
|
||
|
EXPORT(__image_cmdline)
|
||
|
.fill 0x400
|
||
|
#endif /* CONFIG_IMAGE_CMDLINE_HACK */
|
||
|
+#endif
|
||
|
|
||
|
__REF
|
||
|
|
||
|
--- 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 : {
|