README 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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
  42. * Set `SWUPDATE_CMS_KEY ` to the full path of private key file
  43. * (Optional) Set `SWUPDATE_CMS_EXTRA_CERTS` to a space delimited list of intermediate certificate files
  44. 3. Custom signing tool:
  45. * Set variable: `SWUPDATE_SIGNING = "CUSTOM"`
  46. * Set variable `SWUPDATE_SIGN_TOOL' to custom string that needs to be
  47. executed in order to perform the signing
  48. sw-description is signed and the signature is written to sw-description.sig
  49. which is included in the SWU file.
  50. Encrypted private keys are not currently supported since a secure
  51. mechanism must exist to provide the passphrase.
  52. Maintainer
  53. ----------
  54. Stefano Babic <stefano.babic@swupdate.org>
  55. Submitting patches
  56. ------------------
  57. You can submit your patches (or post questions regarding
  58. this layer to the swupdate Mailing List:
  59. swupdate@googlegroups.com
  60. When creating patches, please use something like:
  61. git format-patch -s --subject-prefix='meta-swupdate][PATCH' <revision range>
  62. Please use 'git send-email' to send the generated patches to the ML
  63. to bypass changes from your mailer.