Skip to contentSkip to conversation

UEFI secureboot

PATCH In review Jon Mason 3 participants 9 messages Sep 26, 2024

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

v7 cover UEFI secureboot

Sending a modified version of Javier's patches, combined with a subset of the patches sent out by Mikko recently. This was done to expedite the acceptance of this series (given the code freeze tomorrow). Also, the optee update that Mikko's series included cannot be included (given the code freeze). 2 of that series are needed for this one. So, combining everything into this and sending it out publicly for Javier, Mikko, and anyone else to ack/nack.

Thanks,
Jon

Javier Tia (3):
arm/optee: Add optee udev rules
arm: Enable Secure Boot in all required recipes arm/qemuarm64-secureboot: Enable UEFI Secure Boot

Mikko Rapeli (1):
arm/optee-client: fix systemd service dependencies

 .gitlab-ci.yml                                |  1 +
 ci/uefi-secureboot.yml                        | 37 +++++++++++++
 meta-arm/classes/sbsign.bbclass               | 31 +++++++++++
 .../lib/oeqa/runtime/cases/uefi_secureboot.py | 29 +++++++++++
 .../u-boot/u-boot-uefi-secureboot.inc         | 17 ++++++
 .../u-boot/u-boot/uefi-secureboot.cfg         | 10 ++++
 meta-arm/recipes-bsp/u-boot/u-boot_%.bbappend |  2 +
 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb       | 48 +++++++++++++++++
 .../recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh | 52 +++++++++++++++++++
 .../systemd/systemd-boot-uefi-secureboot.inc  |  7 +++
 .../systemd/systemd-boot_%.bbappend           |  1 +
 meta-arm/recipes-core/systemd/systemd-efi.inc |  1 +
 .../recipes-core/systemd/systemd_%.bbappend   |  1 +
 .../linux/linux-yocto%.bbappend               |  2 +
 .../linux/linux-yocto-uefi-secureboot.inc     | 14 +++++
 .../recipes-security/optee/optee-client.inc   |  8 ++-
 .../optee/optee-client/optee-udev.rules       |  6 +++
 .../optee-client/[email protected]      | 10 ++--
 18 files changed, 272 insertions(+), 5 deletions(-)
 create mode 100644 ci/uefi-secureboot.yml
 create mode 100644 meta-arm/classes/sbsign.bbclass
 create mode 100644 meta-arm/lib/oeqa/runtime/cases/uefi_secureboot.py
 create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot/uefi-secureboot.cfg
 create mode 100644 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb
 create mode 100755 meta-arm/recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh
 create mode 100644 meta-arm/recipes-core/systemd/systemd-boot-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-core/systemd/systemd-boot_%.bbappend
 create mode 100644 meta-arm/recipes-core/systemd/systemd-efi.inc
 create mode 100644 meta-arm/recipes-core/systemd/systemd_%.bbappend
 create mode 100644 meta-arm/recipes-kernel/linux/linux-yocto-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-security/optee/optee-client/optee-udev.rules
Signature · 1 line
2.39.5
author
#1 lore raw

PATCH v7 1/4 arm/optee: Add optee udev rules

From: Javier Tia <[email protected]>

If a /dev/teepriv[0-9]* device is detected, start an instance of tee-supplicant.service with the device name as parameter.

---
 meta-arm/recipes-security/optee/optee-client.inc          | 8 +++++++-
 .../recipes-security/optee/optee-client/optee-udev.rules  | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 meta-arm/recipes-security/optee/optee-client/optee-udev.rules
meta-arm/recipes-security/optee/optee-client.inc +7 -1
index ddda2d1a3ae9..f387c80574b0 100644
@@ -5,12 +5,13 @@ HOMEPAGE = "https://www.op-tee.org/"
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
 
-inherit systemd update-rc.d cmake
+inherit systemd update-rc.d cmake useradd
 
 SRC_URI = " \
     git://github.com/OP-TEE/optee_client.git;branch=master;protocol=https \
     file://[email protected] \
     file://tee-supplicant.sh \
+    file://optee-udev.rules \
 "
 
 UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$"
