MEDIA_TYPE = u-boot binaries

TARGET = u-boot-binaries
EXTRANAME = $(MEDIUM)/

.PHONY: u-boot-binaries
u-boot-binaries:
	set -e; while read LINE; \
	do \
	  if [ -n "$${LINE}" ] && ! echo $${LINE} | grep -q -e "^#"; then \
	    set -- $${LINE}; \
	    mkdir -p "$(SOME_DEST)/$(EXTRANAME)/$$1"; \
	    echo "Providing u-boot binaries for $$1 ..."; \
	    cp "$$2" "$(SOME_DEST)/$(EXTRANAME)/$$1/"; \
	    update-manifest "$(SOME_DEST)/$(EXTRANAME)$$1" "u-boot image for $$1"; \
	  fi; \
	done < boot/arm/armel-kirkwood-u-boot-image-config
