summaryrefslogtreecommitdiffstats
path: root/meta/classes/uboot-sign.bbclass
diff options
context:
space:
mode:
authorKlaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>2021-03-26 17:14:07 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-06 11:36:51 +0100
commit068d114385adc679770dc5e8909ad7c432bf8ec1 (patch)
treeaa8bd100c1d2ed9e5bd5dceda121b93c74026a25 /meta/classes/uboot-sign.bbclass
parente8e10f27b20f331622b7fdb3eb4e60f0850ea876 (diff)
downloadpoky-068d114385adc679770dc5e8909ad7c432bf8ec1.tar.gz
u-boot: Move definitions to common locations
Move some definitions from u-boot.inc into uboot-config.bbclass and similarly from kernel-fitimage.bbclass into uboot-sign.bbclass, so that they can be useful when signing the U-boot proper fitimage, for a verified-boot SPL. (From OE-Core rev: cc6c3e31526d3b6ef3a87ba5e548fcad7483bd51) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/uboot-sign.bbclass')
-rw-r--r--meta/classes/uboot-sign.bbclass35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
index d590971a27..4e4941e733 100644
--- a/meta/classes/uboot-sign.bbclass
+++ b/meta/classes/uboot-sign.bbclass
@@ -31,6 +31,9 @@
31# 31#
32# For more details on signature process, please refer to U-Boot documentation. 32# For more details on signature process, please refer to U-Boot documentation.
33 33
34# We need some variables from u-boot-config
35inherit uboot-config
36
34# Signature activation. 37# Signature activation.
35UBOOT_SIGN_ENABLE ?= "0" 38UBOOT_SIGN_ENABLE ?= "0"
36 39
@@ -41,6 +44,38 @@ UBOOT_DTB_SYMLINK ?= "u-boot-${MACHINE}.dtb"
41UBOOT_NODTB_IMAGE ?= "u-boot-nodtb-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" 44UBOOT_NODTB_IMAGE ?= "u-boot-nodtb-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
42UBOOT_NODTB_BINARY ?= "u-boot-nodtb.${UBOOT_SUFFIX}" 45UBOOT_NODTB_BINARY ?= "u-boot-nodtb.${UBOOT_SUFFIX}"
43UBOOT_NODTB_SYMLINK ?= "u-boot-nodtb-${MACHINE}.${UBOOT_SUFFIX}" 46UBOOT_NODTB_SYMLINK ?= "u-boot-nodtb-${MACHINE}.${UBOOT_SUFFIX}"
47UBOOT_ITS_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.its"
48UBOOT_ITS ?= "u-boot.its"
49UBOOT_ITS_SYMLINK ?= "u-boot-${MACHINE}.its"
50SPL_DIR ?= "${@os.path.dirname(d.getVar("SPL_BINARY")) or '.'}"
51SPL_DTB_IMAGE ?= "u-boot-spl-${MACHINE}-${PV}-${PR}.dtb"
52SPL_DTB_BINARY ?= "u-boot-spl.dtb"
53SPL_DTB_SYMLINK ?= "u-boot-spl-${MACHINE}.dtb"
54SPL_NODTB_IMAGE ?= "${@os.path.splitext(d.getVar("SPL_BINARYNAME"))[0]}-nodtb-${MACHINE}-${PV}-${PR}${@os.path.splitext(d.getVar("SPL_BINARYNAME"))[1]}"
55SPL_NODTB_BINARY ?= "${@os.path.splitext(d.getVar("SPL_BINARYNAME"))[0]}-nodtb${@os.path.splitext(d.getVar("SPL_BINARYNAME"))[1]}"
56SPL_NODTB_SYMLINK ?= "${@os.path.splitext(d.getVar("SPL_BINARYNAME"))[0]}-nodtb-${MACHINE}${@os.path.splitext(d.getVar("SPL_BINARYNAME"))[1]}"
57
58# fitImage Hash Algo
59FIT_HASH_ALG ?= "sha256"
60
61# fitImage Signature Algo
62FIT_SIGN_ALG ?= "rsa2048"
63
64# Generate keys for signing fitImage
65FIT_GENERATE_KEYS ?= "0"
66
67# Size of private key in number of bits
68FIT_SIGN_NUMBITS ?= "2048"
69
70# args to openssl genrsa (Default is just the public exponent)
71FIT_KEY_GENRSA_ARGS ?= "-F4"
72
73# args to openssl req (Default is -batch for non interactive mode and
74# -new for new certificate)
75FIT_KEY_REQ_ARGS ?= "-batch -new"
76
77# Standard format for public key certificate
78FIT_KEY_SIGN_PKCS ?= "-x509"
44 79
45# Functions in this bbclass is for u-boot only 80# Functions in this bbclass is for u-boot only
46UBOOT_PN = "${@d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'}" 81UBOOT_PN = "${@d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'}"