1. skip / seek
:skip=xxx是在备份时对if 后面的部分也就是原文件跳过多少块再开始备份;seek=xxx则是在备份时对of 后面的部分也就是目标文件跳过多少块再开始写。
Example:
u-boot_params.bin is saved in MMC offset 40960, size 153600
dump it
root@localhost:/tmp# dd if=/dev/mmcblk0 of=./u-boot_params.bin bs=1 skip=40960 count=153600
153600+0 records in
153600+0 records out
root@localhost:/tmp# du -hs u-boot_params.bin
152.0K u-boot-para.bin
root@localhost:/tmp#
Example 2
# dd uboot with IPL head, skip MBR from input file
dd if=u-boot.s32 of=/dev/mmcblk0 conv=notrunc bs=256 count=1 seek=0
dd if=u-boot.s32 of=/dev/mmcblk0 conv=notrunc bs=512 seek=1 skip=1 ### Keep MBR/partition table
2. hex
Example
root@evm:# dd if=/dev/mmcblk0 of=./uenv.bin skip=$((0x1e0000)) bs=1 count=$((0x2000))
3. parameter calculation
root@evb:# dd if=/dev/mmcblk0 of=eMMC-hex-dump count=$((8192*1)) bs=512
root@evb:# dd if=/dev/mmcblk0 of=eMMC-hex-dump count=$((8192*512)) bs=1