gooftool: add command enable_release_partition

We used to have enable_release_partition.sh for switching DUT to release
image. In CL:383352, the script is removed, and the corresponding logic
is moved into gooftool. However, partners may still need this tool for shipping
early build stage devices without fully wiped.

Add command enable_release_partition in gooftool for this purpose.

BUG=None
TEST=Run 'gooftool enable_release_partition && reboot' on Winky

Change-Id: Ic856a6743b8b75fc0937162963620428b2c9bbdd
Reviewed-on: https://chromium-review.googlesource.com/393466
Commit-Ready: Shun-Hsing Ou <shunhsingou@chromium.org>
Tested-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/py/gooftool/commands.py b/py/gooftool/commands.py
index 0ecf77b..e1ae132 100755
--- a/py/gooftool/commands.py
+++ b/py/gooftool/commands.py
@@ -430,6 +430,15 @@
   event_log.Log('generate_stable_device_secret')
 
 
+@Command('enable_release_partition',
+         CmdArg('--release_rootfs',
+                help=('path to the release rootfs device. If not specified, '
+                      'the default (5th) partition will be used.')))
+def EnableReleasePartition(options):
+  """Enables a release image partition on the disk."""
+  GetGooftool(options).EnableReleasePartition(options.release_rootfs)
+
+
 @Command('wipe_in_place',
          CmdArg('--fast', action='store_true',
                 help='use non-secure but faster wipe method.'),