[source] image.mk: add support for specifying the VID header offset for UBI
LEDE Commits
lede-commits at lists.infradead.org
Wed Jul 20 01:18:30 PDT 2016
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=9a50a213d225263985eef5a4ab7870ff2c0925cf
commit 9a50a213d225263985eef5a4ab7870ff2c0925cf
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 20 08:46:08 2016 +0200
image.mk: add support for specifying the VID header offset for UBI
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
include/image-commands.mk | 1 +
include/image.mk | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 1128aea..fc36509 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -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
diff --git a/include/image.mk b/include/image.mk
index b24ba1c..3891787 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -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
More information about the lede-commits
mailing list