summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2022-10-21 19:37:25 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-26 12:28:40 +0100
commit930dc57fc8dcbf9ca8a3a431a8c4c02901f63182 (patch)
treea6a16d60f1617e5467470f5374e5115b37b6f01f /meta/classes-recipe
parentdeb6b92d44bf31265b6187d29c1b068517ec25c2 (diff)
downloadpoky-930dc57fc8dcbf9ca8a3a431a8c4c02901f63182.tar.gz
uboot-sign: Split off kernel-fitimage variables
In preparation for the next commit, split off several (From OE-Core rev: 60c1a170f1f8c11bc8f42026debf121433b39115) Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r--meta/classes-recipe/kernel-fitimage.bbclass25
-rw-r--r--meta/classes-recipe/uboot-config.bbclass3
-rw-r--r--meta/classes-recipe/uboot-sign.bbclass19
3 files changed, 32 insertions, 15 deletions
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index 8ddebf8dd8..e4a130a0f2 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -65,6 +65,31 @@ python __anonymous () {
65# Description string 65# Description string
66FIT_DESC ?= "Kernel fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" 66FIT_DESC ?= "Kernel fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
67 67
68# Kernel fitImage Hash Algo
69FIT_HASH_ALG ?= "sha256"
70
71# Kernel fitImage Signature Algo
72FIT_SIGN_ALG ?= "rsa2048"
73
74# Kernel / U-Boot fitImage Padding Algo
75FIT_PAD_ALG ?= "pkcs-1.5"
76
77# Generate keys for signing Kernel fitImage
78FIT_GENERATE_KEYS ?= "0"
79
80# Size of private keys in number of bits
81FIT_SIGN_NUMBITS ?= "2048"
82
83# args to openssl genrsa (Default is just the public exponent)
84FIT_KEY_GENRSA_ARGS ?= "-F4"
85
86# args to openssl req (Default is -batch for non interactive mode and
87# -new for new certificate)
88FIT_KEY_REQ_ARGS ?= "-batch -new"
89
90# Standard format for public key certificate
91FIT_KEY_SIGN_PKCS ?= "-x509"
92
68# Sign individual images as well 93# Sign individual images as well
69FIT_SIGN_INDIVIDUAL ?= "0" 94FIT_SIGN_INDIVIDUAL ?= "0"
70 95
diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
index 7ab006a20d..73dc464444 100644
--- a/meta/classes-recipe/uboot-config.bbclass
+++ b/meta/classes-recipe/uboot-config.bbclass
@@ -80,6 +80,9 @@ SPL_MKIMAGE_DTCOPTS ??= ""
80UBOOT_MKIMAGE ?= "uboot-mkimage" 80UBOOT_MKIMAGE ?= "uboot-mkimage"
81UBOOT_MKIMAGE_SIGN ?= "${UBOOT_MKIMAGE}" 81UBOOT_MKIMAGE_SIGN ?= "${UBOOT_MKIMAGE}"
82 82
83# Signature activation - this requires KERNEL_IMAGETYPE = "fitImage"
84UBOOT_SIGN_ENABLE ?= "0"
85
83# Arguments passed to mkimage for signing 86# Arguments passed to mkimage for signing
84UBOOT_MKIMAGE_SIGN_ARGS ?= "" 87UBOOT_MKIMAGE_SIGN_ARGS ?= ""
85SPL_MKIMAGE_SIGN_ARGS ?= "" 88SPL_MKIMAGE_SIGN_ARGS ?= ""
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index 85e23b963f..569907fa68 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -43,8 +43,7 @@ inherit uboot-config
43# Enable use of a U-Boot fitImage 43# Enable use of a U-Boot fitImage
44UBOOT_FITIMAGE_ENABLE ?= "0" 44UBOOT_FITIMAGE_ENABLE ?= "0"
45 45
46# Signature activation - these require their respective fitImages 46# Signature activation - this requires UBOOT_FITIMAGE_ENABLE = "1"
47UBOOT_SIGN_ENABLE ?= "0"
48SPL_SIGN_ENABLE ?= "0" 47SPL_SIGN_ENABLE ?= "0"
49 48
50# Default value for deployment filenames. 49# Default value for deployment filenames.
@@ -71,36 +70,26 @@ SPL_NODTB_SYMLINK ?= "u-boot-spl-nodtb-${MACHINE}.bin"
71# U-Boot fitImage description 70# U-Boot fitImage description
72UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" 71UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
73 72
74# Kernel / U-Boot fitImage Hash Algo 73# U-Boot fitImage Hash Algo
75FIT_HASH_ALG ?= "sha256"
76UBOOT_FIT_HASH_ALG ?= "sha256" 74UBOOT_FIT_HASH_ALG ?= "sha256"
77 75
78# Kernel / U-Boot fitImage Signature Algo 76# U-Boot fitImage Signature Algo
79FIT_SIGN_ALG ?= "rsa2048"
80UBOOT_FIT_SIGN_ALG ?= "rsa2048" 77UBOOT_FIT_SIGN_ALG ?= "rsa2048"
81 78
82# Kernel / U-Boot fitImage Padding Algo 79# Generate keys for signing U-Boot fitImage
83FIT_PAD_ALG ?= "pkcs-1.5"
84
85# Generate keys for signing Kernel / U-Boot fitImage
86FIT_GENERATE_KEYS ?= "0"
87UBOOT_FIT_GENERATE_KEYS ?= "0" 80UBOOT_FIT_GENERATE_KEYS ?= "0"
88 81
89# Size of private keys in number of bits 82# Size of private keys in number of bits
90FIT_SIGN_NUMBITS ?= "2048"
91UBOOT_FIT_SIGN_NUMBITS ?= "2048" 83UBOOT_FIT_SIGN_NUMBITS ?= "2048"
92 84
93# args to openssl genrsa (Default is just the public exponent) 85# args to openssl genrsa (Default is just the public exponent)
94FIT_KEY_GENRSA_ARGS ?= "-F4"
95UBOOT_FIT_KEY_GENRSA_ARGS ?= "-F4" 86UBOOT_FIT_KEY_GENRSA_ARGS ?= "-F4"
96 87
97# args to openssl req (Default is -batch for non interactive mode and 88# args to openssl req (Default is -batch for non interactive mode and
98# -new for new certificate) 89# -new for new certificate)
99FIT_KEY_REQ_ARGS ?= "-batch -new"
100UBOOT_FIT_KEY_REQ_ARGS ?= "-batch -new" 90UBOOT_FIT_KEY_REQ_ARGS ?= "-batch -new"
101 91
102# Standard format for public key certificate 92# Standard format for public key certificate
103FIT_KEY_SIGN_PKCS ?= "-x509"
104UBOOT_FIT_KEY_SIGN_PKCS ?= "-x509" 93UBOOT_FIT_KEY_SIGN_PKCS ?= "-x509"
105 94
106# Functions on this bbclass can apply to either U-boot or Kernel, 95# Functions on this bbclass can apply to either U-boot or Kernel,