]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/image.c
Merge branch 'master' of git://git.denx.de/u-boot-net
[people/ms/u-boot.git] / common / image.c
index e6071099d6365ecc63483c2c1ab4b1df400997ac..f4a1dc8e251a24251d5a09e0e900360d4fb846bb 100644 (file)
@@ -158,6 +158,7 @@ static const table_entry_t uimage_type[] = {
        {       IH_TYPE_RKIMAGE,    "rkimage",    "Rockchip Boot Image" },
        {       IH_TYPE_RKSD,       "rksd",       "Rockchip SD Boot Image" },
        {       IH_TYPE_RKSPI,      "rkspi",      "Rockchip SPI Boot Image" },
+       {       IH_TYPE_ZYNQIMAGE,  "zynqimage",  "Xilinx Zynq Boot Image" },
        {       -1,                 "",           "",                   },
 };
 
@@ -471,9 +472,9 @@ phys_size_t getenv_bootm_size(void)
 
 
 #if defined(CONFIG_ARM) && defined(CONFIG_NR_DRAM_BANKS)
-       return gd->bd->bi_dram[0].size - tmp;
+       return gd->bd->bi_dram[0].size - (tmp - gd->bd->bi_dram[0].start);
 #else
-       return gd->bd->bi_memsize - tmp;
+       return gd->bd->bi_memsize - (tmp - gd->bd->bi_memstart);
 #endif
 }
 
@@ -913,7 +914,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
         * Look for an Android boot image.
         */
        buf = map_sysmem(images->os.start, 0);
-       if (genimg_get_format(buf) == IMAGE_FORMAT_ANDROID)
+       if (buf && genimg_get_format(buf) == IMAGE_FORMAT_ANDROID)
                select = argv[0];
 #endif
 
@@ -1112,8 +1113,7 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len,
                if (initrd_high == ~0)
                        initrd_copy_to_ram = 0;
        } else {
-               /* not set, no restrictions to load high */
-               initrd_high = ~0;
+               initrd_high = getenv_bootm_mapsize() + getenv_bootm_low();
        }