@@ -26,6 +27,8 @@ EXTRA_OECMAKE:append:toolchain-clang = " -DCFG_WERROR=0"
 do_install:append() {
     install -D -p -m0644 ${UNPACKDIR}/[email protected] ${D}${systemd_system_unitdir}/[email protected]
     install -D -p -m0755 ${UNPACKDIR}/tee-supplicant.sh ${D}${sysconfdir}/init.d/tee-supplicant
+    install -d ${D}${sysconfdir}/udev/rules.d
+    install -m 0644 ${UNPACKDIR}/optee-udev.rules ${D}${sysconfdir}/udev/rules.d/optee.rules
 
     sed -i -e s:@sysconfdir@:${sysconfdir}:g \
            -e s:@sbindir@:${sbindir}:g \
@@ -38,3 +41,6 @@ SYSTEMD_SERVICE:${PN} = "[email protected]"
 INITSCRIPT_PACKAGES = "${PN}"
 INITSCRIPT_NAME:${PN} = "tee-supplicant"
 INITSCRIPT_PARAMS:${PN} = "start 10 1 2 3 4 5 . stop 90 0 6 ."
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "--system teeclnt"
meta-arm/recipes-security/optee/optee-client/optee-udev.rules new file +6 -0
new file mode 100644
index 000000000000..075f469c04e9
@@ -0,0 +1,6 @@
+KERNEL=="tee[0-9]*", MODE="0660", OWNER="root", GROUP="teeclnt", TAG+="systemd"
+
+# If a /dev/teepriv[0-9]* device is detected, start an instance of
+# tee-supplicant.service with the device name as parameter
+KERNEL=="teepriv[0-9]*", MODE="0660", OWNER="root", GROUP="teeclnt", \
+    TAG+="systemd", ENV{SYSTEMD_WANTS}+="tee-supplicant@%k.service"
Signature · 1 line
2.39.5
author
#2 lore raw

PATCH v7 2/4 arm/optee-client: fix systemd service dependencies

In reply to Jon Mason

From: Mikko Rapeli <[email protected]>

udev starts tee-supplicant once optee has been found.
Fix dependencies in systemd service so that starting it in initrd is possible. Stopping requires that ftpm
kernel module is disabled or any TPM related actions will fail until the next reboot so working around these in the service file. These are limitations of current kernel optee and ftpm drivers.

tpm2.target requires systemd 256 or newer. With older system version there is no simple way to queue in service before TPM device is available.

https://www.freedesktop.org/software/systemd/man/devel/systemd.special.html#tpm2.target

Note that
https://www.freedesktop.org/software/systemd/man/devel/systemd-tpm2-generator.html
detects TPM support from either existing kernel driver (built in or loaded really early in initrd and rootfs boot) or ACPI table entry for TPM device. If firmware used a TPM device but doesn't provide ACPI table entry for it, then a kernel patch has been proposed to expose this to userspace:

https://lore.kernel.org/lkml/[email protected]/

and matching change proposal for systemd:

https://github.com/systemd/systemd/pull/32400

---
 .../optee/optee-client/[email protected]         | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
meta-arm/recipes-security/optee/optee-client/[email protected] +6 -4
index 72c0b9aa57ec..8325b6be5174 100644
@@ -1,10 +1,12 @@
 [Unit]
 Description=TEE Supplicant on %i
+DefaultDependencies=no
+After=dev-%i.device
+Wants=dev-%i.device
+Conflicts=shutdown.target
+Before=tpm2.target sysinit.target shutdown.target
 
 [Service]
-User=root
 EnvironmentFile=-@sysconfdir@/default/tee-supplicant
 ExecStart=@sbindir@/tee-supplicant $OPTARGS
-
-[Install]
-WantedBy=basic.target
+ExecStop=-/bin/sh -c "/sbin/modprobe -v -r tpm_ftpm_tee ; /bin/kill $MAINPID"
Signature · 1 line
2.39.5
author
#3 lore raw

PATCH v7 3/4 arm: Enable Secure Boot in all required recipes

In reply to Jon Mason

From: Javier Tia <[email protected]>

In the target, Secure Boot starts from the firmware (u-boot), adds the signing keys, and verifies the bootloader (systemd-boot) and kernel (Linux).

The gen-sbkeys recipe generates keys in the host during build time. If keys are found, it will skip the keys generation. As long as the keys are the same, it will guarantee build reproducibility.

sbsign bbclass is used to sign the binaries. sbsign is the name of the tool used to sign these binaries. Hence the name of this class to sbsign and variables with SBSIGN prefix.

---
 meta-arm/classes/sbsign.bbclass               | 31 +++++++++++
 .../u-boot/u-boot-uefi-secureboot.inc         | 17 ++++++
 .../u-boot/u-boot/uefi-secureboot.cfg         | 10 ++++
 meta-arm/recipes-bsp/u-boot/u-boot_%.bbappend |  2 +
 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb       | 48 +++++++++++++++++
 .../recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh | 52 +++++++++++++++++++
 .../systemd/systemd-boot-uefi-secureboot.inc  |  7 +++
 .../systemd/systemd-boot_%.bbappend           |  1 +
 meta-arm/recipes-core/systemd/systemd-efi.inc |  1 +
 .../recipes-core/systemd/systemd_%.bbappend   |  1 +
 .../linux/linux-yocto%.bbappend               |  2 +
 .../linux/linux-yocto-uefi-secureboot.inc     | 14 +++++
 12 files changed, 186 insertions(+)
 create mode 100644 meta-arm/classes/sbsign.bbclass
 create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot/uefi-secureboot.cfg
 create mode 100644 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb
 create mode 100755 meta-arm/recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh
 create mode 100644 meta-arm/recipes-core/systemd/systemd-boot-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-core/systemd/systemd-boot_%.bbappend
 create mode 100644 meta-arm/recipes-core/systemd/systemd-efi.inc
 create mode 100644 meta-arm/recipes-core/systemd/systemd_%.bbappend
 create mode 100644 meta-arm/recipes-kernel/linux/linux-yocto-uefi-secureboot.inc
meta-arm/classes/sbsign.bbclass new file +31 -0
new file mode 100644
index 000000000000..551b951dc2b4
@@ -0,0 +1,31 @@
+# Sign binaries for UEFI Secure Boot
+#
+# Usage in recipes:
+#
+# Set binary to sign per recipe:
+# SBSIGN_TARGET_BINARY = "${B}/binary_to_sign"
+#
+# Then call do_sbsign() in correct stage of the build
+# do_compile:append() {
+#     do_sbsign
+# }
+
+DEPENDS += 'gen-sbkeys'
+DEPENDS += "sbsigntool-native"
+
+SBSIGN_KEY = "${SBSIGN_KEYS_DIR}/db.key"
+SBSIGN_CERT = "${SBSIGN_KEYS_DIR}/db.crt"
+SBSIGN_TARGET_BINARY ?= "binary_to_sign"
+
+# Not adding as task since recipes may need to sign binaries at different
+# stages. Instead they can call this function when needed by calling this function
+do_sbsign() {
+    bbnote "Signing ${PN} binary ${SBSIGN_TARGET_BINARY} with ${SBSIGN_KEY} and ${SBSIGN_CERT}"
+    ${STAGING_BINDIR_NATIVE}/sbsign \
+        --key "${SBSIGN_KEY}" \
+        --cert "${SBSIGN_CERT}" \
+        --output  "${SBSIGN_TARGET_BINARY}.signed" \
+        "${SBSIGN_TARGET_BINARY}"
+    cp "${SBSIGN_TARGET_BINARY}" "${SBSIGN_TARGET_BINARY}.unsigned"
+    cp "${SBSIGN_TARGET_BINARY}.signed" "${SBSIGN_TARGET_BINARY}"
+}
meta-arm/recipes-bsp/u-boot/u-boot-uefi-secureboot.inc new file +17 -0
new file mode 100644
index 000000000000..e58035a9c236
@@ -0,0 +1,17 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://uefi-secureboot.cfg"
+
+inherit sbsign
+
+DEPENDS += 'python3-pyopenssl-native'
+
+do_compile:prepend() {
+    export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1
+
+    "${S}"/tools/efivar.py set -i "${S}"/ubootefi.var -n pk  -d "${SBSIGN_KEYS_DIR}"/PK.esl  -t file
+    "${S}"/tools/efivar.py set -i "${S}"/ubootefi.var -n kek -d "${SBSIGN_KEYS_DIR}"/KEK.esl -t file
+    "${S}"/tools/efivar.py set -i "${S}"/ubootefi.var -n db  -d "${SBSIGN_KEYS_DIR}"/db.esl  -t file
+    "${S}"/tools/efivar.py set -i "${S}"/ubootefi.var -n dbx -d "${SBSIGN_KEYS_DIR}"/dbx.esl -t file
+    "${S}"/tools/efivar.py print -i "${S}"/ubootefi.var
+}
meta-arm/recipes-bsp/u-boot/u-boot/uefi-secureboot.cfg new file +10 -0
new file mode 100644
index 000000000000..acdcfdddf3c2
@@ -0,0 +1,10 @@
+CONFIG_CMD_BOOTMENU=y
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="bootmenu"
+CONFIG_USE_PREBOOT=y
+CONFIG_EFI_VAR_BUF_SIZE=65536
+CONFIG_FIT_SIGNATURE=y
+CONFIG_EFI_SECURE_BOOT=y
+CONFIG_EFI_VARIABLES_PRESEED=y
+CONFIG_PREBOOT="setenv bootmenu_0 UEFI Boot Manager=bootefi bootmgr; setenv bootmenu_1 UEFI Maintenance Menu=eficonfig"
+CONFIG_PREBOOT_DEFINED=y
meta-arm/recipes-bsp/u-boot/u-boot_%.bbappend +2 -0
index 0683a783891f..8542ccfc9084 100644
@@ -2,3 +2,5 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
 
 SRC_URI:append:qemuarm64-secureboot = " file://qemuarm64.cfg"
 SRC_URI:append:qemuarm-secureboot = " file://qemuarm.cfg"
+
+require ${@bb.utils.contains('MACHINE_FEATURES', 'uefi-secureboot', 'u-boot-uefi-secureboot.inc', '', d)}
meta-arm/recipes-bsp/uefi/gen-sbkeys.bb new file +48 -0

48 lines not on this page · raw message

meta-arm/recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh new file +52 -0

52 lines not on this page · raw message

meta-arm/recipes-core/systemd/systemd-boot-uefi-secureboot.inc new file +7 -0
new file mode 100644
index 000000000000..84196a681e06
@@ -0,0 +1,7 @@
+inherit sbsign
+
+SBSIGN_TARGET_BINARY = "${B}/src/boot/efi/systemd-boot${EFI_ARCH}.efi"
+
+do_compile:append() {
+    do_sbsign
+}
meta-arm/recipes-core/systemd/systemd-boot_%.bbappend new file +1 -0
new file mode 100644
index 000000000000..9850bbf9a663
@@ -0,0 +1 @@
+require ${@bb.utils.contains('MACHINE_FEATURES', 'uefi-secureboot', 'systemd-boot-uefi-secureboot.inc', '', d)}
meta-arm/recipes-core/systemd/systemd-efi.inc new file +1 -0
new file mode 100644
index 000000000000..5572e51ae917
@@ -0,0 +1 @@
+PACKAGECONFIG:append = " efi"
meta-arm/recipes-core/systemd/systemd_%.bbappend new file +1 -0
new file mode 100644
index 000000000000..660358c29b9d
@@ -0,0 +1 @@
+require ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'systemd-efi.inc', '', d)}
meta-arm/recipes-kernel/linux/linux-yocto%.bbappend +2 -0
index a287d0e1814a..71e643a95496 100644
@@ -25,3 +25,5 @@ SRC_URI:append:qemuarm = " \
 
 FFA_TRANSPORT_INCLUDE = "${@bb.utils.contains('MACHINE_FEATURES', 'arm-ffa', 'arm-ffa-transport.inc', '' , d)}"
 require ${FFA_TRANSPORT_INCLUDE}
