#include <common.h>
#include <command.h>
#include <u-boot/md5.h>
+#include <asm/io.h>
/*
* Store the resulting sum to an address or variable
int verify = 0;
int ac;
char * const *av;
+ void *buf;
if (argc < 3)
return CMD_RET_USAGE;
addr = simple_strtoul(*av++, NULL, 16);
len = simple_strtoul(*av++, NULL, 16);
- md5_wd((unsigned char *) addr, len, output, CHUNKSZ_MD5);
+ buf = map_sysmem(addr, len);
+ md5_wd(buf, len, output, CHUNKSZ_MD5);
+ unmap_sysmem(buf);
if (!verify) {
printf("md5 for %08lx ... %08lx ==> ", addr, addr + len - 1);
unsigned long addr, len;
unsigned int i;
u8 output[16];
+ void *buf;
if (argc < 3)
return CMD_RET_USAGE;
addr = simple_strtoul(argv[1], NULL, 16);
len = simple_strtoul(argv[2], NULL, 16);
- md5_wd((unsigned char *) addr, len, output, CHUNKSZ_MD5);
+ buf = map_sysmem(addr, len);
+ md5_wd(buf, len, output, CHUNKSZ_MD5);
+ unmap_sysmem(buf);
+
printf("md5 for %08lx ... %08lx ==> ", addr, addr + len - 1);
for (i = 0; i < 16; i++)
printf("%02x", output[i]);
#define CONFIG_ANDROID_BOOT_IMAGE
#define CONFIG_FS_FAT
+#define CONFIG_FAT_WRITE
#define CONFIG_FS_EXT4
#define CONFIG_EXT4_WRITE
#define CONFIG_CMD_FAT
#define CONFIG_DOS_PARTITION
#define CONFIG_HOST_MAX_DEVICES 4
#define CONFIG_CMD_FS_GENERIC
+#define CONFIG_CMD_MD5SUM
#define CONFIG_SYS_VSNPRINTF