diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2017-11-15 09:30:16 +0100 |
---|---|---|
committer | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2018-04-16 17:12:12 +0200 |
commit | b5b309c0d895d89f2bc7c1f61bf8ddad61481af4 (patch) | |
tree | 1a2780508c493c098e9a39d62eb590f8aaec3df5 | |
parent | 5b04f00d5aef6643ca64b08c445654fc0c883fb6 (diff) |
mksdcard: add argument to customize sector size4k-sector
Since the tools was fixed to support sector size other than 512, let's add a new
argument for users to build images with 4K LBA size. The default remains 512,
for backward compatibility.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
-rwxr-xr-x | mksdcard | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -25,6 +25,7 @@ Utility to create SD card -p <file> partition description file -i <path> additional include paths to use when looking for files -s <size> set output image size (in kb) + -b <size> set sector size (LBA) in bytes -g create partitions but do not write files -n print partition scheme and exit, before creating image file -x enable shell debug mode @@ -67,7 +68,7 @@ PARTONLY=0 DEBUG=0 SECTOR_SIZE=512 INC="." -while getopts "o:p:i:s:dxng" o; do +while getopts "o:p:i:s:b:dxng" o; do case "${o}" in x|d) set -x @@ -91,6 +92,9 @@ while getopts "o:p:i:s:dxng" o; do p) PARTITIONS=${OPTARG} ;; + b) + SECTOR_SIZE=${OPTARG} + ;; *) usage ;; |