+
+require ${@bb.utils.contains('MACHINE_FEATURES', 'uefi-secureboot', 'linux-yocto-uefi-secureboot.inc', '', d)}
meta-arm/recipes-kernel/linux/linux-yocto-uefi-secureboot.inc new file +14 -0
new file mode 100644
index 000000000000..5c1f4de7a0ad
@@ -0,0 +1,14 @@
+KERNEL_FEATURES += "cfg/efi-ext.scc"
+
+inherit sbsign
+
+# shell variable set inside do_compile task
+SBSIGN_TARGET_BINARY = "$KERNEL_IMAGE"
+
+do_compile:append() {
+    KERNEL_IMAGE=$(find ${B} -name ${KERNEL_IMAGETYPE} -print -quit)
+    do_sbsign
+}
+
+RRECOMMENDS:${PN} += "kernel-module-efivarfs"
+RRECOMMENDS:${PN} += "kernel-module-efivars"
Signature · 1 line
2.39.5
author
#4 lore raw

PATCH v7 4/4 arm/qemuarm64-secureboot: Enable UEFI Secure Boot

In reply to Jon Mason

From: Javier Tia <[email protected]>

Encapsulate all UEFI Secure Boot required settings in one Kas configuration file.

Introduce SBSIGN_KEYS_DIR variable where UEFI keys will be generated to sign UEFI binaries.

