JFFS2OPTS += $(MKFS_DEVTABLE_OPT)
-SQUASHFS_BLOCKSIZE := 256k
+SQUASHFS_BLOCKSIZE := $(CONFIG_TARGET_SQUASHFS_BLOCK_SIZE)k
SQUASHFSOPT := -b $(SQUASHFS_BLOCKSIZE)
SQUASHFSOPT += -p '/dev d 755 0 0' -p '/dev/console c 600 0 0 5 1'
SQUASHFSCOMP := gzip
endef
endif
+# $(1): board name
+# $(2): rootfs type
+# $(3): kernel image
+ifneq ($(CONFIG_NAND_SUPPORT),)
+ define Image/Build/SysupgradeNAND
+ mkdir -p "$(KDIR_TMP)/sysupgrade-$(1)/"
+ echo "BOARD=$(1)" > "$(KDIR_TMP)/sysupgrade-$(1)/CONTROL"
+ [ -z "$(2)" ] || $(CP) "$(KDIR)/root.$(2)" "$(KDIR_TMP)/sysupgrade-$(1)/root"
+ [ -z "$(3)" ] || $(CP) "$(3)" "$(KDIR_TMP)/sysupgrade-$(1)/kernel"
+ (cd "$(KDIR_TMP)"; $(TAR) cvf \
+ "$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(1))
+ endef
+# $(1) board name
+# $(2) ubinize-image options (e.g. --uboot-env and/or --kernel kernelimage)
+# $(3) rootfstype (e.g. squashfs or ubifs)
+# $(4) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS)))
+ define Image/Build/UbinizeImage
+ sh $(TOPDIR)/scripts/ubinize-image.sh $(2) \
+ "$(KDIR)/root.$(3)" \
+ "$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(3)-ubinized.bin" \
+ $(4)
+ endef
+
+endif
+
ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
define Image/mkfs/ubifs/generate
$(CP) ./ubinize$(1).cfg $(KDIR)