include/image.mk: allow passing a compat string to the NAND image template
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
parent
a02cb1f311
commit
003e15221a
1 changed files with 6 additions and 5 deletions
|
@ -210,14 +210,15 @@ endef
|
||||||
# $(1): board name
|
# $(1): board name
|
||||||
# $(2): rootfs type
|
# $(2): rootfs type
|
||||||
# $(3): kernel image
|
# $(3): kernel image
|
||||||
|
# $(4): compat string
|
||||||
ifneq ($(CONFIG_NAND_SUPPORT),)
|
ifneq ($(CONFIG_NAND_SUPPORT),)
|
||||||
define Image/Build/SysupgradeNAND
|
define Image/Build/SysupgradeNAND
|
||||||
mkdir -p "$(KDIR_TMP)/sysupgrade-$(1)/"
|
mkdir -p "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/"
|
||||||
echo "BOARD=$(1)" > "$(KDIR_TMP)/sysupgrade-$(1)/CONTROL"
|
echo "BOARD=$(if $(4),$(4),$(1))" > "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/CONTROL"
|
||||||
[ -z "$(2)" ] || $(CP) "$(KDIR)/root.$(2)" "$(KDIR_TMP)/sysupgrade-$(1)/root"
|
[ -z "$(2)" ] || $(CP) "$(KDIR)/root.$(2)" "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/root"
|
||||||
[ -z "$(3)" ] || $(CP) "$(3)" "$(KDIR_TMP)/sysupgrade-$(1)/kernel"
|
[ -z "$(3)" ] || $(CP) "$(3)" "$(KDIR_TMP)/sysupgrade-$(if $(4),$(4),$(1))/kernel"
|
||||||
(cd "$(KDIR_TMP)"; $(TAR) cvf \
|
(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)") \
|
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in a new issue