build: add a small standalone utility for calculating md5/sha256 hash

This will be used to simplify the build system code for checking hashes.
Instead of using various variants of md5sum / openssl, use one simple
utility for all of them

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2016-12-25 16:23:34 +01:00
parent a0993dda5f
commit dad48c6438
2 changed files with 833 additions and 0 deletions

View File

@@ -156,6 +156,12 @@ $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
$(eval $(call SetupHostCommand,file,Please install the 'file' package, \
file --version 2>&1 | grep file))
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
mkdir -p $(dir $@)
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
prereq: $(STAGING_DIR_HOST)/bin/mkhash
# Install ldconfig stub
$(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
touch $(STAGING_DIR_HOST)/bin/ldconfig && \