summaryrefslogtreecommitdiffstats
path: root/arch/x86
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 /arch/x86
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>
Diffstat (limited to 'arch/x86')
-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
3 files changed, 7 insertions, 15 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.