From 27854a0a84cd2db9539b662a1f1fc95ef7409962 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 26 Jul 2016 15:05:35 +0200 Subject: build: add checksum target Add a new "checksum" make target which generates an sha256sums file over the image files produced in bin/targets/ and automatically call it during make world after the package index generation. The advantage of this new target is that it is guaranteed to run after the images, the SDK and the ImageBuilder archives have been generated to ensure that they all end up in the checksum file. Fixes FS#51. Uses sed to postprocess the OpenSSL digest output into an sha256sum command compatible format. Signed-off-by: Jo-Philipp Wich --- target/imagebuilder/files/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'target') diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 44439854d6..493012ff72 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -125,6 +125,7 @@ ifneq ($(USER_FILES),) endif $(MAKE) package_postinst $(MAKE) build_image + $(MAKE) checksum package_index: FORCE @echo @@ -170,6 +171,11 @@ build_image: FORCE $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)") +checksum: FORCE + @echo + @echo Calculating checksums... + @$(call sha256sums,$(BIN_DIR)) + clean: rm -rf $(TMP_DIR) $(DL_DIR) $(TARGET_DIR) $(BIN_DIR) -- cgit v1.2.3