Introduce uefi-secureboot machine feature, which is being used to conditionally set the proper UEFI settings in recipes.

Replace Grub bootloader with systemd-boot, which it makes easier to enable Secure Boot.

Advantages using systemd as Init Manager:

- Extending secure boot to userspace is a lot easier with systemd than with sysvinit where custom scripts will need to be written for all use cases.

- systemd supports dm-verity and TPM devices for encryption usecases out of the box. Enabling them is a lot easier than writing custom scripts for sysvinit.

- systemd also supports EUFI signing the UKI binaries which merge kernel, command line and initrd which helps in bringing secure boot towards rootfs.

- systemd offers a modular structure with unit files that are more predictable and easier to manage than the complex and varied scripts used by SysVinit. This modularity allows for better control and customization of the boot process, which is beneficial in Secure Boot environments.

- Add CI settings to build and test UEFI Secure Boot.

Add one test to verify Secure Boot using OE Testing infraestructure:

$ kas build ci/qemuarm64-secureboot.yml:ci/uefi-secureboot.yml:ci/testimage.yml
...
RESULTS - uefi_secureboot.UEFI_SB_TestSuite.test_uefi_secureboot: PASSED (0.62s)
...
SUMMARY:
core-image-base () - Ran 73 tests in 28.281s
core-image-base - OK - All required tests passed (successes=19, skipped=54, failures=0, errors=0)
---
 .gitlab-ci.yml                                |  1 +
 ci/uefi-secureboot.yml                        | 37 +++++++++++++++++++
 .../lib/oeqa/runtime/cases/uefi_secureboot.py | 29 +++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 ci/uefi-secureboot.yml
 create mode 100644 meta-arm/lib/oeqa/runtime/cases/uefi_secureboot.py
