X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fimage.c;h=abc0d890f289d622503f7e028ade7a48dc55478c;hb=5b1b701ac565cf247c93b1092bba2b8f75bd386f;hp=b75a5ce29a669b398c5c652282753a9ee28471ff;hpb=46b7b2e8025770fb29f7810c2d7d15a6650b9643;p=karo-tx-uboot.git diff --git a/common/image.c b/common/image.c index b75a5ce29a..abc0d890f2 100644 --- a/common/image.c +++ b/common/image.c @@ -27,6 +27,7 @@ #include #include +#include #if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT) #include @@ -120,6 +121,10 @@ static const table_entry_t uimage_os[] = { { IH_OS_SOLARIS, "solaris", "Solaris", }, { IH_OS_SVR4, "svr4", "SVR4", }, #endif +#if defined(CONFIG_BOOTM_OPENRTOS) || defined(USE_HOSTCC) + { IH_OS_OPENRTOS, "openrtos", "OpenRTOS", }, +#endif + { -1, "", "", }, }; @@ -145,6 +150,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_MXSIMAGE, "mxsimage", "Freescale MXS Boot Image",}, { IH_TYPE_ATMELIMAGE, "atmelimage", "ATMEL ROM-Boot Image",}, { IH_TYPE_X86_SETUP, "x86_setup", "x86 setup.bin", }, + { IH_TYPE_LPC32XXIMAGE, "lpc32xximage", "LPC32XX Boot Image", }, { -1, "", "", }, }; @@ -485,12 +491,22 @@ void memmove_wd(void *to, void *from, size_t len, ulong chunksz) return; #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) + if (to > from) { + from += len; + to += len; + } while (len > 0) { size_t tail = (len > chunksz) ? chunksz : len; WATCHDOG_RESET(); + if (to > from) { + to -= tail; + from -= tail; + } memmove(to, from, tail); - to += tail; - from += tail; + if (to < from) { + to += tail; + from += tail; + } len -= tail; } #else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */ @@ -742,7 +758,7 @@ int genimg_get_format(const void *img_addr) * genimg_get_image - get image from special storage (if necessary) * @img_addr: image start address * - * genimg_get_image() checks if provided image start adddress is located + * genimg_get_image() checks if provided image start address is located * in a dataflash storage. If so, image is moved to a system RAM memory. * * returns: