mmc-utils: Expand 'writeprotect boot'

This patch updates 'mmc writeprotect boot set' with a few more optional
parameters, so that it can be used to enable permanent write-protection
and so that the two boot partitions can be protected independently. It
also splits protection information output by 'mmc writeprotect boot get'
by partition.

BUG=b:151202634
TEST=Enabled different kinds of protection on my Trogdor.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I327fff23675b267a9f75d754ccc47db3f84c294c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/mmc-utils/+/2103512
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
3 files changed