.gitlab-ci.yml +1 -0
index e8627731e244..1ea167c63d8e 100644
@@ -272,6 +272,7 @@ qemuarm64-secureboot:
         TOOLCHAINS: [gcc, clang]
         TCLIBC: [glibc, musl]
         TS: [none, qemuarm64-secureboot-ts]
+        UEFISB: [none, uefi-secureboot]
         TESTING: testimage
       - KERNEL: linux-yocto-dev
         TESTING: testimage
ci/uefi-secureboot.yml new file +37 -0
new file mode 100644
index 000000000000..fd95b876943c
@@ -0,0 +1,37 @@
+# yaml-language-server: $schema=https://raw.githubusercontent.com/siemens/kas/master/kas/schema-kas.json
+
+# UEFI Secure Boot: A mechanism to ensure that only trusted software is executed
+# during the boot process.
+
+header:
+  version: 14
+  includes:
+    - ci/meta-openembedded.yml
+    - ci/meta-secure-core.yml
+
+local_conf_header:
+  uefi_secureboot: |
+    SBSIGN_KEYS_DIR = "${TOPDIR}/sbkeys"
+    BB_ENV_PASSTHROUGH_ADDITIONS = "SBSIGN_KEYS_DIR"
+
+    # Detected by passing kernel parameter
+    QB_KERNEL_ROOT = ""
+
+    # kernel is in the image, should not be loaded separately
+    QB_DEFAULT_KERNEL = "none"
+
+    WKS_FILE = "efi-disk.wks.in"
+    KERNEL_IMAGETYPE = "Image"
+
+    MACHINE_FEATURES:append = " efi uefi-secureboot"
+
+    EFI_PROVIDER = "systemd-boot"
+
+    # Use systemd as the init system
+    INIT_MANAGER = "systemd"
+    DISTRO_FEATURES:append = " systemd"
+    DISTRO_FEATURES_NATIVE:append = " systemd"
+
+    IMAGE_INSTALL:append = " systemd systemd-boot util-linux coreutils efivar"
+
+    TEST_SUITES:append = " uefi_secureboot"
meta-arm/lib/oeqa/runtime/cases/uefi_secureboot.py new file +29 -0
new file mode 100644
index 000000000000..9e47ea8dfecd
@@ -0,0 +1,29 @@
+#
+# SPDX-License-Identifier: MIT
+#
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.oetimeout import OETimeout
+
+
+class UEFI_SB_TestSuite(OERuntimeTestCase):
+    """
+    Validate Secure Boot is Enabled
+    """
+
+    @OETimeout(1300)
+    def test_uefi_secureboot(self):
+        # Validate Secure Boot is enabled by checking
+        # 8be4df61-93ca-11d2-aa0d-00e098032b8c-SecureBoot.
+        # The GUID '8be4df61-93ca-11d2-aa0d-00e098032b8c' is a well-known
+        # identifier for the Secure Boot UEFI variable. By checking the value of
+        # this variable, specifically
+        # '8be4df61-93ca-11d2-aa0d-00e098032b8c-SecureBoot', we can determine
+        # whether Secure Boot is enabled or not. This variable is set by the
+        # UEFI firmware to indicate the current Secure Boot state. If the
+        # variable is set to a value of '0x1' (or '1'), it indicates that Secure
+        # Boot is enabled. If the variable is set to a value of '0x0' (or '0'),
+        # it indicates that Secure Boot is disabled.
+        cmd = "efivar -d -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-SecureBoot"
+        status, output = self.target.run(cmd, timeout=120)
+        self.assertEqual(output, "1", msg="\n".join([cmd, output]))
Signature · 1 line
2.39.5
#5 lore raw
In reply to Jon Mason

Hi Jon,

