
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com --- board/altera/dk1s10/u-boot.lds | 70 -------------------- board/ssv/adnpesc1/u-boot.lds | 70 -------------------- lib_nios/Makefile | 5 +- .../dk1c20/u-boot.lds => lib_nios/u-boot.lds.S | 5 +- nios_config.mk | 1 + 5 files changed, 8 insertions(+), 143 deletions(-) delete mode 100644 board/altera/dk1s10/u-boot.lds delete mode 100644 board/ssv/adnpesc1/u-boot.lds rename board/altera/dk1c20/u-boot.lds => lib_nios/u-boot.lds.S (95%)
diff --git a/board/altera/dk1s10/u-boot.lds b/board/altera/dk1s10/u-boot.lds deleted file mode 100644 index be77952..0000000 --- a/board/altera/dk1s10/u-boot.lds +++ /dev/null @@ -1,70 +0,0 @@ -/* - * (C) Copyright 2003, Psyent Corporation <www.psyent.com> - * Scott McNutt smcnutt@psyent.com - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - - -OUTPUT_FORMAT("elf32-nios") -OUTPUT_ARCH(nios) -ENTRY(_start) - -SECTIONS -{ - .text : - { - cpu/nios/start.o (.text) - *(.text) - } - __text_end = .; - - . = ALIGN(4); - .rodata : - { - *(.rodata) - } - __rodata_end = .; - - . = ALIGN(4); - .data : - { - *(.data) - } - . = ALIGN(4); - __data_end = .; - - . = .; - __u_boot_cmd_start = .; - .u_boot_cmd : - { - *(.u_boot_cmd) - } - . = ALIGN(4); - __u_boot_cmd_end = .; - - __bss_start = .; - . = ALIGN(4); - .bss (NOLOAD) : - { - *(.bss) - } - . = ALIGN(4); - __bss_end = .; -} diff --git a/board/ssv/adnpesc1/u-boot.lds b/board/ssv/adnpesc1/u-boot.lds deleted file mode 100644 index be77952..0000000 --- a/board/ssv/adnpesc1/u-boot.lds +++ /dev/null @@ -1,70 +0,0 @@ -/* - * (C) Copyright 2003, Psyent Corporation <www.psyent.com> - * Scott McNutt smcnutt@psyent.com - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - - -OUTPUT_FORMAT("elf32-nios") -OUTPUT_ARCH(nios) -ENTRY(_start) - -SECTIONS -{ - .text : - { - cpu/nios/start.o (.text) - *(.text) - } - __text_end = .; - - . = ALIGN(4); - .rodata : - { - *(.rodata) - } - __rodata_end = .; - - . = ALIGN(4); - .data : - { - *(.data) - } - . = ALIGN(4); - __data_end = .; - - . = .; - __u_boot_cmd_start = .; - .u_boot_cmd : - { - *(.u_boot_cmd) - } - . = ALIGN(4); - __u_boot_cmd_end = .; - - __bss_start = .; - . = ALIGN(4); - .bss (NOLOAD) : - { - *(.bss) - } - . = ALIGN(4); - __bss_end = .; -} diff --git a/lib_nios/Makefile b/lib_nios/Makefile index f66e989..34b8cf2 100644 --- a/lib_nios/Makefile +++ b/lib_nios/Makefile @@ -37,9 +37,12 @@ COBJS-y += time.o SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
-$(LIB): $(obj).depend $(OBJS) +$(LIB): $(obj).depend $(OBJS) $(obj)u-boot.lds $(AR) $(ARFLAGS) $@ $(OBJS)
+$(obj)u-boot.lds: u-boot.lds.S + $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -P $^ > $@ + #########################################################################
# defines $(obj).depend target diff --git a/board/altera/dk1c20/u-boot.lds b/lib_nios/u-boot.lds.S similarity index 95% rename from board/altera/dk1c20/u-boot.lds rename to lib_nios/u-boot.lds.S index be77952..15a363f 100644 --- a/board/altera/dk1c20/u-boot.lds +++ b/lib_nios/u-boot.lds.S @@ -21,6 +21,7 @@ * MA 02111-1307 USA */
+#include <config.h>
OUTPUT_FORMAT("elf32-nios") OUTPUT_ARCH(nios) @@ -30,8 +31,8 @@ SECTIONS { .text : { - cpu/nios/start.o (.text) - *(.text) + cpu/nios/start.o (.text) + *(.text) } __text_end = .;
diff --git a/nios_config.mk b/nios_config.mk index 1cf0f32..d2d8471 100644 --- a/nios_config.mk +++ b/nios_config.mk @@ -23,3 +23,4 @@ #
PLATFORM_CPPFLAGS += -m32 -DCONFIG_NIOS -D__NIOS__ -ffixed-g7 -gstabs +LDSCRIPT := $(OBJTREE)/lib_$(ARCH)/u-boot.lds