summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/uki.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* uki.bbclass: remove duplicate d.getVar('DEPLOY_DIR_IMAGE')Koen Kooi2025-02-101-2/+0
| | | | | | | | | | | This class calls d.getVar('DEPLOY_DIR_IMAGE') twice within the same method, but DEPLOY_DIR_IMAGE variable won't change during the run of this class, so only retrieve it once. (From OE-Core rev: 6866da9f3a273ed7217e9edfca299fc2e68b2f75) Signed-off-by: Koen Kooi <koen.kooi@oss.qualcomm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uki.bbclass: capture ukify command stdout and stderrMikko Rapeli2025-02-101-1/+2
| | | | | | | | | | ukify tool can show important warnings and even errors if it fails so capture the logs. (From OE-Core rev: 6ac326a4f9d19fa154c9ce172a264f55ebe5b1ef) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/recipes: Switch virtual/XXX-gcc to virtual/cross-cc (and c++/binutils)Richard Purdie2025-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of the base class dependency is to say "yes, I need a C cross compiler" and this was never meant to be gcc specific. Looking at the codebase, whilst we code triplets into this, it does overcomplicate things as there are only ever limited, "target", "sdk" and the class extended versions like mutlilib. After much thought, we can simplify this to virtual/cross-cc and virtual/nativesdk-cross-cc. This lets us remove the "gcc" specific element as well as removing the over complicated triplet usage. At the same time, change the much less widely used "g++" variant to "c++" for similar reasons and remove the triplet from virtual/XXX-binutils too. Backwards compatibility mappings could be left but are just going to confuse things in future so we'll just require users to update. This simplification, whilst disruptive for any toolchain focused layers, will make improved toolchain selection in the future much easier. Since we no longer have overlapping variables, some code for that can just be removed. The class extension code does need to start remapping some variables but not the crosssdk target recipe names. This patch is in two pieces, this one handles the renaming with the functional changes separate in a second for easier review even if this breaks bisection. (From OE-Core rev: 4ccc3bc8266c327bcc18c9a3faf7536210dfb9f0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uki.bbclass: fix debug print logging levelMikko Rapeli2024-11-121-1/+1
| | | | | | | | | Missing/unknown log level triggers a warning. (From OE-Core rev: ab2d1eeb4cad7ef8791954b36f8123cb35b8c000) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uki.bbclass: add class for building Unified Kernel Images (UKI)Michelle Lin2024-10-251-0/+195
This class calls systemd ukify tool, which will combine kernel/initrd/stub components to build the UKI. To sign the UKI (i.e. SecureBoot), the keys/cert files can be specified in a configuration file or UEFI binary signing can be done via separate steps, see qemuarm64-secureboot in meta-arm. UKIs are loaded by UEFI firmware on target which can improve security by loading only correctly signed kernel, initrd and kernel command line. Using systemd-measure to pre-calculate TPM PCR values and sign them is not supported since that requires a TPM device on the build host. Thus "ConditionSecurity=measured-uki" default from systemd 256 does not work but "ConditionSecurity=tpm2" in combination with secure boot will. These can be used to boot securely into systemd-boot, kernel, kernel command line and initrd which then securely mounts a read-only dm-verity /usr partition and creates a TPM encrypted read-write / rootfs. Tested via qemuarm64-secureboot in meta-arm with https://lists.yoctoproject.org/g/meta-arm/topic/patch_v3_02_13/108031399 and a few more changes needed, will be posted separately. (From OE-Core rev: da69a73491a72b46e299f874ce90d81135cd9656) Signed-off-by: Michelle Lin <michelle.linto91@gmail.com> Acked-by: Erik Schilling <erik.schilling@linaro.org> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>