diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-07-22 14:27:52 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-07-29 10:18:26 +0200 |
commit | 76341cfc5f71fb3658535bc21b001399a84f8816 (patch) | |
tree | 6a81a709722d786717a4ebc2b2fd12e639187df8 /include/image-legacy.mk | |
parent | c0dceae4bbb3aab0c4fcaf229925e8916d286797 (diff) | |
download | master-31e0f0ae-76341cfc5f71fb3658535bc21b001399a84f8816.tar.gz master-31e0f0ae-76341cfc5f71fb3658535bc21b001399a84f8816.tar.bz2 master-31e0f0ae-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.mk | 22 |
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 |