summaryrefslogtreecommitdiffstats
path: root/common/startup.c
diff options
context:
space:
mode:
authorSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-25 12:25:01 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-25 12:25:01 +0200
commit654bb6b0b88504a0768d706a207085cc5064640e (patch)
tree4104cf567b2a90ca5c82ae4fc32de6005e7e5f5e /common/startup.c
parentdd13f2cdda205ff10e61bc3a0277457b026b70ee (diff)
downloadbarebox-654bb6b0b88504a0768d706a207085cc5064640e.tar.gz
barebox-654bb6b0b88504a0768d706a207085cc5064640e.tar.xz
further reloc fixes
Diffstat (limited to 'common/startup.c')
-rw-r--r--common/startup.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/common/startup.c b/common/startup.c
index dac6659851..68753bdc1b 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -42,16 +42,14 @@
extern initcall_t __u_boot_initcalls_start[], __u_boot_early_initcalls_end[], __u_boot_initcalls_end[];
-const char *version_string =
+const char version_string[] =
"U-Boot " UTS_RELEASE " (" __DATE__ " - " __TIME__ ")"CONFIG_IDENT_STRING;
static int display_banner (void)
{
- const char *vers = RELOC_VAR(version_string);
-
- printf (RELOC("\n\n%s\n\n"), RELOC(vers));
+ printf (RELOC("\n\n%s\n\n"), RELOC_VAR(version_string));
debug (RELOC("U-Boot code: %08lX -> %08lX BSS: -> %08lX\n"),
- _u_boot_start, _bss_start, _bss_end);
+ RELOC_VAR(_u_boot_start), RELOC_VAR(_bss_start), RELOC_VAR(_bss_end));
printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));
return 0;
@@ -68,7 +66,7 @@ void early_init (void)
{
/* copy the early initdata segment to early init RAM */
memcpy((void *)EARLY_INITDATA, RELOC(&__early_init_data_begin),
- (ulong)&__early_init_data_size);
+ (ulong)&__early_init_data_end - (ulong)&__early_init_data_begin);
early_console_start(RELOC("psc3"), 115200);
display_banner();
@@ -87,7 +85,7 @@ void start_uboot (void)
* early RAM to RAM
*/
memcpy(&__early_init_data_begin, init_data_ptr,
- (ulong)&__early_init_data_size);
+ (ulong)&__early_init_data_end - (ulong)&__early_init_data_begin);
init_data_ptr = &__early_init_data_begin;
#endif /* CONFIG_HAS_EARLY_INIT */