X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fimage.c;h=a911aa9b4d128227520fba77555c4879e5e93ff3;hb=7a172ae7a3fc439c4639605e6bf2e6205dd02fcd;hp=b75a5ce29a669b398c5c652282753a9ee28471ff;hpb=0798082442536df2514ff272e8e53499a7dbc92e;p=karo-tx-uboot.git diff --git a/common/image.c b/common/image.c index b75a5ce29a..a911aa9b4d 100644 --- a/common/image.c +++ b/common/image.c @@ -120,6 +120,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, "", "", }, }; @@ -485,12 +489,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 +756,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: