]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/image.c
led_display: split led display support into generic and hw-dependent parts
[karo-tx-uboot.git] / common / image.c
index 2b6007e9c6685c3080964e5935ba78aa307d7ffb..3a2f25e5af4de7f64e9e3e31bc61ef456e9e97c3 100644 (file)
@@ -60,7 +60,7 @@ static int fit_check_ramdisk (const void *fit, int os_noffset,
 #endif
 
 #ifdef CONFIG_CMD_BDI
-extern int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+extern int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 #endif
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -103,6 +103,7 @@ static table_entry_t uimage_os[] = {
        {       IH_OS_LYNXOS,   "lynxos",       "LynxOS",               },
 #endif
        {       IH_OS_NETBSD,   "netbsd",       "NetBSD",               },
+       {       IH_OS_OSE,      "ose",          "Enea OSE",             },
        {       IH_OS_RTEMS,    "rtems",        "RTEMS",                },
        {       IH_OS_U_BOOT,   "u-boot",       "U-Boot",               },
 #if defined(CONFIG_CMD_ELF) || defined(USE_HOSTCC)
@@ -433,17 +434,23 @@ ulong getenv_bootm_low(void)
 
 phys_size_t getenv_bootm_size(void)
 {
+       phys_size_t tmp;
        char *s = getenv ("bootm_size");
        if (s) {
-               phys_size_t tmp;
                tmp = (phys_size_t)simple_strtoull (s, NULL, 16);
                return tmp;
        }
+       s = getenv("bootm_low");
+       if (s)
+               tmp = (phys_size_t)simple_strtoull (s, NULL, 16);
+       else
+               tmp = 0;
+
 
 #if defined(CONFIG_ARM)
-       return gd->bd->bi_dram[0].size;
+       return gd->bd->bi_dram[0].size - tmp;
 #else
-       return gd->bd->bi_memsize;
+       return gd->bd->bi_memsize - tmp;
 #endif
 }
 
@@ -756,7 +763,7 @@ int genimg_has_config (bootm_headers_t *images)
  *     1, if ramdisk image is found but corrupted, or invalid
  *     rd_start and rd_end are set to 0 if no ramdisk exists
  */
-int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images,
+int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images,
                uint8_t arch, ulong *rd_start, ulong *rd_end)
 {
        ulong rd_addr, rd_load;
@@ -1178,6 +1185,7 @@ static int fit_check_fdt (const void *fit, int fdt_noffset, int verify)
  *      0 - success
  *      1 - failure
  */
+#if defined(CONFIG_SYS_BOOTMAPSZ)
 int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base,
                char **of_flat_tree, ulong *of_size)
 {
@@ -1257,6 +1265,7 @@ int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base,
 error:
        return 1;
 }
+#endif /* CONFIG_SYS_BOOTMAPSZ */
 
 /**
  * boot_get_fdt - main fdt handling routine
@@ -1279,7 +1288,7 @@ error:
  *     1, if fdt image is found but corrupted
  *     of_flat_tree and of_size are set to 0 if no fdt exists
  */
-int boot_get_fdt (int flag, int argc, char *argv[], bootm_headers_t *images,
+int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *images,
                char **of_flat_tree, ulong *of_size)
 {
        const image_header_t *fdt_hdr;