aboutsummaryrefslogtreecommitdiffstats
path: root/include/image.mk
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-02-22 15:55:43 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-02-25 18:11:06 +0100
commitef2cb8572b48f1e1964b4d1d014d16cb721b5175 (patch)
tree595fb4d12164bfa78c653c897428002ec69dfd1d /include/image.mk
parent198385b69de14494e282035a2293fc253f839864 (diff)
downloadupstream-ef2cb8572b48f1e1964b4d1d014d16cb721b5175.tar.gz
upstream-ef2cb8572b48f1e1964b4d1d014d16cb721b5175.tar.bz2
upstream-ef2cb8572b48f1e1964b4d1d014d16cb721b5175.zip
treewide: rename IMAGE_PREFIX/IMAGE_NAME to DEVICE_IMG_*
We so far had two variables IMG_PREFIX and IMAGE_PREFIX with different content. Since these names are obviously quite confusing, this patch renames the latter to DEVICE_IMG_PREFIX, as it's a device-dependent variable, while IMG_PREFIX is only (sub)target-dependent. For consistency, also rename IMAGE_NAME to DEVICE_IMG_NAME, as that's a device-dependent variable as well. Cc: Paul Spooren <mail@aparcar.org> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'include/image.mk')
-rw-r--r--include/image.mk42
1 files changed, 21 insertions, 21 deletions
diff --git a/include/image.mk b/include/image.mk
index 8cfd2155f3..48911e4057 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -363,14 +363,14 @@ define Device/Init
IMAGES :=
ARTIFACTS :=
- IMAGE_PREFIX := $(IMG_PREFIX)-$(1)
- IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
+ DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1)
+ DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
IMAGE_SIZE :=
- KERNEL_PREFIX = $$(IMAGE_PREFIX)
+ KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX)
KERNEL_SUFFIX := -kernel.bin
KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX)
KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX)
- KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs
+ KERNEL_INITRAMFS_PREFIX = $$(DEVICE_IMG_PREFIX)-initramfs
KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_INITRAMFS_SUFFIX)
KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs
KERNEL_INSTALL :=
@@ -490,10 +490,10 @@ define Device/Build/initramfs
DEVICE_ID="$(1)" \
BIN_DIR="$(BIN_DIR)" \
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
- IMAGE_NAME="$$(notdir $$^)" \
+ DEVICE_IMG_NAME="$$(notdir $$^)" \
IMAGE_TYPE="kernel" \
IMAGE_FILESYSTEM="initramfs" \
- IMAGE_PREFIX="$$(IMAGE_PREFIX)" \
+ DEVICE_IMG_PREFIX="$$(DEVICE_IMG_PREFIX)" \
DEVICE_VENDOR="$$(DEVICE_VENDOR)" \
DEVICE_MODEL="$$(DEVICE_MODEL)" \
DEVICE_VARIANT="$$(DEVICE_VARIANT)" \
@@ -565,9 +565,9 @@ endef
define Device/Build/image
GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz))
$$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
- $(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json, \
- $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX))
- $(eval $(call Device/Export,$(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)),$(1)))
+ $(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json, \
+ $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX))
+ $(eval $(call Device/Export,$(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2)),$(1)))
ROOTFS/$(1)/$(3) := \
$(KDIR)/root.$(1)$$(strip \
@@ -578,28 +578,28 @@ define Device/Build/image
ifndef IB
$$(ROOTFS/$(1)/$(3)): $(if $(TARGET_PER_DEVICE_ROOTFS),target-dir-$$(ROOTFS_ID/$(3)))
endif
- $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)): $$(KDIR_KERNEL_IMAGE) $$(ROOTFS/$(1)/$(3))
+ $(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2)): $$(KDIR_KERNEL_IMAGE) $$(ROOTFS/$(1)/$(3))
@rm -f $$@
[ -f $$(word 1,$$^) -a -f $$(word 2,$$^) ]
$$(call concat_cmd,$(if $(IMAGE/$(2)/$(1)),$(IMAGE/$(2)/$(1)),$(IMAGE/$(2))))
- .IGNORE: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))
+ .IGNORE: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))
- $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)).gz: $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2))
+ $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2)).gz: $(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2))
gzip -c -9n $$^ > $$@
- $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2))
+ $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2)): $(KDIR)/tmp/$(call DEVICE_IMG_NAME,$(1),$(2))
cp $$^ $$@
- $(BUILD_DIR)/json_info_files/$(call IMAGE_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX)
+ $(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX)
@mkdir -p $$(shell dirname $$@)
DEVICE_ID="$(DEVICE_NAME)" \
BIN_DIR="$(BIN_DIR)" \
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
- IMAGE_NAME="$(IMAGE_NAME)" \
+ DEVICE_IMG_NAME="$(DEVICE_IMG_NAME)" \
IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \
IMAGE_FILESYSTEM="$(1)" \
- IMAGE_PREFIX="$(IMAGE_PREFIX)" \
+ DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
DEVICE_MODEL="$(DEVICE_MODEL)" \
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
@@ -624,15 +624,15 @@ define Device/Build/image
endef
define Device/Build/artifact
- $$(_TARGET): $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
- $(eval $(call Device/Export,$(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)))
- $(KDIR)/tmp/$(IMAGE_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE)
+ $$(_TARGET): $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)
+ $(eval $(call Device/Export,$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1)))
+ $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE)
@rm -f $$@
$$(call concat_cmd,$(ARTIFACT/$(1)))
- .IGNORE: $(BIN_DIR)/$(IMAGE_PREFIX)-$(1)
+ .IGNORE: $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)
- $(BIN_DIR)/$(IMAGE_PREFIX)-$(1): $(KDIR)/tmp/$(IMAGE_PREFIX)-$(1)
+ $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1): $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1)
cp $$^ $$@
endef