Commit Graph

12 Commits

Author SHA1 Message Date
Andy Yan 4701d790f4 cmd: bootrkp: return CMD_RET_FAILURE on error
A cmd only returned with CMD_RET_XXX defined
by command_ret_t can ensure it work well when
called from shell.

Change-Id: I16e76ed62928380eaaf3c352efb4df9463b7e72d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-03-08 16:50:55 +08:00
Jian Qiu c2ba77d93f lib: optee_client: Extract keymaster CA module
Extract keymaster CA module from OpteeClientInterface
refactoring code for keymaster reads and writes form caller module

Change-Id: I1069fce0d29d9d9815f71e7f3b4d231754382acd
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2019-01-18 09:09:34 +08:00
Jian Qiu 65413a00f9 fastboot: add FASTBOOT_OEM_UNLOCK option
This enables the following fastboot commands:
  fastboot oem unlock
  fastboot oem unlock_accept
  fastboot oem lock
  fastboot getvar oem-unlock

Android 8.1 need the oem unlock status attach to bootargs on boot.

Change-Id: Icc83451336a4dea2cbcf4927287de23bc8e28cb1
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2018-07-19 09:56:14 +08:00
Jason Zhu 6651d4c0fb dev_desc: judge dev_desc whether NULL or not before use it
Change-Id: I9d0e2d207a143a02949fbdff2d9ad39f154e4f3e
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-07-04 09:31:05 +08:00
Jason Zhu 3671d25201 cmd: bootrkp: fix check blk_dread return value error
Change-Id: Ib283c2eeb982479914f8c806f7b54bf081f4c9be
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-05-08 16:02:43 +08:00
Kever Yang 6caa033365 rockchip: add rkimgtest cmd to get boot dev
We need to check if the storage(sdmmc) have IDB data so that
we can use it as boot device.

Change-Id: I7373b8f1a6c4c41c1d2cb1c94cd5d20c0780b5db
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-05-08 11:20:43 +08:00
qiujian 9e68721b27 bootargs : read oem unlock status
Read oem unlock status from optee_client api
and attach it to bootargs

Change-Id: Ib8b1a9bc115ec9cb7e5ce09dc50845cfd7c1c81b
Signed-off-by: Qiu Jian <qiujian@rock-chips.com>
2018-04-03 10:30:56 +08:00
qiujian f61a997e29 fastboot: implement oem unlock commands for bootrkp
Read-write oem unlock status from optee client api.

Implement the following fastboot commands:
  fastboot oem unlock
  fastboot oem unlock_accept
  fastboot oem lock
  fastboot getvar oem-unlock

Change-Id: I99edcee7b60c6d9529e6687291d87f22bf97b771
Signed-off-by: Qiu Jian <qiujian@rock-chips.com>
2018-04-03 10:30:56 +08:00
qiujian 91c73fb4d1 lib: optee_client:Support attestation
Add methods to read attestation key from the misc partition of
 last 64K, store key and certificate chain data in secure storage.

 When CONFIG_OPTEE_CLIENT is defined,
 uboot support load attestation data.

Change-Id: I8f3bd7096a7856de9e58d294822a818d5fe380ba
Signed-off-by: qiujian <qiujian@rock-chips.com>
2018-03-21 16:38:08 +08:00
Kever Yang 7ad0afacd5 rockchip: bootrkp: add log when boot from recovery
Add a log to show boot from recovery.

Change-Id: I8302820558d53e6b239533806305b2dec7c38c0c
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-01-12 15:40:12 +08:00
Kever Yang 32af749a74 rockchip: bootrkp: update cmd name
Change-Id: If67d534c73b6ea0ba432dceb85f10e6ee4322e16
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-12-21 16:50:11 +08:00
Kever Yang a0e58cf2cc cmd: bootrkp: add a cmd for rockchip rkimg bootloader
'bootrkp' will find the boot device and find all necessary images.
Basically, these partitions are must:
Kernel.img: kernel Image
Resource.img: kernel dtb and logo
system.img: rootfs

Change-Id: Iba3df2535705fa3ed529377f44f041fa2294ce60
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2017-12-08 18:13:25 +08:00