Fix image and manifest generation when multiple Gluon images correspond to a single OpenWrt image
This commit is contained in:
parent
5b16b5737e
commit
6f14837b91
18
Makefile
18
Makefile
@ -131,8 +131,8 @@ GLUON_$(1)_MODELS :=
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define GluonModel
|
define GluonModel
|
||||||
GLUON_$(1)_MODELS += $(2)
|
GLUON_$(1)_MODELS += $(3)
|
||||||
GLUON_$(1)_MODEL_$(2) := $(3)
|
GLUON_$(1)_MODEL_$(3) := $(2)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
@ -339,11 +339,11 @@ 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-*-$(GLUON_$(PROFILE)_MODEL_$(model)).bin && \
|
rm -f $(GLUON_IMAGEDIR)/factory/gluon-*-$(model).bin && \
|
||||||
rm -f $(GLUON_IMAGEDIR)/sysupgrade/gluon-*-$(GLUON_$(PROFILE)_MODEL_$(model))-sysupgrade.bin && \
|
rm -f $(GLUON_IMAGEDIR)/sysupgrade/gluon-*-$(model)-sysupgrade.bin && \
|
||||||
\
|
\
|
||||||
cp $(BIN_DIR)/gluon-$(model)-factory.bin $(GLUON_IMAGEDIR)/factory/$(IMAGE_PREFIX)-$(GLUON_$(PROFILE)_MODEL_$(model)).bin && \
|
cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))-factory.bin $(GLUON_IMAGEDIR)/factory/$(IMAGE_PREFIX)-$(model).bin && \
|
||||||
cp $(BIN_DIR)/gluon-$(model)-sysupgrade.bin $(GLUON_IMAGEDIR)/sysupgrade/$(IMAGE_PREFIX)-$(GLUON_$(PROFILE)_MODEL_$(model))-sysupgrade.bin && \
|
cp $(BIN_DIR)/gluon-$(GLUON_$(PROFILE)_MODEL_$(model))-sysupgrade.bin $(GLUON_IMAGEDIR)/sysupgrade/$(IMAGE_PREFIX)-$(model)-sysupgrade.bin && \
|
||||||
) :
|
) :
|
||||||
|
|
||||||
image/%: $(gluon_prepared_stamp)
|
image/%: $(gluon_prepared_stamp)
|
||||||
@ -363,10 +363,10 @@ manifest: FORCE
|
|||||||
echo && \
|
echo && \
|
||||||
($(foreach profile,$(PROFILES), \
|
($(foreach profile,$(PROFILES), \
|
||||||
$(foreach model,$(GLUON_$(profile)_MODELS), \
|
$(foreach model,$(GLUON_$(profile)_MODELS), \
|
||||||
for file in gluon-*-'$(GLUON_$(profile)_MODEL_$(model))-sysupgrade.bin'; do \
|
for file in gluon-*-'$(model)-sysupgrade.bin'; do \
|
||||||
[ -e "$$file" ] && echo \
|
[ -e "$$file" ] && echo \
|
||||||
'$(GLUON_$(profile)_MODEL_$(model))' \
|
'$(model)' \
|
||||||
"$$(echo "$$file" | sed -n -r -e 's/^gluon-$(call regex-escape,$(GLUON_SITE_CODE))-(.*)-$(call regex-escape,$(GLUON_$(profile)_MODEL_$(model)))-sysupgrade\.bin$$/\1/p')" \
|
"$$(echo "$$file" | sed -n -r -e 's/^gluon-$(call regex-escape,$(GLUON_SITE_CODE))-(.*)-$(call regex-escape,$(model))-sysupgrade\.bin$$/\1/p')" \
|
||||||
"$$($(SHA512SUM) "$$file")" \
|
"$$($(SHA512SUM) "$$file")" \
|
||||||
"$$file" && break; \
|
"$$file" && break; \
|
||||||
done; \
|
done; \
|
||||||
|
Loading…
Reference in New Issue
Block a user