summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Beisert <jbe@pengutronix.de>2010-12-21 12:48:26 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-03-10 11:14:47 +0100
commit1126f04e99f5df070353c63439645b2cb15850a3 (patch)
treee52de3e501081e2879df155b4aa892f6db2af3c8
parent6ef848c1f76f0549b7820aa78b847a9b80425d06 (diff)
downloadbarebox-1126f04e99f5df070353c63439645b2cb15850a3.tar.gz
barebox-1126f04e99f5df070353c63439645b2cb15850a3.tar.xz
x86: Use the generic linker script initializing
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
-rw-r--r--arch/x86/Makefile6
-rw-r--r--arch/x86/lib/barebox.lds.S2
-rw-r--r--arch/x86/mach-i386/include/mach/barebox.lds.h (renamed from arch/x86/include/asm/barebox.lds.h)14
-rw-r--r--include/asm-generic/barebox.lds.h2
-rw-r--r--scripts/setupmbr/setupmbr.c2
5 files changed, 9 insertions, 17 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index e607b893a2..3b034c0516 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -19,7 +19,13 @@ all: $(KBUILD_IMAGE)
+machdirs := $(patsubst %,arch/x86/mach-%/,$(machine-y))
+ifeq ($(KBUILD_SRC),)
+CPPFLAGS += $(patsubst %,-I%include,$(machdirs))
+else
+CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
+endif
ifneq ($(board-y),)
BOARD := arch/x86/boards/$(board-y)/
diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S
index e0919a68ea..fffc3a55c6 100644
--- a/arch/x86/lib/barebox.lds.S
+++ b/arch/x86/lib/barebox.lds.S
@@ -20,7 +20,7 @@
*/
#undef i386
-#include <asm/barebox.lds.h>
+#include <asm-generic/barebox.lds.h>
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
diff --git a/arch/x86/include/asm/barebox.lds.h b/arch/x86/mach-i386/include/mach/barebox.lds.h
index 6cbf15f5cf..81c326e48d 100644
--- a/arch/x86/include/asm/barebox.lds.h
+++ b/arch/x86/mach-i386/include/mach/barebox.lds.h
@@ -23,20 +23,6 @@
* @brief Adapt linker script content in accordance to Kconfig settings
*/
-#define INITCALLS \
- KEEP(*(.initcall.0)) \
- KEEP(*(.initcall.1)) \
- KEEP(*(.initcall.2)) \
- KEEP(*(.initcall.3)) \
- KEEP(*(.initcall.4)) \
- KEEP(*(.initcall.5)) \
- KEEP(*(.initcall.6)) \
- KEEP(*(.initcall.7))
-
-#define BAREBOX_CMDS KEEP(*(SORT_BY_NAME(.barebox_cmd*)))
-
-#define BAREBOX_SYMS KEEP(*(__usymtab))
-
/**
* Area in the MBR of the barebox basic boot code. This offset must be in
* accordance to the 'indirect_sector_lba' label.
diff --git a/include/asm-generic/barebox.lds.h b/include/asm-generic/barebox.lds.h
index fc141a474e..2d1dc411d7 100644
--- a/include/asm-generic/barebox.lds.h
+++ b/include/asm-generic/barebox.lds.h
@@ -1,5 +1,5 @@
-#if defined CONFIG_ARCH_IMX25 || defined CONFIG_ARCH_IMX35 || defined CONFIG_ARCH_IMX51
+#if defined CONFIG_ARCH_IMX25 || defined CONFIG_ARCH_IMX35 || defined CONFIG_ARCH_IMX51 || defined CONFIG_X86
#include <mach/barebox.lds.h>
#endif
diff --git a/scripts/setupmbr/setupmbr.c b/scripts/setupmbr/setupmbr.c
index dd7f38ccb2..74ede94d33 100644
--- a/scripts/setupmbr/setupmbr.c
+++ b/scripts/setupmbr/setupmbr.c
@@ -43,7 +43,7 @@
/* include the info from this barebox release */
#include "../../include/generated/utsrelease.h"
-#include "../../arch/x86/include/asm/barebox.lds.h"
+#include "../../arch/x86/mach-i386/include/mach/barebox.lds.h"
/** define to disable integrity tests and debug messages */
#define NDEBUG