image.mk: add support for specifying the VID header offset for UBI
authorFelix Fietkau <nbd@nbd.name>
Wed, 20 Jul 2016 06:46:08 +0000 (08:46 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 20 Jul 2016 08:13:50 +0000 (10:13 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/image-commands.mk
include/image.mk

index 1128aeab6d8b1a0a40652fe170ed2f4d73373306..fc36509efd604f9f1ffebb9f45fc4a53eedc2d07 100644 (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
index b24ba1cca72100db84c477602afd8787dde77f53..3891787140d442083a6b49ba2f3c54931d6a9955 100644 (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