From 12abed64fe7a4597eb614a8f642b86904aec8b95 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 6 Feb 2014 13:20:34 +0100 Subject: [PATCH] Add manifest generator --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Makefile b/Makefile index 188c96a6..31d2c739 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,11 @@ download prepare images: FORCE @$(CheckExternal) +@$(GLUONMAKE) $@ +manifest: FORCE + @$(CheckExternal) + [ -n "$(BRANCH)" ] || (echo 'Please set BRANCH to create a manifest.'; false) + +@$(GLUONMAKE) $@ + dirclean: clean @$(CheckExternal) +@$(SUBMAKE) -C $(TOPDIR) -r dirclean @@ -291,6 +296,22 @@ call_image/%: FORCE images: $(patsubst %,call_image/%,$(PROFILES)) ; + +manifest: FORCE + mkdir -p $(GLUON_IMAGEDIR)/sysupgrade + (cd $(GLUON_IMAGEDIR)/sysupgrade && echo "BRANCH=$(BRANCH)" && echo && ($(foreach profile,$(PROFILES), \ + $(foreach model,$(GLUON_$(profile)_MODELS), \ + for file in gluon-*-$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(model)-*-sysupgrade.bin; do \ + [ -e "$$file" ] && echo \ + $(GLUON_$(profile)_MODEL_$(model)) \ + $$(echo "$$file" | sed -n -r 's/^gluon-$(GLUON_SITE_CODE)-(.*)-$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(model)-[^-]*-sysupgrade\.bin$$/\1/p') \ + $$(sha512sum "$$file" | awk '{print $$1}') \ + "$$file" && break; \ + done; \ + ) \ + ) :)) > $(GLUON_IMAGEDIR)/sysupgrade/$(BRANCH).manifest + + .PHONY: all images prepare clean cleanall endif