aboutsummaryrefslogtreecommitdiffstats
path: root/include/image-legacy.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-07-22 14:27:52 +0200
committerFelix Fietkau <nbd@nbd.name>2016-07-29 10:18:26 +0200
commit76341cfc5f71fb3658535bc21b001399a84f8816 (patch)
tree6a81a709722d786717a4ebc2b2fd12e639187df8 /include/image-legacy.mk
parentc0dceae4bbb3aab0c4fcaf229925e8916d286797 (diff)
downloadupstream-76341cfc5f71fb3658535bc21b001399a84f8816.tar.gz
upstream-76341cfc5f71fb3658535bc21b001399a84f8816.tar.bz2
upstream-76341cfc5f71fb3658535bc21b001399a84f8816.zip
build: add support for per-device rootfs based on device profile packges
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/image-legacy.mk')
-rw-r--r--include/image-legacy.mk22
1 files changed, 21 insertions, 1 deletions
diff --git a/include/image-legacy.mk b/include/image-legacy.mk
index 9ace98fbe5..9633500fd9 100644
--- a/include/image-legacy.mk
+++ b/include/image-legacy.mk
@@ -45,6 +45,15 @@ define LegacyDevice/Check
endif
endef
+ifdef TARGET_PER_DEVICE_ROOTFS
+ define Image/Build/Profile/Filesystem
+ cp $(KDIR)/root.$(2)+pkg=$(3) $(KDIR)/root.$(2)
+ $(call Image/Build/Profile,$(1),$(2))
+ endef
+else
+ Image/Build/Profile/Filesystem = $(Image/Build/Profile)
+endif
+
define LegacyDevice/Build
$$(_TARGET): legacy-image-$(1)
$$(_TARGET_PREPARE): legacy-image-prepare-$(1)
@@ -53,10 +62,21 @@ define LegacyDevice/Build
legacy-image-prepare-$(1):
$$(call Image/Prepare/Profile,$(1))
+ ifndef IB
+ ifdef CONFIG_TARGET_PER_DEVICE_ROOTFS
+ ROOTFS/$(1) := $(foreach fs,$(TARGET_FILESYSTEMS), \
+ $(KDIR)/root.$(fs)$$(strip $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),+pkg=$$(ROOTFS_ID/$(1))))
+ )
+
+ $$(ROOTFS/$(1)): target-dir-$$(ROOTFS_ID/$(1))
+ legacy-images-make: $$(if $$(_PROFILE_SET),$$(ROOTFS/$(1)))
+ endif
+ endif
+
legacy-image-$(1):
$$(call Image/BuildKernel/Profile,$(1))
$(foreach fs,$(TARGET_FILESYSTEMS),
- $$(call Image/Build/Profile,$(1),$(fs))
+ $$(call Image/Build/Profile/Filesystem,$(1),$(fs),$$(ROOTFS_ID/$(1)))
)
endef