build: allow profiles to supply an additional file to be copied to the image directory

This commit is contained in:
Matthias Schiffer 2016-06-23 00:24:00 +02:00
parent dc485f7356
commit acd5cc903e
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -152,17 +152,21 @@ GLUON_$(1)_FACTORY_SUFFIX := -squashfs-factory
GLUON_$(1)_SYSUPGRADE_SUFFIX := -squashfs-sysupgrade GLUON_$(1)_SYSUPGRADE_SUFFIX := -squashfs-sysupgrade
GLUON_$(1)_FACTORY_EXT := .bin GLUON_$(1)_FACTORY_EXT := .bin
GLUON_$(1)_SYSUPGRADE_EXT := .bin GLUON_$(1)_SYSUPGRADE_EXT := .bin
GLUON_$(1)_FACTORY_EXTRA :=
GLUON_$(1)_SYSUPGRADE_EXTRA :=
GLUON_$(1)_MODELS := GLUON_$(1)_MODELS :=
endef endef
define GluonProfileFactorySuffix define GluonProfileFactorySuffix
GLUON_$(1)_FACTORY_SUFFIX := $(2) GLUON_$(1)_FACTORY_SUFFIX := $(2)
GLUON_$(1)_FACTORY_EXT := $(3) GLUON_$(1)_FACTORY_EXT := $(3)
GLUON_$(1)_FACTORY_EXTRA := $(4)
endef endef
define GluonProfileSysupgradeSuffix define GluonProfileSysupgradeSuffix
GLUON_$(1)_SYSUPGRADE_SUFFIX := $(2) GLUON_$(1)_SYSUPGRADE_SUFFIX := $(2)
GLUON_$(1)_SYSUPGRADE_EXT := $(3) GLUON_$(1)_SYSUPGRADE_EXT := $(3)
GLUON_$(1)_SYSUPGRADE_EXTRA := $(4)
endef endef
define GluonModel define GluonModel
@ -447,6 +451,15 @@ image: FORCE
cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))$(GLUON_$(PROFILE)_FACTORY_SUFFIX)$(GLUON_$(PROFILE)_FACTORY_EXT) $(GLUON_IMAGEDIR)/factory/$(IMAGE_PREFIX)-$(model)$(GLUON_$(PROFILE)_FACTORY_EXT) && \ cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))$(GLUON_$(PROFILE)_FACTORY_SUFFIX)$(GLUON_$(PROFILE)_FACTORY_EXT) $(GLUON_IMAGEDIR)/factory/$(IMAGE_PREFIX)-$(model)$(GLUON_$(PROFILE)_FACTORY_EXT) && \
) \ ) \
\ \
$(if $(GLUON_$(PROFILE)_SYSUPGRADE_EXTRA), \
rm -f $(GLUON_IMAGEDIR)/sysupgrade/gluon-*-$(model)-sysupgrade$(GLUON_$(PROFILE)_SYSUPGRADE_EXTRA) && \
cp $(BIN_DIR)/gluon$(GLUON_$(PROFILE)_SYSUPGRADE_EXTRA) $(GLUON_IMAGEDIR)/sysupgrade/$(IMAGE_PREFIX)-$(model)-sysupgrade$(GLUON_$(PROFILE)_SYSUPGRADE_EXTRA) && \
) \
$(if $(GLUON_$(PROFILE)_FACTORY_EXTRA), \
rm -f $(GLUON_IMAGEDIR)/factory/gluon-*-$(model)$(GLUON_$(PROFILE)_FACTORY_EXTRA) && \
cp $(BIN_DIR)/gluon$(GLUON_$(PROFILE)_FACTORY_EXTRA) $(GLUON_IMAGEDIR)/factory/$(IMAGE_PREFIX)-$(model)$(GLUON_$(PROFILE)_FACTORY_EXTRA) && \
) \
\
$(foreach alias,$(GLUON_$(PROFILE)_MODEL_$(model)_ALIASES), \ $(foreach alias,$(GLUON_$(PROFILE)_MODEL_$(model)_ALIASES), \
$(if $(GLUON_$(PROFILE)_SYSUPGRADE_EXT), \ $(if $(GLUON_$(PROFILE)_SYSUPGRADE_EXT), \
rm -f $(GLUON_IMAGEDIR)/sysupgrade/gluon-*-$(alias)-sysupgrade$(GLUON_$(PROFILE)_SYSUPGRADE_EXT) && \ rm -f $(GLUON_IMAGEDIR)/sysupgrade/gluon-*-$(alias)-sysupgrade$(GLUON_$(PROFILE)_SYSUPGRADE_EXT) && \