README 3.9 KB

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