From 1055171ed05b7c4885737463d52b8d6c013bcb5d Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 8 Sep 2008 23:26:22 +0200 Subject: lib_arm/bootm.c: fix compile warnings bootm.c:128: warning: label 'error' defined but not used bootm.c:65: warning: unused variable 'ret' Signed-off-by: Wolfgang Denk --- lib_arm/bootm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib_arm') diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c index 6c2f37e..772fa7f 100644 --- a/lib_arm/bootm.c +++ b/lib_arm/bootm.c @@ -62,7 +62,6 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) char *s; int machid = bd->bi_arch_number; void (*theKernel)(int zero, int arch, uint params); - int ret; #ifdef CONFIG_CMDLINE_TAG char *commandline = getenv ("bootargs"); @@ -125,7 +124,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) theKernel (0, machid, bd->bi_boot_params); /* does not return */ -error: + return 1; } -- cgit v1.1 From d13ff2358ff8c384f52eaf46f5d60258acf96ea6 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 15 Sep 2008 05:48:25 +0200 Subject: Revert "ARM: set GD_FLG_RELOC for boards skipping relocation to RAM" we need this due to the arm implementation which supposed that U-Boot is in RAM when we jump to start_armboot This reverts commit f96b44cef897bd372beb86dde1b33637c119d84d. in order to do it for all arm board Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- lib_arm/board.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'lib_arm') diff --git a/lib_arm/board.c b/lib_arm/board.c index 5ade882..47e834c 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -220,18 +220,6 @@ static int init_func_i2c (void) } #endif -#ifdef CONFIG_SKIP_RELOCATE_UBOOT -/* - * This routine sets the relocation done flag, because even if - * relocation is skipped, the flag is used by other generic code. - */ -static int reloc_init(void) -{ - gd->flags |= GD_FLG_RELOC; - return 0; -} -#endif - /* * Breathe some life into the board... * @@ -261,11 +249,6 @@ int print_cpuinfo (void); /* test-only */ init_fnc_t *init_sequence[] = { cpu_init, /* basic cpu dependent setup */ -#if defined(CONFIG_SKIP_RELOCATE_UBOOT) - reloc_init, /* Set the relocation done flag, must - do this AFTER cpu_init(), but as soon - as possible */ -#endif board_init, /* basic board dependent setup */ interrupt_init, /* set up exceptions */ env_init, /* initialize environment */ -- cgit v1.1 From f41b144c11341b571eab7dcef6c4b8e03c92d2b2 Mon Sep 17 00:00:00 2001 From: gnusercn Date: Wed, 8 Oct 2008 18:58:58 +0200 Subject: Fix bug: in arch-arm, env_get_char dose not work fine due to the arm implementation which supposed that U-Boot is in RAM when we jump to start_armboot Signed-off-by: gnusercn Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- lib_arm/board.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib_arm') diff --git a/lib_arm/board.c b/lib_arm/board.c index 47e834c..f02fdc8 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -290,6 +290,8 @@ void start_armboot (void) gd->bd = (bd_t*)((char*)gd - sizeof(bd_t)); memset (gd->bd, 0, sizeof (bd_t)); + gd->flags |= GD_FLG_RELOC; + monitor_flash_len = _bss_start - _armboot_start; for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { -- cgit v1.1 From 6d0f6bcf337c5261c08fabe12982178c2c489d76 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 16 Oct 2008 15:01:15 +0200 Subject: rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- lib_arm/board.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib_arm') diff --git a/lib_arm/board.c b/lib_arm/board.c index f02fdc8..4ba1f5e 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -95,7 +95,7 @@ static void mem_malloc_init (ulong dest_addr) { mem_malloc_start = dest_addr; - mem_malloc_end = dest_addr + CFG_MALLOC_LEN; + mem_malloc_end = dest_addr + CONFIG_SYS_MALLOC_LEN; mem_malloc_brk = mem_malloc_start; memset ((void *) mem_malloc_start, 0, @@ -202,19 +202,19 @@ static int display_dram_config (void) return (0); } -#ifndef CFG_NO_FLASH +#ifndef CONFIG_SYS_NO_FLASH static void display_flash_config (ulong size) { puts ("Flash: "); print_size (size, "\n"); } -#endif /* CFG_NO_FLASH */ +#endif /* CONFIG_SYS_NO_FLASH */ #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) static int init_func_i2c (void) { puts ("I2C: "); - i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE); + i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); puts ("ready\n"); return (0); } @@ -274,7 +274,7 @@ void start_armboot (void) { init_fnc_t **init_fnc_ptr; char *s; -#if !defined(CFG_NO_FLASH) || defined (CONFIG_VFD) || defined(CONFIG_LCD) +#if !defined(CONFIG_SYS_NO_FLASH) || defined (CONFIG_VFD) || defined(CONFIG_LCD) ulong size; #endif #if defined(CONFIG_VFD) || defined(CONFIG_LCD) @@ -282,7 +282,7 @@ void start_armboot (void) #endif /* Pointer is writable since we allocated a register for it */ - gd = (gd_t*)(_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t)); + gd = (gd_t*)(_armboot_start - CONFIG_SYS_MALLOC_LEN - sizeof(gd_t)); /* compiler optimization barrier needed for GCC >= 3.4 */ __asm__ __volatile__("": : :"memory"); @@ -300,11 +300,11 @@ void start_armboot (void) } } -#ifndef CFG_NO_FLASH +#ifndef CONFIG_SYS_NO_FLASH /* configure available FLASH banks */ size = flash_init (); display_flash_config (size); -#endif /* CFG_NO_FLASH */ +#endif /* CONFIG_SYS_NO_FLASH */ #ifdef CONFIG_VFD # ifndef PAGE_SIZE @@ -336,7 +336,7 @@ void start_armboot (void) #endif /* CONFIG_LCD */ /* armboot_start is defined in the board-specific linker script */ - mem_malloc_init (_armboot_start - CFG_MALLOC_LEN); + mem_malloc_init (_armboot_start - CONFIG_SYS_MALLOC_LEN); #if defined(CONFIG_CMD_NAND) puts ("NAND: "); @@ -498,7 +498,7 @@ int mdm_init (void) serial_puts(init_str); serial_puts("\n"); for(;;) { - mdm_readline(console_buffer, CFG_CBSIZE); + mdm_readline(console_buffer, CONFIG_SYS_CBSIZE); dbg("ini%d: [%s]", i, console_buffer); if ((strcmp(console_buffer, "OK") == 0) || @@ -522,7 +522,7 @@ int mdm_init (void) /* final stage - wait for connect */ for(;i > 1;) { /* if 'i' > 1 - wait for connection message from modem */ - mdm_readline(console_buffer, CFG_CBSIZE); + mdm_readline(console_buffer, CONFIG_SYS_CBSIZE); dbg("ini_f: [%s]", console_buffer); if (strncmp(console_buffer, "CONNECT", 7) == 0) { dbg("ini_f: connected"); -- cgit v1.1 From 49c3a861d11735838f1f1b11999ce433006dc919 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 21 Oct 2008 17:25:45 -0500 Subject: bootm: Add subcommands Add the ability to break the steps of the bootm command into several subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go. This allows us to do things like manipulate device trees before they are passed to a booting kernel or setup memory for a secondary core in multicore situations. Not all OS types support all subcommands (currently only start, loados, ramdisk, fdt, and go are supported). Signed-off-by: Kumar Gala --- lib_arm/bootm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib_arm') diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c index 772fa7f..8e264ce 100644 --- a/lib_arm/bootm.c +++ b/lib_arm/bootm.c @@ -67,6 +67,9 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) char *commandline = getenv ("bootargs"); #endif + if ((flag != 0) || (flag != BOOTM_STATE_OS_GO)) + return 1; + theKernel = (void (*)(int, int, uint))images->ep; s = getenv ("machid"); -- cgit v1.1 From 263b749e2e25473a48776d317bd2a7e2ddcdd212 Mon Sep 17 00:00:00 2001 From: Ilko Iliev Date: Sun, 9 Nov 2008 15:53:14 +0100 Subject: lib_arm: do_bootm_linux() - correct a small mistake This patch corrects a small bug in the "if" condition: the parameter "flag" is 0 and the "if" condition is always true. The result is - the boom command doesn't start the kernel. Affected targets: all arm based. Signed-off-by: Ilko Iliev --- lib_arm/bootm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib_arm') diff --git a/lib_arm/bootm.c b/lib_arm/bootm.c index 8e264ce..7dbde7d 100644 --- a/lib_arm/bootm.c +++ b/lib_arm/bootm.c @@ -67,7 +67,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) char *commandline = getenv ("bootargs"); #endif - if ((flag != 0) || (flag != BOOTM_STATE_OS_GO)) + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; theKernel = (void (*)(int, int, uint))images->ep; -- cgit v1.1 From 561858ee7d0274c3e89dc98d4d0698cb6fcf6fd9 Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Mon, 3 Nov 2008 09:30:59 -0600 Subject: Update U-Boot's build timestamp on every compile Use the GNU 'date' command to auto-generate a new U-Boot timestamp on every compile. Signed-off-by: Peter Tyser --- lib_arm/board.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib_arm') diff --git a/lib_arm/board.c b/lib_arm/board.c index 4ba1f5e..2358beb 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -69,7 +70,7 @@ extern void dataflash_print_info(void); #endif const char version_string[] = - U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")"CONFIG_IDENT_STRING; + U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"CONFIG_IDENT_STRING; #ifdef CONFIG_DRIVER_CS8900 extern void cs8900_get_enetaddr (uchar * addr); -- cgit v1.1