swupdate.bbclass 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright (C) 2015-2021 Stefano Babic <sbabic@denx.de>
  2. #
  3. # SPDX-License-Identifier: GPLv3
  4. #
  5. # Some parts from the patch class
  6. #
  7. # swupdate allows to generate a compound image for the
  8. # in the "swupdate" format, used for updating the targets
  9. # in field.
  10. # See also http://sbabic.github.io/swupdate/
  11. #
  12. # To use this class, add swupdate to the inherit clause of the update image bb file.
  13. # The generated output file is an swu archive ready to be uploaded to a device running
  14. # swupdate.
  15. #
  16. # Files listed in the SRC_URI variable are added the the swu archive.
  17. #
  18. # For each entry in the SWUPDATE_IMAGES variable an image file is searched for in the
  19. # ${DEPLOY_DIR_IMAGE} folder and added to the swu archive. Different types of entries
  20. # are supported:
  21. # * image name(s) and fstype(s):
  22. # Example:
  23. # SWUPDATE_IMAGES = "core-image-full-cmdline"
  24. # SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ext4.gz"
  25. # For this example either a file core-image-full-cmdline-${MACHINE}.ext4.gz or a file
  26. # core-image-full-cmdline.ext4.gz gets added the swu archive. Optionally the variable
  27. # SWUPDATE_IMAGES_NOAPPEND_MACHINE allows to explicitly define if the MACHINE name
  28. # must be part of the image file name or not.
  29. # * image file name(s)
  30. # Example:
  31. # SWUPDATE_IMAGES = "core-image-full-cmdline.ext4.gz"
  32. # If SWUPDATE_IMAGES_FSTYPES is not defined for an entry in SWUPDATE_IMAGES or the
  33. # corresponding image files cannot be found in the ${DEPLOY_DIR_IMAGE} folder, an
  34. # image file with exactly the name as specified in SWUPDATE_IMAGES is searched for.
  35. inherit swupdate-common
  36. inherit image-artifact-names
  37. IMAGE_DEPENDS ?= ""
  38. do_configure[noexec] = "1"
  39. do_compile[noexec] = "1"
  40. do_install[noexec] = "1"
  41. deltask do_populate_sysroot
  42. do_package[noexec] = "1"
  43. deltask do_package_qa
  44. do_packagedata[noexec] = "1"
  45. do_package_write_ipk[noexec] = "1"
  46. do_package_write_deb[noexec] = "1"
  47. do_package_write_rpm[noexec] = "1"
  48. COMPRESSIONTYPES = ""
  49. PACKAGE_ARCH = "${MACHINE_ARCH}"
  50. INHIBIT_DEFAULT_DEPS = "1"
  51. EXCLUDE_FROM_WORLD = "1"
  52. addtask do_swuimage after do_unpack do_prepare_recipe_sysroot before do_build