###
### Packaging/SquashFS properties
###

# SquashFS version used by AVM
config FREETZ_AVM_SQUASHFS_VERSION
	int
	default 2 if FREETZ_KERNEL_VERSION_2_6_13
	default 3 if FREETZ_KERNEL_VERSION_2_6_19_MIN && FREETZ_KERNEL_VERSION_2_6_32_MAX
	default 4 if FREETZ_KERNEL_VERSION_2_6_39_MIN

# SquashFS version used by the modified firmware
# Note: this might deviate from that used by AVM (patched/replaced kernel required)
config FREETZ_SQUASHFS_VERSION
	int
	default 3 if FREETZ_KERNEL_VERSION_2_6_13 && FREETZ_REPLACE_KERNEL
	default FREETZ_AVM_SQUASHFS_VERSION

config FREETZ_AVM_SQUASHFS_ENDIANNESS
	string
	default "le" if FREETZ_TARGET_ARCH_LE
	default "be" if FREETZ_TARGET_ARCH_BE

config FREETZ_AVM_SQUASHFS_COMPRESSION
	string
	default "lzma" if FREETZ_KERNEL_VERSION_2_6_28_MAX
	default "lzma" if FREETZ_KERNEL_VERSION_2_6_32 && !FREETZ_AVM_HAS_SEPARATE_FILESYSTEM_IMAGE
	default "gzip" if FREETZ_KERNEL_VERSION_2_6_32 &&  FREETZ_AVM_HAS_SEPARATE_FILESYSTEM_IMAGE
	default "xz"   if FREETZ_KERNEL_VERSION_2_6_39_MIN

config FREETZ_AVM_HAS_NMI_VECTOR
	bool
	default y
	depends on \
		FREETZ_SYSTEM_TYPE_AR934x    || \
		FREETZ_SYSTEM_TYPE_IKS_VX180 || \
		(FREETZ_SYSTEM_TYPE_QCA955x && FREETZ_TYPE_1750) || \
		FREETZ_SYSTEM_TYPE_QCA956x

# A sub-directory within the .image tarball containing the files like: kernel.image, filesystem.image, plugins.update, etc.
config FREETZ_AVM_IMAGES_SUBDIR
	string
	default "var/tmp"                 if FREETZ_TARGET_ARCH_ARM || FREETZ_TARGET_ARCH_MIPS
	default "var/remote/var/tmp/x86"  if FREETZ_TARGET_ARCH_X86

# kernel and filesystem reside in different mtd partitions
# = both kernel.image and filesystem.image have non-zero size
# = sometimes referred to as NAND box
config FREETZ_AVM_HAS_SEPARATE_FILESYSTEM_IMAGE
	bool
	default y
	depends on \
		FREETZ_SYSTEM_TYPE_AR10      || \
		FREETZ_SYSTEM_TYPE_GRX5      || \
		FREETZ_SYSTEM_TYPE_IKS_VX185 || \
		(FREETZ_SYSTEM_TYPE_IPQ40xx  && !FREETZ_TYPE_4040) || \
		FREETZ_SYSTEM_TYPE_PUMA6     || \
		(FREETZ_SYSTEM_TYPE_QCA955x  && !FREETZ_TYPE_1750) || \
		(FREETZ_SYSTEM_TYPE_VR9      && !FREETZ_TYPE_7360)

# root-filesystem is wrapped within/by other filesystem, i.e. filesystem.image (whatever filesystem it uses) contains a file named filesystem_core.squashfs
config FREETZ_AVM_HAS_INNER_OUTER_FILESYSTEM
	bool
	default y
	depends on FREETZ_AVM_HAS_SEPARATE_FILESYSTEM_IMAGE
	depends on \
		FREETZ_SYSTEM_TYPE_AR10      || \
		FREETZ_SYSTEM_TYPE_IKS_VX185 || \
		FREETZ_SYSTEM_TYPE_QCA955x   || \
		FREETZ_SYSTEM_TYPE_VR9

#config FREETZ_AVM_INNER_FILESYSTEM_TYPE
#	depends on FREETZ_AVM_HAS_INNER_OUTER_FILESYSTEM
#	string
#	default "SquashFS"

config FREETZ_AVM_OUTER_FILESYSTEM_TYPE
	depends on FREETZ_AVM_HAS_INNER_OUTER_FILESYSTEM
	string
	default "Ext2FS"    if FREETZ_AVM_VERSION_06_5X_MIN && FREETZ_KERNEL_VERSION_3_10
	default "SquashFS"
