diff options
author | John Crispin <john@phrozen.org> | 2017-04-24 11:10:39 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-04-24 11:11:52 +0200 |
commit | 003e15221a353a1162c7253c01864893469b66f4 (patch) | |
tree | d88f5827f60f7dc5d4ae7d89b032f37c72c13d49 /include/image.mk | |
parent | a02cb1f311218ef12cc5502e0841495ec7682100 (diff) | |
download | upstream-003e15221a353a1162c7253c01864893469b66f4.tar.gz upstream-003e15221a353a1162c7253c01864893469b66f4.tar.bz2 upstream-003e15221a353a1162c7253c01864893469b66f4.zip |
include/image.mk: allow passing a compat string to the NAND image template
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'include/image.mk')
-rw-r--r-- | include/image.mk | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/image.mk b/include/image.mk index cc90a140cb..ad9535d018 100644 --- a/include/image.mk +++ b/include/image.mk @@ -210,14 +210,15 @@ endef # $(1): board name # $(2): rootfs type # $(3): kernel image +# $(4): compat string ifneq ($(CONFIG_NAND_SUPPORT),) define Image/Build/SysupgradeNAND - mkdir -p "$(KDIR_TMP)/sysupgrade-$(1)/" - echo "BOARD=$(1)" > "$(KDIR_TMP)/sysupgrade-$(1)/CONTROL" - [ -z "$(2)" ] || $(CP) "$(KDIR)/root.$(2)" "$(KDIR_TMP)/sysupgrade-$(1)/root" - [ -z "$(3)" ] || $(CP) "$(3)" "$(KDIR_TMP)/sysupgrade-$(1)/kernel" + mkdir -p "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/" + echo "BOARD=$(if $(4),$(4),$(1))" > "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/CONTROL" + [ -z "$(2)" ] || $(CP) "$(KDIR)/root.$(2)" "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/root" + [ -z "$(3)" ] || $(CP) "$(3)" "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/kernel" (cd "$(KDIR_TMP)"; $(TAR) cvf \ - "$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(1) \ + "$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(if $(4),$(4),$(1)) \ $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \ ) endef |