Skip to content

File metadata

Generate metadata for files.

Calculate MD5 checksum

Generate the MD5 checksum of a single file. The checksum can be used to verify the integrity of the file later.

  • Target: build/${file}.md5
  • Built dependencies:
    • build/${file} - The file that will have its checksum generated.

Calculate SHA256 checksum

Generate the SHA256 checksum of a single file. The checksum can be used to verify the integrity of the file later.

  • Target: build/${file}.sha256
  • Built dependencies:
    • build/${file} - The file that will have its checksum generated.

Calculate SHA512 checksum

Generate the SHA512 checksum of a single file. The checksum can be used to verify the integrity of the file later.

  • Target: build/${file}.sha512
  • Built dependencies:
    • build/${file} - The file that will have its checksum generated.

Generate bmap metadata

Generate a bmap metadata file for a raw disk image. The bmap file can then be used to efficiently copy the raw image to disk media using bmaptool copy.

  • Target: build/${file}.bmap
  • Built dependencies:
    • build/${file} - The disk image that will have its bmap file generated.

Example

The following Makefile rule shows how to define a phony target build that generates the bmap file build/disk.raw.bmap file for the raw disk image build artifact build/disk.raw.

.PHONY: build
build: build/disk.raw.bmap

This assumes the built dependency build/disk.raw can be generated by other rules which are not shown.