Last active
December 16, 2015 10:19
-
-
Save chromabox/5418925 to your computer and use it in GitHub Desktop.
gitにあるu-bootのcpコマンド直した
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/common/cmd_mem.c b/common/cmd_mem.c | |
old mode 100644 | |
new mode 100755 | |
index 64dd76a..45478d5 | |
--- a/common/cmd_mem.c | |
+++ b/common/cmd_mem.c | |
@@ -445,7 +445,7 @@ static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | |
#endif | |
bytes = size * count; | |
- buf = map_sysmem(addr, bytes); | |
+ buf = map_sysmem(dest, bytes); | |
src = map_sysmem(addr, bytes); | |
while (count-- > 0) { | |
if (size == 4) | |
@@ -461,6 +461,9 @@ static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | |
if ((count % (64 << 10)) == 0) | |
WATCHDOG_RESET(); | |
} | |
+ unmap_sysmem(src); | |
+ unmap_sysmem(buf); | |
+ | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment