README 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. meta-swupdate, Yocto layer for deploy tool
  2. ==========================================
  3. This layer's purpose is to add support for a deployment
  4. mechanism of Yocto's images based on swupdate project.
  5. Layer dependencies
  6. ------------------
  7. This layer depends on:
  8. URI: git://github.com/openembedded/meta-openembedded.git
  9. subdirectory: meta-oe
  10. Recovery GUI in Rust (swupdategui-rs)
  11. -------------------------------------
  12. swupdategui-rs needs more than scarthgap provides:
  13. * Rust >= 1.77 (scarthgap ships 1.75), for example from
  14. URI: https://git.yoctoproject.org/meta-lts-mixins
  15. branch: scarthgap/rust
  16. * clang-native, from
  17. URI: https://github.com/kraj/meta-clang
  18. branch: scarthgap
  19. * LVGL >= 9.2: this layer provides LVGL 9.2.2
  20. Without meta-clang or meta-lts-mixins the recipe is skipped, so builds that
  21. do not use the GUI need neither of them.
  22. Documentation for the layer
  23. ---------------------------
  24. Documentation for meta-swupdate is part of SWUpdate's docs.
  25. Check for http://sbabic.github.io/swupdate/building-with-yocto.html.
  26. BitBake variable expansion
  27. --------------------------
  28. To insert the values of BitBake variables into the update file, pre- and postfix
  29. the names with "@@". For example, to automatically set the version tag, use the
  30. line `version = "@@DISTRO_VERSION@@";` in your sw-description file.
  31. Image hashing
  32. -------------
  33. During creation of the update file, to get the sha256 hash of the image,
  34. pass $swupdate_get_sha256(IMAGE) (where IMAGE is an image filename).
  35. BitBake auto versions
  36. ---------------------
  37. By setting the version tag in the update file to `$swupdate_get_pkgvar(<package-name>)` it is
  38. automatically replaced with `PV` from BitBake's package-data-file for the package
  39. matching the name of the provided <package-name> tag.
  40. To insert the value of a variable from BitBake's package-data-file different to
  41. `PV` (e.g. `PKGV`) you can append the variable name to the tag:
  42. `$swupdate_get_pkgvar(<package-name>@<package-data-variable>)`
  43. SWU image signing
  44. -----------------
  45. There are 3 signing mechanisms supported by meta-swupdate at the moment:
  46. 1. RSA signing:
  47. * Set variable: `SWUPDATE_SIGNING = "RSA"`
  48. * Set `SWUPDATE_PRIVATE_KEY` to the full path of private key file
  49. 2. CMS signing:
  50. * Set variable: `SWUPDATE_SIGNING = "CMS"`
  51. * Set `SWUPDATE_CMS_CERT` to the full path of certificate file. A space
  52. delimited list of certificates may be given to produce a CMS with multiple
  53. signers (e.g. hybrid classic + post-quantum signing). SWUpdate verifies the
  54. signers as an AND, so every certificate must be present in the target trust
  55. store.
  56. * Set `SWUPDATE_CMS_KEY ` to the full path of private key file. When several
  57. certificates are listed in `SWUPDATE_CMS_CERT`, list the matching private
  58. keys here in the same order; the two lists must have the same length.
  59. * (Optional) Set `SWUPDATE_CMS_EXTRA_CERTS` to a space delimited list of intermediate certificate files
  60. * (Optional) Set `SWUPDATE_CMS_MD` to the message digest algorithm passed to
  61. `openssl cms -sign` via `-md` (e.g. `sha256`, `sha512`). When unset, openssl
  62. picks the signing key's default digest. This is required for signing keys
  63. that have no default digest such as ML-DSA where openssl otherwise fails
  64. with "no default digest". `openssl cms` uses a single digest for all
  65. signers, so with multiple certificates choose one strong enough for the
  66. strongest key (e.g. `sha512` when any of ML-DSA-65/87 is used).
  67. 3. Custom signing tool:
  68. * Set variable: `SWUPDATE_SIGNING = "CUSTOM"`
  69. * Set variable `SWUPDATE_SIGN_TOOL' to custom string that needs to be
  70. executed in order to perform the signing
  71. sw-description is signed and the signature is written to sw-description.sig
  72. which is included in the SWU file.
  73. Encrypted private keys are not currently supported since a secure
  74. mechanism must exist to provide the passphrase.
  75. Maintainer
  76. ----------
  77. Stefano Babic <stefano.babic@swupdate.org>
  78. Submitting patches
  79. ------------------
  80. You can submit your patches (or post questions regarding
  81. this layer to the swupdate Mailing List:
  82. swupdate@googlegroups.com
  83. When creating patches, please use something like:
  84. git format-patch -s --subject-prefix='meta-swupdate][PATCH' <revision range>
  85. Please use 'git send-email' to send the generated patches to the ML
  86. to bypass changes from your mailer.