summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2019-07-15 17:26:30 +0800
committerJi Luo <ji.luo@nxp.com>2019-07-16 22:04:00 +0800
commit2b7597fa3e9b3d09002fc6ef85aae1de19e184d0 (patch)
tree0c0b356842869659a4bde51f6d80ff6b523d5e40 /drivers
parente4e9ba2e868ea1b55581bdc1b7096cfb9cc15009 (diff)
MA-15019-1 Support Manufacture Protection public key generation
Add new keymaster commands to get Manufacure Production key (mppubk). Since the mppubk can only be generated in OEM CLOSED imx8q board, so we can only this command when the board is HAB/AHAB closed. Commands to extract the mppubk: * $fastboot oem get-mppubk * $fastboot get_staged mppubk.bin Test: Generate and dump the mppubk.bin Change-Id: Idc59e78ca6345497e744162664b8293f50d1eda4 Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/f_fastboot.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 6ec6ebae26..bb36c9bf1b 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -3867,6 +3867,14 @@ static void cb_flashing(struct usb_ep *ep, struct usb_request *req)
printf("Append ec attestation key successfully!\n");
strcpy(response, "OKAY");
}
+ } else if (endswith(cmd, FASTBOOT_GET_MPPUBK)) {
+ if (fastboot_get_mppubk(interface.transfer_buffer, &download_bytes)) {
+ printf("ERROR Generate mppubk failed!\n");
+ strcpy(response, "FAILGenerate mppubk failed!");
+ } else {
+ printf("mppubk generated!\n");
+ strcpy(response, "OKAY");
+ }
}
#ifndef CONFIG_AVB_ATX
else if (endswith(cmd, FASTBOOT_SET_RPMB_KEY)) {