Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
dac22c65
Commit
dac22c65
authored
7 years ago
by
davidcunado-arm
Committed by
GitHub
7 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #990 from masahir0y/uniphier
uniphier: embed ROTPK hash into BL1/BL2
parents
41605ffe
63634800
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
v2.1
v2.1-rc1
v2.1-rc0
v2.0
v2.0-rc0
v1.6
v1.6-rc1
v1.6-rc0
v1.5
v1.5-rc3
v1.5-rc2
v1.5-rc1
v1.5-rc0
v1.4
v1.4-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
plat/socionext/uniphier/platform.mk
+18
-0
plat/socionext/uniphier/platform.mk
plat/socionext/uniphier/uniphier_rotpk.S
+15
-0
plat/socionext/uniphier/uniphier_rotpk.S
plat/socionext/uniphier/uniphier_tbbr.c
+5
-1
plat/socionext/uniphier/uniphier_tbbr.c
with
38 additions
and
1 deletion
+38
-1
plat/socionext/uniphier/platform.mk
View file @
dac22c65
...
...
@@ -86,11 +86,29 @@ TBB_SOURCES := drivers/auth/auth_mod.c \
drivers/auth/img_parser_mod.c
\
drivers/auth/tbbr/tbbr_cot.c
\
plat/common/tbbr/plat_tbbr.c
\
$(PLAT_PATH)
/uniphier_rotpk.S
\
$(PLAT_PATH)
/uniphier_tbbr.c
BL1_SOURCES
+=
$(TBB_SOURCES)
BL2_SOURCES
+=
$(TBB_SOURCES)
ROT_KEY
=
$(BUILD_PLAT)
/rot_key.pem
ROTPK_HASH
=
$(BUILD_PLAT)
/rotpk_sha256.bin
$(eval
$(call
add_define_val,ROTPK_HASH,
'"$(ROTPK_HASH)"'
))
$(BUILD_PLAT)/bl1/uniphier_rotpk.o
:
$(ROTPK_HASH)
$(BUILD_PLAT)/bl2/uniphier_rotpk.o
:
$(ROTPK_HASH)
certificates
:
$(ROT_KEY)
$(ROT_KEY)
:
@
echo
" OPENSSL
$@
"
$(Q)
openssl genrsa 2048
>
$@
2>/dev/null
$(ROTPK_HASH)
:
$(ROT_KEY)
@
echo
" OPENSSL
$@
"
$(Q)
openssl rsa
-in
$<
-pubout
-outform
DER 2>/dev/null |
\
openssl dgst
-sha256
-binary
>
$@
2>/dev/null
endif
.PHONY
:
bl1_gzip
...
...
This diff is collapsed.
Click to expand it.
plat/socionext/uniphier/uniphier_rotpk.S
0 → 100644
View file @
dac22c65
/*
*
Copyright
(
c
)
2017
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
.
global
uniphier_rotpk_hash
.
global
uniphier_rotpk_hash_end
uniphier_rotpk_hash
:
/
*
DER
header
*/
.
byte
0x30
,
0x31
,
0x30
,
0x0D
,
0x06
,
0x09
,
0x60
,
0x86
,
0x48
.
byte
0x01
,
0x65
,
0x03
,
0x04
,
0x02
,
0x01
,
0x05
,
0x00
,
0x04
,
0x20
/
*
SHA256
*/
.
incbin
ROTPK_HASH
uniphier_rotpk_hash_end
:
This diff is collapsed.
Click to expand it.
plat/socionext/uniphier/uniphier_tbbr.c
View file @
dac22c65
...
...
@@ -6,10 +6,14 @@
#include <platform.h>
extern
char
uniphier_rotpk_hash
[],
uniphier_rotpk_hash_end
[];
int
plat_get_rotpk_info
(
void
*
cookie
,
void
**
key_ptr
,
unsigned
int
*
key_len
,
unsigned
int
*
flags
)
{
*
flags
=
ROTPK_NOT_DEPLOYED
;
*
key_ptr
=
uniphier_rotpk_hash
;
*
key_len
=
uniphier_rotpk_hash_end
-
uniphier_rotpk_hash
;
*
flags
=
ROTPK_IS_HASH
;
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help