image: allow devices to override the -E 5 ubinize option
authorFelix Fietkau <nbd@nbd.name>
Wed, 13 Jul 2016 15:23:00 +0000 (17:23 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 14 Jul 2016 08:27:30 +0000 (10:27 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/image-commands.mk
include/image.mk

index e8549d46f6bc4229a0fec249360a916ead291d5a..17ab46d859e38954350afb031eaab317e513b56b 100644 (file)
@@ -105,8 +105,9 @@ define Build/append-ubi
                $(if $(KERNEL_IN_UBI),--kernel $(word 1,$^)) \
                $(word 2,$^) \
                $@.tmp \
-               -p $(BLOCKSIZE) -m $(PAGESIZE) -E 5 \
-               $(if $(SUBPAGESIZE),-s $(SUBPAGESIZE))
+               -p $(BLOCKSIZE) -m $(PAGESIZE) \
+               $(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
+               $(UBINIZE_OPTS)
        cat $@.tmp >> $@
        rm $@.tmp
 endef
index a1e00df7161ac73770758c9076b56ef46057ca7d..bf5f0a6a20ff092a036889fc777c6fe4f95fd8f4 100644 (file)
@@ -327,6 +327,7 @@ define Device/Init
   BLOCKSIZE :=
   PAGESIZE :=
   SUBPAGESIZE :=
+  UBINIZE_OPTS := -E 5
 
   FILESYSTEMS := $(TARGET_FILESYSTEMS)
 endef
@@ -334,7 +335,8 @@ endef
 DEFAULT_DEVICE_VARS := \
   DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE \
   UBOOTENV_IN_UBI KERNEL_IN_UBI \
-  BLOCKSIZE PAGESIZE SUBPAGESIZE
+  BLOCKSIZE PAGESIZE SUBPAGESIZE \
+  UBINIZE_OPTS
 
 define Device/ExportVar
   $(1) : $(2):=$$($(2))