Quoted 7 lines · Jon Mason via lists.yoctoproject.org

Sending a modified version of Javier's patches, combined with a subset of the patches sent out by Mikko recently. This was done to expedite the acceptance of this series (given the code freeze tomorrow). Also, the optee update that Mikko's series included cannot be included (given the code freeze). 2 of that series are needed for this one. So, combining everything into this and sending it out publicly for Javier, Mikko, and anyone else to ack/nack.

Thank you for sending them ahead of me, as I was just preparing the cover letter to send them out as v7.

Quoted 47 lines

Thanks,
Jon

Javier Tia (3):
arm/optee: Add optee udev rules
arm: Enable Secure Boot in all required recipes arm/qemuarm64-secureboot: Enable UEFI Secure Boot

Mikko Rapeli (1):
arm/optee-client: fix systemd service dependencies

  .gitlab-ci.yml                                |  1 +
  ci/uefi-secureboot.yml                        | 37 +++++++++++++
  meta-arm/classes/sbsign.bbclass               | 31 +++++++++++
  .../lib/oeqa/runtime/cases/uefi_secureboot.py | 29 +++++++++++
  .../u-boot/u-boot-uefi-secureboot.inc         | 17 ++++++
  .../u-boot/u-boot/uefi-secureboot.cfg         | 10 ++++
  meta-arm/recipes-bsp/u-boot/u-boot_%.bbappend |  2 +
  meta-arm/recipes-bsp/uefi/gen-sbkeys.bb       | 48 +++++++++++++++++
  .../recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh | 52 +++++++++++++++++++
  .../systemd/systemd-boot-uefi-secureboot.inc  |  7 +++
  .../systemd/systemd-boot_%.bbappend           |  1 +
  meta-arm/recipes-core/systemd/systemd-efi.inc |  1 +
  .../recipes-core/systemd/systemd_%.bbappend   |  1 +
  .../linux/linux-yocto%.bbappend               |  2 +
  .../linux/linux-yocto-uefi-secureboot.inc     | 14 +++++
  .../recipes-security/optee/optee-client.inc   |  8 ++-
  .../optee/optee-client/optee-udev.rules       |  6 +++
  .../optee-client/[email protected]      | 10 ++--
  18 files changed, 272 insertions(+), 5 deletions(-)

create mode 100644 ci/uefi-secureboot.yml
create mode 100644 meta-arm/classes/sbsign.bbclass
create mode 100644 meta-arm/lib/oeqa/runtime/cases/uefi_secureboot.py create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot-uefi-secureboot.inc create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot/uefi-secureboot.cfg create mode 100644 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb
create mode 100755 meta-arm/recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh create mode 100644 meta-arm/recipes-core/systemd/systemd-boot-uefi-secureboot.inc create mode 100644 meta-arm/recipes-core/systemd/systemd-boot_%.bbappend create mode 100644 meta-arm/recipes-core/systemd/systemd-efi.inc create mode 100644 meta-arm/recipes-core/systemd/systemd_%.bbappend create mode 100644 meta-arm/recipes-kernel/linux/linux-yocto-uefi-secureboot.inc create mode 100644 meta-arm/recipes-security/optee/optee-client/optee-udev.rules

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6117): https://lists.yoctoproject.org/g/meta-arm/message/6117
Mute This Topic: https://lists.yoctoproject.org/mt/108670112/7165667
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

» Javier Tia 🖋

author
#6 lore raw
Quoted 12 lines · Javier Tia

Hi Jon,

Quoted 7 lines · Jon Mason via lists.yoctoproject.org

Sending a modified version of Javier's patches, combined with a subset of the patches sent out by Mikko recently. This was done to expedite the acceptance of this series (given the code freeze tomorrow). Also, the optee update that Mikko's series included cannot be included (given the code freeze). 2 of that series are needed for this one. So, combining everything into this and sending it out publicly for Javier, Mikko, and anyone else to ack/nack.

Quoted 1 line

Thank you for sending them ahead of me, as I was just preparing the cover letter to send them out as v7.

Sorry about that. I'm very eager to get this in (as I'm sure you are too). It's in master-next now

Quoted 59 lines
Quoted 48 lines

Thanks,
Jon

Javier Tia (3):
arm/optee: Add optee udev rules
arm: Enable Secure Boot in all required recipes arm/qemuarm64-secureboot: Enable UEFI Secure Boot

