diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-07-19 12:35:27 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-07-20 10:13:50 +0200 |
commit | 4added669214e2b5e38d3c0cd580f870942e1cd9 (patch) | |
tree | c1034c4589e1fe59a8363b958c964aa26edfb90b /include/image-legacy.mk | |
parent | ebd0b2d0b10a36b35a245c6217f372d0fa886686 (diff) | |
download | mtk-20170518-4added669214e2b5e38d3c0cd580f870942e1cd9.zip mtk-20170518-4added669214e2b5e38d3c0cd580f870942e1cd9.tar.gz mtk-20170518-4added669214e2b5e38d3c0cd580f870942e1cd9.tar.bz2 |
build: split legacy image mkfs.ubifs command from the one used for the new image building code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/image-legacy.mk')
-rw-r--r-- | include/image-legacy.mk | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/image-legacy.mk b/include/image-legacy.mk index 3acf2b9..1b8a911 100644 --- a/include/image-legacy.mk +++ b/include/image-legacy.mk @@ -1,3 +1,44 @@ +ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),) + define Image/mkfs/ubifs/generate + $(CP) ./ubinize$(1).cfg $(KDIR) + ( cd $(KDIR); \ + $(STAGING_DIR_HOST)/bin/ubinize \ + $(if $($(PROFILE)_UBI_OPTS), \ + $(shell echo $($(PROFILE)_UBI_OPTS)), \ + $(shell echo $(UBI_OPTS)) \ + ) \ + -o $(KDIR)/root$(1).ubi \ + ubinize$(1).cfg \ + ) + endef + + define Image/mkfs/ubifs/legacy + + $(if $($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS), + $(STAGING_DIR_HOST)/bin/mkfs.ubifs \ + $(if $($(PROFILE)_UBIFS_OPTS), \ + $(shell echo $($(PROFILE)_UBIFS_OPTS)), \ + $(shell echo $(UBIFS_OPTS)) \ + ) \ + $(if $(CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP),--space-fixup) \ + $(if $(CONFIG_TARGET_UBIFS_COMPRESSION_NONE),--force-compr=none) \ + $(if $(CONFIG_TARGET_UBIFS_COMPRESSION_LZO),--force-compr=lzo) \ + $(if $(CONFIG_TARGET_UBIFS_COMPRESSION_ZLIB),--force-compr=zlib) \ + $(if $(shell echo $(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)),--jrn-size=$(CONFIG_TARGET_UBIFS_JOURNAL_SIZE)) \ + --squash-uids \ + -o $(KDIR)/root.ubifs \ + -d $(TARGET_DIR) + ) + $(call Image/Build,ubifs) + + $(if $($(PROFILE)_UBI_OPTS)$(UBI_OPTS), + $(if $(wildcard ./ubinize.cfg),$(call Image/mkfs/ubifs/generate,)) + $(if $(wildcard ./ubinize-overlay.cfg),$(call Image/mkfs/ubifs/generate,-overlay)) + ) + $(if $(wildcard ./ubinize.cfg),$(call Image/Build,ubi)) + endef +endif + LegacyDevice/Dump = $(Device/Dump) define LegacyDevice/Check |