build: add image command for calling kernel2minor
authorFelix Fietkau <nbd@nbd.name>
Fri, 6 Jan 2017 15:49:52 +0000 (16:49 +0100)
committerFelix Fietkau <nbd@nbd.name>
Sat, 7 Jan 2017 16:50:54 +0000 (17:50 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/image-commands.mk

index 083a3890316c633e9a1ffaab6bd7790ebb29ea34..a7acd0ee6739e11cd04c9353f1352c91fe1d54f1 100644 (file)
@@ -190,3 +190,8 @@ metadata_json = \
 define Build/append-metadata
        $(if $(SUPPORTED_DEVICES),echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
 endef
+
+define Build/kernel2minor
+       kernel2minor -k $@ -r $@.new $(1)
+       mv $@.new $@
+endef