From c74bfce0fb20ec4d01809fa0566263894923467b Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Tue, 24 Nov 2009 20:04:12 +1100 Subject: i386: Fix dlmalloc compile warning Signed-off-by: Graeme Russ --- board/eNET/config.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'board/eNET') diff --git a/board/eNET/config.mk b/board/eNET/config.mk index a76384130d..058026d6f0 100644 --- a/board/eNET/config.mk +++ b/board/eNET/config.mk @@ -22,3 +22,4 @@ # TEXT_BASE = 0x38040000 +CFLAGS_dlmalloc.o += -Wa,--no-warn -fno-strict-aliasing -- cgit From aea14421c52f31e39837aa2890e07e9c70ee61fd Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Tue, 24 Nov 2009 20:04:14 +1100 Subject: i386: Fix link collisions resulting from gcc4.4.1 upgrade Signed-off-by: Graeme Russ --- board/eNET/config.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'board/eNET') diff --git a/board/eNET/config.mk b/board/eNET/config.mk index 058026d6f0..c9703ea8e8 100644 --- a/board/eNET/config.mk +++ b/board/eNET/config.mk @@ -23,3 +23,4 @@ TEXT_BASE = 0x38040000 CFLAGS_dlmalloc.o += -Wa,--no-warn -fno-strict-aliasing +PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm -- cgit From 0fc1b49ecbd7ec7371f9ede0600e4fd28cec7f33 Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Tue, 24 Nov 2009 20:04:19 +1100 Subject: i386: Remove inline asm symbols from .dynsym Signed-off-by: Graeme Russ --- board/eNET/eNET_start16.S | 2 ++ 1 file changed, 2 insertions(+) (limited to 'board/eNET') diff --git a/board/eNET/eNET_start16.S b/board/eNET/eNET_start16.S index 48e4d83a13..af2c132156 100644 --- a/board/eNET/eNET_start16.S +++ b/board/eNET/eNET_start16.S @@ -71,6 +71,8 @@ board_init16: .section .bios, "ax" .code16 .globl realmode_reset +.hidden realmode_reset +.type realmode_reset, @function realmode_reset: /* Alias MMCR to 0xdf000 */ movw $0xfffc, %dx -- cgit From 1c409bc7101a24ecd47a13a4e851845d66dc23ce Mon Sep 17 00:00:00 2001 From: Graeme Russ Date: Tue, 24 Nov 2009 20:04:21 +1100 Subject: i386: Final Relocation Signed-off-by: Graeme Russ --- board/eNET/config.mk | 2 ++ board/eNET/eNET.c | 11 +++++++++-- board/eNET/u-boot.lds | 34 +++++++++++++++++++++++++++------- 3 files changed, 38 insertions(+), 9 deletions(-) (limited to 'board/eNET') diff --git a/board/eNET/config.mk b/board/eNET/config.mk index c9703ea8e8..5c64804fb2 100644 --- a/board/eNET/config.mk +++ b/board/eNET/config.mk @@ -23,4 +23,6 @@ TEXT_BASE = 0x38040000 CFLAGS_dlmalloc.o += -Wa,--no-warn -fno-strict-aliasing +PLATFORM_RELFLAGS += -fvisibility=hidden PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm +PLATFORM_LDFLAGS += -pic --emit-relocs -Bsymbolic -Bsymbolic-functions diff --git a/board/eNET/eNET.c b/board/eNET/eNET.c index 29cf29518a..6d0b15a0fa 100644 --- a/board/eNET/eNET.c +++ b/board/eNET/eNET.c @@ -47,7 +47,6 @@ void init_sc520_enet (void) { /* Set CPU Speed to 100MHz */ sc520_mmcr->cpuctl = 0x01; - gd->cpu_clk = 100000000; /* wait at least one millisecond */ asm("movl $0x2000,%%ecx\n" @@ -67,7 +66,7 @@ void init_sc520_enet (void) /* * Miscellaneous platform dependent initializations */ -int board_init(void) +int board_early_init_f(void) { init_sc520_enet(); @@ -117,6 +116,14 @@ int board_init(void) sc520_mmcr->sysarbctl = 0x06; sc520_mmcr->sysarbmenb = 0x0003; + return 0; +} + +int board_early_init_r(void) +{ + /* CPU Speed to 100MHz */ + gd->cpu_clk = 100000000; + /* Crystal is 33.000MHz */ gd->bus_clk = 33000000; diff --git a/board/eNET/u-boot.lds b/board/eNET/u-boot.lds index 4ea424d320..0d740215ce 100644 --- a/board/eNET/u-boot.lds +++ b/board/eNET/u-boot.lds @@ -28,28 +28,48 @@ ENTRY(_start) SECTIONS { . = 0x38040000; /* Location of bootcode in flash */ + _i386boot_text_start = .; .text : { *(.text); } . = ALIGN(4); .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } _i386boot_text_size = SIZEOF(.text) + SIZEOF(.rodata); + . = ALIGN(4); + + .data : { *(.data) } + . = ALIGN(4); + + .interp : { *(.interp) } + . = ALIGN(4); + + .dynsym : { *(.dynsym) } + . = ALIGN(4); - . = 0x03FF0000; /* Ram data segment to use */ - _i386boot_romdata_dest = ABSOLUTE(.); - .data : AT ( LOADADDR(.rodata) + SIZEOF(.rodata) ) { *(.data) } - _i386boot_romdata_start = LOADADDR(.data); + .dynstr : { *(.dynstr) } + . = ALIGN(4); + + .hash : { *(.hash) } + . = ALIGN(4); + .got : { *(.got) } . = ALIGN(4); - .got : AT ( LOADADDR(.data) + SIZEOF(.data) ) { *(.got) } + .got.plt : { *(.got.plt) } . = ALIGN(4); + + .dynamic (NOLOAD) : { *(.dynamic) } + . = ALIGN(4); + __u_boot_cmd_start = .; .u_boot_cmd : { *(.u_boot_cmd) } + . = ALIGN(4); __u_boot_cmd_end = .; _i386boot_cmd_start = LOADADDR(.u_boot_cmd); - _i386boot_romdata_size = SIZEOF(.data) + SIZEOF(.got) + SIZEOF(.u_boot_cmd); + _i386boot_rel_dyn_start = .; + .rel.dyn : { *(.rel.dyn) } + _i386boot_rel_dyn_end = .; . = ALIGN(4); _i386boot_bss_start = ABSOLUTE(.); @@ -57,7 +77,7 @@ SECTIONS _i386boot_bss_size = SIZEOF(.bss); /* 16bit realmode trampoline code */ - .realmode 0x7c0 : AT ( LOADADDR(.got) + SIZEOF(.got) + SIZEOF(.u_boot_cmd)) { *(.realmode) } + .realmode 0x7c0 : AT ( LOADADDR(.rel.dyn) + SIZEOF(.rel.dyn) ) { *(.realmode) } _i386boot_realmode = LOADADDR(.realmode); _i386boot_realmode_size = SIZEOF(.realmode); -- cgit