Add support for factory images with other suffixes than .bin and profiles without factory images
This adds the new macro GluonProfileFactorySuffix which can be used to override the factory images suffix ".bin". When the suffix is set to the empty string Gluon will assume that there are no factory images.
This commit is contained in:
parent
408482c6f2
commit
e93173c45c
16
Makefile
16
Makefile
@ -57,6 +57,9 @@ image/$(1): FORCE
|
|||||||
+@$$(GLUONMAKE) $$@
|
+@$$(GLUONMAKE) $$@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define GluonProfileFactorySuffix
|
||||||
|
endef
|
||||||
|
|
||||||
define GluonModel
|
define GluonModel
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -127,9 +130,14 @@ define GluonProfile
|
|||||||
PROFILES += $(1)
|
PROFILES += $(1)
|
||||||
PROFILE_PACKAGES += $(filter-out -%,$(2) $(GLUON_$(1)_SITE_PACKAGES))
|
PROFILE_PACKAGES += $(filter-out -%,$(2) $(GLUON_$(1)_SITE_PACKAGES))
|
||||||
GLUON_$(1)_DEFAULT_PACKAGES := $(2)
|
GLUON_$(1)_DEFAULT_PACKAGES := $(2)
|
||||||
|
GLUON_$(1)_FACTORY_SUFFIX := .bin
|
||||||
GLUON_$(1)_MODELS :=
|
GLUON_$(1)_MODELS :=
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define GluonProfileFactorySuffix
|
||||||
|
GLUON_$(1)_FACTORY_SUFFIX := $(2)
|
||||||
|
endef
|
||||||
|
|
||||||
define GluonModel
|
define GluonModel
|
||||||
GLUON_$(1)_MODELS += $(3)
|
GLUON_$(1)_MODELS += $(3)
|
||||||
GLUON_$(1)_MODEL_$(3) := $(2)
|
GLUON_$(1)_MODEL_$(3) := $(2)
|
||||||
@ -339,11 +347,13 @@ image: FORCE
|
|||||||
PROFILE="$(PROFILE)" KDIR="$(PROFILE_KDIR)" TARGET_DIR="$(TARGET_DIR)" BIN_DIR="$(BIN_DIR)" TMP_DIR="$(TMP_DIR)"
|
PROFILE="$(PROFILE)" KDIR="$(PROFILE_KDIR)" TARGET_DIR="$(TARGET_DIR)" BIN_DIR="$(BIN_DIR)" TMP_DIR="$(TMP_DIR)"
|
||||||
|
|
||||||
$(foreach model,$(GLUON_$(PROFILE)_MODELS), \
|
$(foreach model,$(GLUON_$(PROFILE)_MODELS), \
|
||||||
rm -f $(GLUON_IMAGEDIR)/factory/gluon-*-$(model).bin && \
|
|
||||||
rm -f $(GLUON_IMAGEDIR)/sysupgrade/gluon-*-$(model)-sysupgrade.bin && \
|
rm -f $(GLUON_IMAGEDIR)/sysupgrade/gluon-*-$(model)-sysupgrade.bin && \
|
||||||
\
|
|
||||||
cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))-factory.bin $(GLUON_IMAGEDIR)/factory/$(IMAGE_PREFIX)-$(model).bin && \
|
|
||||||
cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))-sysupgrade.bin $(GLUON_IMAGEDIR)/sysupgrade/$(IMAGE_PREFIX)-$(model)-sysupgrade.bin && \
|
cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))-sysupgrade.bin $(GLUON_IMAGEDIR)/sysupgrade/$(IMAGE_PREFIX)-$(model)-sysupgrade.bin && \
|
||||||
|
\
|
||||||
|
$(if $(GLUON_$(PROFILE)_FACTORY_SUFFIX), \
|
||||||
|
rm -f $(GLUON_IMAGEDIR)/factory/gluon-*-$(model)$(GLUON_$(PROFILE)_FACTORY_SUFFIX) && \
|
||||||
|
cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))-factory$(GLUON_$(PROFILE)_FACTORY_SUFFIX) $(GLUON_IMAGEDIR)/factory/$(IMAGE_PREFIX)-$(model)$(GLUON_$(PROFILE)_FACTORY_SUFFIX) && \
|
||||||
|
) \
|
||||||
) :
|
) :
|
||||||
|
|
||||||
image/%: $(gluon_prepared_stamp)
|
image/%: $(gluon_prepared_stamp)
|
||||||
|
Loading…
Reference in New Issue
Block a user