Commit 45c4f39a authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Convert arm vmlinux.lds generation

This is an untested attempt to convert ARM to preprocessing vmlinux.lds.S
instead of running sed on it - This probably allows for further cleanup,
but I'll leave that to _rmk_.
parent bba8b9e8
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# Copyright (C) 1995-2001 by Russell King # Copyright (C) 1995-2001 by Russell King
LDFLAGS_vmlinux :=-p -X -T arch/arm/vmlinux.lds LDFLAGS_vmlinux :=-p -X -T arch/arm/vmlinux.lds.s
OBJCOPYFLAGS :=-O binary -R .note -R .comment -S OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9 GZFLAGS :=-9
#CFLAGS +=-pipe #CFLAGS +=-pipe
...@@ -57,21 +57,11 @@ AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float ...@@ -57,21 +57,11 @@ AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float
ifeq ($(CONFIG_CPU_26),y) ifeq ($(CONFIG_CPU_26),y)
PROCESSOR := armo PROCESSOR := armo
HEAD := arch/arm/mach-arc/head.o arch/arm/kernel/init_task.o HEAD := arch/arm/mach-arc/head.o arch/arm/kernel/init_task.o
ifeq ($(CONFIG_ROM_KERNEL),y)
DATAADDR = 0x02080000
TEXTADDR = 0x03800000
LDSCRIPT = arch/arm/vmlinux-armo-rom.lds.in
else
TEXTADDR = 0x02080000
LDSCRIPT = arch/arm/vmlinux-armo.lds.in
endif
endif endif
ifeq ($(CONFIG_CPU_32),y) ifeq ($(CONFIG_CPU_32),y)
PROCESSOR = armv PROCESSOR = armv
HEAD := arch/arm/kernel/head.o arch/arm/kernel/init_task.o HEAD := arch/arm/kernel/head.o arch/arm/kernel/init_task.o
TEXTADDR = 0xC0008000
LDSCRIPT = arch/arm/vmlinux-armv.lds.in
endif endif
ifeq ($(CONFIG_ARCH_ARCA5K),y) ifeq ($(CONFIG_ARCH_ARCA5K),y)
...@@ -225,21 +215,11 @@ maketools: include/asm-arm/.arch include/asm-arm/.proc \ ...@@ -225,21 +215,11 @@ maketools: include/asm-arm/.arch include/asm-arm/.proc \
include/asm-arm/constants.h include/linux/version.h FORCE include/asm-arm/constants.h include/linux/version.h FORCE
@$(MAKETOOLS) @$(MAKETOOLS)
vmlinux: arch/arm/vmlinux.lds vmlinux: arch/arm/vmlinux.lds.s
arch/arm/vmlinux.lds: arch/arm/Makefile $(LDSCRIPT) \
$(wildcard include/config/cpu/32.h) \
$(wildcard include/config/cpu/26.h) \
$(wildcard include/config/arch/*.h)
@echo ' Generating $@'
@sed 's/TEXTADDR/$(TEXTADDR)/;s/DATAADDR/$(DATAADDR)/' $(LDSCRIPT) >$@
bzImage zImage zinstall Image bootpImage install: vmlinux bzImage zImage zinstall Image bootpImage install: vmlinux
@$(MAKEBOOT) $@ @$(MAKEBOOT) $@
CLEAN_FILES += \
arch/arm/vmlinux.lds
MRPROPER_FILES += \ MRPROPER_FILES += \
include/asm-arm/arch include/asm-arm/.arch \ include/asm-arm/arch include/asm-arm/.arch \
include/asm-arm/proc include/asm-arm/.proc \ include/asm-arm/proc include/asm-arm/.proc \
......
#include <linux/config.h>
#ifdef CONFIG_CPU_26
#ifdef CONFIG_ROM_KERNEL
#define DATAADDR 0x02080000
#define TEXTADDR 0x03800000
#include "vmlinux-armo-rom.lds.in"
#else
#define TEXTADDR 0x02080000
#include "vmlinux-armo.lds.in"
#endif
#endif
#ifdef CONFIG_CPU_32
#define TEXTADDR 0xC0008000
#include "vmlinux-armv.lds.in"
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment