- The access to mediums is done in DFU backends (driver/dfu)
Today the supported DFU backends are:
- - MMC (RAW or FAT / EXT2 / EXT3 / EXT4 file system)
+ - MMC (RAW or FAT / EXT2 / EXT3 / EXT4 file system / SKIP)
- NAND
- RAM
- SF (serial flash)
<name> part <dev> <part_id> [mmcpart <num>] raw access to partition
<name> fat <dev> <part_id> [mmcpart <num>] file in FAT partition
<name> ext4 <dev> <part_id> [mmcpart <num>] file in EXT4 partition
+ <name> skip 0 0 ignore flashed data
with <partid> being the GPT or DOS partition index,
with <num> being the eMMC hardware partition number.
"u-boot raw 0x80 0x800;uImage ext4 0 2"
+ If don't want to flash given image file to storage, use "skip" type
+ entity.
+ - It can be used to protect flashing wrong image for the specific board.
+ - Especailly, this layout will be useful when thor protocol is used,
+ which performs flashing in batch mode, where more than one file is
+ processed.
+ For example, if one makes a single tar file with support for the two
+ boards with u-boot-<board1>.bin and u-boot-<board2>.bin files, one
+ can use it to flash a proper u-boot image on both without a failure:
+
+ "u-boot-<board1>.bin raw 0x80 0x800; u-boot-<board2>.bin skip 0 0"
+
"nand" (raw slc nand device)
cmd: dfu 0 nand <dev>
each element in "dfu_alt_info" =
const char *dfu_get_layout(enum dfu_layout l)
{
const char *const dfu_layout[] = {NULL, "RAW_ADDR", "FAT", "EXT2",
- "EXT3", "EXT4", "RAM_ADDR" };
+ "EXT3", "EXT4", "RAM_ADDR", "SKIP" };
return dfu_layout[l];
}
case DFU_FS_EXT4:
fstype = FS_TYPE_EXT;
break;
+ case DFU_SKIP:
+ return 0;
default:
printf("%s: Layout (%s) not (yet) supported!\n", __func__,
dfu_get_layout(dfu->layout));
case DFU_FS_EXT4:
ret = mmc_file_buf_write(dfu, offset, buf, len);
break;
+ case DFU_SKIP:
+ ret = 0;
+ break;
default:
printf("%s: Layout (%s) not (yet) supported!\n", __func__,
dfu_get_layout(dfu->layout));
if (ret < 0)
return ret;
return 0;
+ case DFU_SKIP:
+ return 0;
default:
printf("%s: Layout (%s) not (yet) supported!\n", __func__,
dfu_get_layout(dfu->layout));
dfu->layout = DFU_FS_FAT;
} else if (!strcmp(entity_type, "ext4")) {
dfu->layout = DFU_FS_EXT4;
+ } else if (!strcmp(entity_type, "skip")) {
+ dfu->layout = DFU_SKIP;
} else {
pr_err("Memory layout (%s) not supported!\n", entity_type);
return -ENODEV;