image.mk: add support for specifying the VID header offset for UBI

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2016-07-20 08:46:08 +02:00
parent cd243b1090
commit 9a50a213d2
2 changed files with 3 additions and 1 deletions

View File

@ -107,6 +107,7 @@ define Build/append-ubi
$@.tmp \
-p $(BLOCKSIZE) -m $(PAGESIZE) \
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
$(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \
$(UBINIZE_OPTS)
cat $@.tmp >> $@
rm $@.tmp

View File

@ -295,6 +295,7 @@ define Device/Init
BLOCKSIZE :=
PAGESIZE :=
SUBPAGESIZE :=
VID_HDR_OFFSET :=
UBINIZE_OPTS := -E 5
MKUBIFS_OPTS :=
@ -310,7 +311,7 @@ DEFAULT_DEVICE_VARS := \
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE \
DEVICE_DTS DEVICE_DTS_DIR \
UBOOTENV_IN_UBI KERNEL_IN_UBI \
BLOCKSIZE PAGESIZE SUBPAGESIZE \
BLOCKSIZE PAGESIZE SUBPAGESIZE VID_HDR_OFFSET \
UBINIZE_OPTS
define Device/ExportVar