Commit Graph

18 Commits

Author SHA1 Message Date
Jason Zhu 3120d9d50e avb: do not use lastboot if enable CONFIG_ANDROID_AVB
The avb process have verify next level firmware to ensure its
availability. So there is no need to support lastboot in avb
process.

Change-Id: I1623a2bd93c54802ce0067cad7061ade6cc56313
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-07-09 16:38:02 +08:00
Jason Zhu 813227ad54 lib: avb: add init ab metadata interface
Change-Id: Ifad6c8ca70568c2dc8eea0a4ead23e3e7a2a0e74
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-04-29 11:05:35 +08:00
Jason Zhu 1f670f7cc9 lib: avb: get public key by atags
Change-Id: I0d77229585263e81e8be4f5c67a02080c07b0e55
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-03-08 15:32:09 +08:00
Jason Zhu 9b83ce70a9 lib: avb: add get&set perm-attr cer
Change-Id: I89d3a30f43659ae8c9d107ede5db1590b022440d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-03-08 15:32:09 +08:00
Jason Zhu 7cca3dd4d7 lib: avb: support last boot
Change-Id: I803e3deda068be34061a302c27009db5e444f290
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2019-03-06 17:16:13 +08:00
Jason Zhu 7c1937d6d1 lib: avb: change judgement value when read from rpmb
If the item is not existent, trust will return TEE_ERROR_GENERIC
TEE_ERROR_NO_DATA and TEE_ERROR_ITEM_NOT_FOUND. We initialize
the item when return these value.

TEST: fastboot getvar at-vboot-state

ERROR: avb-perm-attr-set=0
avb-locked=
avb-unlock-disabled=

Change-Id: Ie1b4e1ce7d1dc419a0af11e5701b0130f2f7f553
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-08-17 11:41:20 +08:00
Jason Zhu 615e0cde57 lib: avb: fix bug HANG in fastboot getvar at-vboot-state
Bug: Run 'fastboot getvar at-vboot-state', then HANG
in the fastboot without any message.

Cause: The fastboot can not decide the vboot size when
the return information size of vboot state is larger
than the VBOOT_STATE_SIZE. This makes the device will not
response to console.

Solution: 1. Enlarge VBOOT_STATE_SIZE. The max size of
vboot state may be 862, so define VBOOT_STATE_SIZE
to 1000.
2. Use snprintf to get the info.

Change-Id: I2d0fda76ca9034c596993ab27a02cbf2fa550977
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-08-17 11:41:20 +08:00
Jason Zhu ab608f806e lib: avb: update avb source code
according to google lib avb
commit id: 44e07124afb1f46af0d745d83481f49c482900b1

Change-Id: Ie59a7265699e3e6b1673bb64da6d1c7a1e7b6201
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-06-13 10:50:36 +08:00
Jason Zhu 57c7f8fe0d lib: avb: support generate unlock challenge
Change-Id: Ia21746ec2bc729fd92ca7ea7a3320dfcbd4dd238
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-06-13 10:50:36 +08:00
Jason Zhu 83ab7b4937 lib: avb: rk: add authenticated unlock interface
Change-Id: Ib2aa1ac07d25f14aa08fc759ec99b6ba64d6abef
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-06-13 10:50:36 +08:00
Jason Zhu c3230cf0df lib: avb: add bootloader-min-versions
The bootloader include uboot and trust. The uboot slot index
number is 0. The trust slot number index is 1.

Change-Id: Ia62edbf60486fa4128756458c6312f682a83d0f7
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-03-22 10:57:04 +08:00
Jason Zhu df50318e9d lib: avb: add slot number to avb-min-versions
Acording to google, the avb-min-versions includes the slot number
rather than the image rollback-index stored in the image.

PIK/PSK: use AVB_ATX_PSK_VERSION_LOCATION and AVB_ATX_PIK_VERSION_LOCATION
as slot number.

Change-Id: I06b8d107e27f1e0f136b5e964c1287bc13f80b7c
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-03-22 10:57:04 +08:00
Jason Zhu da980a5200 lib: avb: initialize temp_flag before next used
Change-Id: Icbc570fdb1cd1f8ff30309f5776421ee6c4a086b
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-03-05 20:41:36 +08:00
Jason Zhu 90ed034fda lib: avb: change the return value if the item is not found
Change-Id: Ie6d29a59323789c594b4c6e9167c3bbe58e25e9f
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-03-05 20:39:32 +08:00
Jason Zhu 76c40fa69f lib: avb: fix compile error in arm64
Change-Id: I7be9c7bab1721500c70cacb1774b579d2939436a
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-03-05 11:35:03 +08:00
Jason Zhu 99ff1ad0c6 lib: avb: fix compile warning
Change-Id: I0cdddc0da44a839371fd8b6d6402053e505976fd
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-02-10 10:48:41 +08:00
Jason Zhu 459bc93392 lib: avb: get the dev_desc by function rockchip_get_bootdev
Change-Id: I62211b54b0efc11e232d9473a9f566c9fa82b3d8
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-02-10 10:48:21 +08:00
Jason Zhu 37a7bc39c0 lib: avb: update and modify the avb library
The commit point is updated to google external/avb/
which commit point is cf8c56208d2d9643804a7f123b196c7ebc9af276.

Change-Id: I5a10a8a45d3e9e2c9d20d9b3d44946073c9a49ff
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2018-02-10 10:41:04 +08:00