swupdate.bbclass 2.0 KB

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