Mikko Rapeli (1):
arm/optee-client: fix systemd service dependencies

  .gitlab-ci.yml                                |  1 +
  ci/uefi-secureboot.yml                        | 37 +++++++++++++
  meta-arm/classes/sbsign.bbclass               | 31 +++++++++++
  .../lib/oeqa/runtime/cases/uefi_secureboot.py | 29 +++++++++++
  .../u-boot/u-boot-uefi-secureboot.inc         | 17 ++++++
  .../u-boot/u-boot/uefi-secureboot.cfg         | 10 ++++
  meta-arm/recipes-bsp/u-boot/u-boot_%.bbappend |  2 +
  meta-arm/recipes-bsp/uefi/gen-sbkeys.bb       | 48 +++++++++++++++++
  .../recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh | 52 +++++++++++++++++++
  .../systemd/systemd-boot-uefi-secureboot.inc  |  7 +++
  .../systemd/systemd-boot_%.bbappend           |  1 +
  meta-arm/recipes-core/systemd/systemd-efi.inc |  1 +
  .../recipes-core/systemd/systemd_%.bbappend   |  1 +
  .../linux/linux-yocto%.bbappend               |  2 +
  .../linux/linux-yocto-uefi-secureboot.inc     | 14 +++++
  .../recipes-security/optee/optee-client.inc   |  8 ++-
  .../optee/optee-client/optee-udev.rules       |  6 +++
  .../optee-client/[email protected]      | 10 ++--
  18 files changed, 272 insertions(+), 5 deletions(-)

create mode 100644 ci/uefi-secureboot.yml
create mode 100644 meta-arm/classes/sbsign.bbclass
create mode 100644 meta-arm/lib/oeqa/runtime/cases/uefi_secureboot.py create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot-uefi-secureboot.inc create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot/uefi-secureboot.cfg create mode 100644 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb
create mode 100755 meta-arm/recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh create mode 100644 meta-arm/recipes-core/systemd/systemd-boot-uefi-secureboot.inc create mode 100644 meta-arm/recipes-core/systemd/systemd-boot_%.bbappend create mode 100644 meta-arm/recipes-core/systemd/systemd-efi.inc create mode 100644 meta-arm/recipes-core/systemd/systemd_%.bbappend create mode 100644 meta-arm/recipes-kernel/linux/linux-yocto-uefi-secureboot.inc create mode 100644 meta-arm/recipes-security/optee/optee-client/optee-udev.rules

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6117): https://lists.yoctoproject.org/g/meta-arm/message/6117
Mute This Topic: https://lists.yoctoproject.org/mt/108670112/7165667
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

» Javier Tia 🖋

#7 lore raw
In reply to Jon Mason

Hi,

Quoted 7 lines · Jon Mason via lists.yoctoproject.org

Sending a modified version of Javier's patches, combined with a subset of the patches sent out by Mikko recently. This was done to expedite the acceptance of this series (given the code freeze tomorrow). Also, the optee update that Mikko's series included cannot be included (given the code freeze). 2 of that series are needed for this one. So, combining everything into this and sending it out publicly for Javier, Mikko, and anyone else to ack/nack.

ACK, optee 4.3 stuff later then.

Cheers,

-Mikko

Quoted 58 lines

Thanks,
Jon

Javier Tia (3):
arm/optee: Add optee udev rules
arm: Enable Secure Boot in all required recipes arm/qemuarm64-secureboot: Enable UEFI Secure Boot

Mikko Rapeli (1):
arm/optee-client: fix systemd service dependencies

 .gitlab-ci.yml                                |  1 +
 ci/uefi-secureboot.yml                        | 37 +++++++++++++
 meta-arm/classes/sbsign.bbclass               | 31 +++++++++++
 .../lib/oeqa/runtime/cases/uefi_secureboot.py | 29 +++++++++++
 .../u-boot/u-boot-uefi-secureboot.inc         | 17 ++++++
 .../u-boot/u-boot/uefi-secureboot.cfg         | 10 ++++
 meta-arm/recipes-bsp/u-boot/u-boot_%.bbappend |  2 +
 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb       | 48 +++++++++++++++++
 .../recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh | 52 +++++++++++++++++++
 .../systemd/systemd-boot-uefi-secureboot.inc  |  7 +++
 .../systemd/systemd-boot_%.bbappend           |  1 +
 meta-arm/recipes-core/systemd/systemd-efi.inc |  1 +
 .../recipes-core/systemd/systemd_%.bbappend   |  1 +
 .../linux/linux-yocto%.bbappend               |  2 +
 .../linux/linux-yocto-uefi-secureboot.inc     | 14 +++++
 .../recipes-security/optee/optee-client.inc   |  8 ++-
 .../optee/optee-client/optee-udev.rules       |  6 +++
 .../optee-client/[email protected]      | 10 ++--
 18 files changed, 272 insertions(+), 5 deletions(-)
 create mode 100644 ci/uefi-secureboot.yml
 create mode 100644 meta-arm/classes/sbsign.bbclass
 create mode 100644 meta-arm/lib/oeqa/runtime/cases/uefi_secureboot.py
 create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot/uefi-secureboot.cfg
 create mode 100644 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb
 create mode 100755 meta-arm/recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh
 create mode 100644 meta-arm/recipes-core/systemd/systemd-boot-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-core/systemd/systemd-boot_%.bbappend
 create mode 100644 meta-arm/recipes-core/systemd/systemd-efi.inc
 create mode 100644 meta-arm/recipes-core/systemd/systemd_%.bbappend
 create mode 100644 meta-arm/recipes-kernel/linux/linux-yocto-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-security/optee/optee-client/optee-udev.rules
