README 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 = "RSA"`
  36. * Set `SWUPDATE_PRIVATE_KEY` to the full path of private key file
  37. 2. CMS signing:
  38. * Set variable: `SWUPDATE_SIGNING = "CMS"`
  39. * Set `SWUPDATE_CMS_CERT` to the full path of certificate file
  40. * Set `SWUPDATE_CMS_KEY ` to the full path of private key file
  41. * (Optional) Set `SWUPDATE_CMS_EXTRA_CERTS` to a space delimited list of intermediate certificate files
  42. * (Optional) Set `SWUPDATE_CMS_MD` to the message digest algorithm passed to
  43. `openssl cms -sign` via `-md` (e.g. `sha256`, `sha512`). When unset, openssl
  44. picks the signing key's default digest. This is required for signing keys
  45. that have no default digest such as ML-DSA where openssl otherwise fails
  46. with "no default digest".
  47. 3. Custom signing tool:
  48. * Set variable: `SWUPDATE_SIGNING = "CUSTOM"`
  49. * Set variable `SWUPDATE_SIGN_TOOL' to custom string that needs to be
  50. executed in order to perform the signing
  51. sw-description is signed and the signature is written to sw-description.sig
  52. which is included in the SWU file.
  53. Encrypted private keys are not currently supported since a secure
  54. mechanism must exist to provide the passphrase.
  55. Maintainer
  56. ----------
  57. Stefano Babic <stefano.babic@swupdate.org>
  58. Submitting patches
  59. ------------------
  60. You can submit your patches (or post questions regarding
  61. this layer to the swupdate Mailing List:
  62. swupdate@googlegroups.com
  63. When creating patches, please use something like:
  64. git format-patch -s --subject-prefix='meta-swupdate][PATCH' <revision range>
  65. Please use 'git send-email' to send the generated patches to the ML
  66. to bypass changes from your mailer.