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 083a389..a7acd0e 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