UPSTREAM: mmc-utils: add support to create gp partition
create gp partition if needed with enhanced / extended attribute.
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Chris Ball <chris@printf.net>
(cherry picked from commit 7891236d62ccd201054324b5298dd9529c6a764f)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
BUG=none
TEST=Compiled, Installed on gnawty
Change-Id: I5fb56e34c52ea31b96ea75be66a9dff35160150d
Reviewed-on: https://chromium-review.googlesource.com/338080
Commit-Ready: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
diff --git a/mmc.c b/mmc.c
index f40cb5a..fb23950 100644
--- a/mmc.c
+++ b/mmc.c
@@ -75,6 +75,11 @@
"Set the eMMC data sector size to 4KB by disabling emulation on\n<device>.",
NULL
},
+ { do_create_gp_partition, -6,
+ "gp create", "<-y|-n> " "<length KiB> " "<partition> " "<enh_attr> " "<ext_attr> " "<device>\n"
+ "create general purpose partition for the <device>.\nDry-run only unless -y is passed.\nNOTE! This is a one-time programmable (unreversible) change.\nTo set enhanced attribute to general partition being created set\n <enh_attr> to 1 else set it to 0.\nTo set extended attribute to general partition\n set <ext_attr> to 1,2 else set it to 0",
+ NULL
+ },
{ do_enh_area_set, -4,
"enh_area set", "<-y|-n> " "<start KiB> " "<length KiB> " "<device>\n"
"Enable the enhanced user area for the <device>.\nDry-run only unless -y is passed.\nNOTE! This is a one-time programmable (unreversible) change.",