Signature · 11 lines
2.39.5



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6117): https://lists.yoctoproject.org/g/meta-arm/message/6117
Mute This Topic: https://lists.yoctoproject.org/mt/108670112/7159507
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
author
#8 lore raw
Quoted 12 lines · Mikko Rapeli

Hi,

Quoted 7 lines · Jon Mason via lists.yoctoproject.org

Sending a modified version of Javier's patches, combined with a subset of the patches sent out by Mikko recently. This was done to expedite the acceptance of this series (given the code freeze tomorrow). Also, the optee update that Mikko's series included cannot be included (given the code freeze). 2 of that series are needed for this one. So, combining everything into this and sending it out publicly for Javier, Mikko, and anyone else to ack/nack.

Quoted 1 line

ACK, optee 4.3 stuff later then.

We'll probably create a styhead branch soon(-ish). Once that happens, I can apply the other patches from that series to master-next.

Quoted 64 lines

Cheers,

-Mikko

Quoted 58 lines

Thanks,
Jon

Javier Tia (3):
arm/optee: Add optee udev rules
arm: Enable Secure Boot in all required recipes arm/qemuarm64-secureboot: Enable UEFI Secure Boot

Mikko Rapeli (1):
arm/optee-client: fix systemd service dependencies

 .gitlab-ci.yml                                |  1 +
 ci/uefi-secureboot.yml                        | 37 +++++++++++++
 meta-arm/classes/sbsign.bbclass               | 31 +++++++++++
 .../lib/oeqa/runtime/cases/uefi_secureboot.py | 29 +++++++++++
 .../u-boot/u-boot-uefi-secureboot.inc         | 17 ++++++
 .../u-boot/u-boot/uefi-secureboot.cfg         | 10 ++++
 meta-arm/recipes-bsp/u-boot/u-boot_%.bbappend |  2 +
 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb       | 48 +++++++++++++++++
 .../recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh | 52 +++++++++++++++++++
 .../systemd/systemd-boot-uefi-secureboot.inc  |  7 +++
 .../systemd/systemd-boot_%.bbappend           |  1 +
 meta-arm/recipes-core/systemd/systemd-efi.inc |  1 +
 .../recipes-core/systemd/systemd_%.bbappend   |  1 +
 .../linux/linux-yocto%.bbappend               |  2 +
 .../linux/linux-yocto-uefi-secureboot.inc     | 14 +++++
 .../recipes-security/optee/optee-client.inc   |  8 ++-
 .../optee/optee-client/optee-udev.rules       |  6 +++
 .../optee-client/[email protected]      | 10 ++--
 18 files changed, 272 insertions(+), 5 deletions(-)
 create mode 100644 ci/uefi-secureboot.yml
 create mode 100644 meta-arm/classes/sbsign.bbclass
 create mode 100644 meta-arm/lib/oeqa/runtime/cases/uefi_secureboot.py
 create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-bsp/u-boot/u-boot/uefi-secureboot.cfg
 create mode 100644 meta-arm/recipes-bsp/uefi/gen-sbkeys.bb
 create mode 100755 meta-arm/recipes-bsp/uefi/gen-sbkeys/gen_sbkeys.sh
 create mode 100644 meta-arm/recipes-core/systemd/systemd-boot-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-core/systemd/systemd-boot_%.bbappend
 create mode 100644 meta-arm/recipes-core/systemd/systemd-efi.inc
 create mode 100644 meta-arm/recipes-core/systemd/systemd_%.bbappend
 create mode 100644 meta-arm/recipes-kernel/linux/linux-yocto-uefi-secureboot.inc
 create mode 100644 meta-arm/recipes-security/optee/optee-client/optee-udev.rules

--
2.39.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6117): https://lists.yoctoproject.org/g/meta-arm/message/6117
Mute This Topic: https://lists.yoctoproject.org/mt/108670112/7159507
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-