#include <asm/byteorder.h>
#include <asm/unaligned.h>
#include <linux/list.h>
+#include <samsung/sighdr.h>
#include <part.h>
#include <usb.h>
#include <mmc.h>
return -EINVAL;
}
+#ifdef CONFIG_SIG
+ /* It needs to check the signature about only u-boot image */
+ if (!strncmp(usbdown->name, "u-boot", strlen(usbdown->name))) {
+ if (fs_set_blk_dev(from, argv[1], FS_TYPE_ANY))
+ return CMD_RET_FAILURE;
+
+ ret = fs_read(filename, (phys_addr_t)addr, 0,
+ size, &len_read);
+ if (ret)
+ return CMD_RET_FAILURE;
+
+ ret = check_board_signature("u-boot-mmc.bin",
+ (phys_addr_t)addr, (phys_addr_t)size);
+ if (ret)
+ return CMD_RET_FAILURE;
+ }
+#endif
+
if (usbdown->layout == FS_FAT) {
/* loading File */
fsname = "fat";
sprintf(cmd_buf, "%s %s %s %s",
cmd, part, interface, dir);
sprintf(cmd_buf + strlen(cmd_buf), "/%s", name[i]);
- run_command(cmd_buf, 0);
+ ret = run_command(cmd_buf, 0);
+ if (ret == CMD_RET_FAILURE)
+ return ret;
printf("\n");
}