if FREETZ_SHOW_ADVANCED

comment "Replace kernel (not available, no sources by AVM)"
	depends on ! FREETZ_REPLACE_KERNEL_AVAILABLE

if !FREETZ_REPLACE_KERNEL_EXPERIMENTAL
config FREETZ_REPLACE_KERNEL
	bool "Replace kernel"
	depends on FREETZ_REPLACE_KERNEL_AVAILABLE
	select FREETZ_REPLACE_KERNEL_IMPL
	help
		Replace AVM kernel with self-built kernel.

endif

if FREETZ_REPLACE_KERNEL_EXPERIMENTAL
config FREETZ_REPLACE_KERNEL
	bool "Replace kernel (EXPERIMENTAL, read help please)"
	depends on FREETZ_REPLACE_KERNEL_AVAILABLE
	select FREETZ_REPLACE_KERNEL_IMPL
	help
		Replace AVM kernel with self-built kernel.

		BIG FAT WARNING:
		  Replace kernel is EXPERIMENTAL and provided for testing
		  purposes only. Be prepared to recover your box if necessary.

		  In either case we would highly appreciate it if you could
		  provide us feedback as to if it works for you or not on either
		    - Freetz-Trac (http://freetz.org) or
		    - IP-Phone-Forum (http://www.ip-phone-forum.de/forumdisplay.php?f=525)

endif

config FREETZ_REPLACE_KERNEL_IMPL
	bool
	depends on FREETZ_REPLACE_KERNEL_AVAILABLE
	#
	# until http://freetz.org/ticket/1716 is fixed:
	select FREETZ_REMOVE_KIDS if \
		( \
			FREETZ_TYPE_2170 || \
			FREETZ_TYPE_3170 \
		)
	#
	select FREETZ_MODULE_fuse if \
		( \
			FREETZ_SYSTEM_TYPE_AR9 || \
			FREETZ_SYSTEM_TYPE_IKS || \
			FREETZ_SYSTEM_TYPE_UR8    \
		) && \
		! (FREETZ_REMOVE_NTFS && FREETZ_REMOVE_WEBDAV)
	# TODO:
	#  do we really need to do so? could Freetz kernel be used with AVM's jffs2.ko module?
	#  it looks like the only reason for doing so is jffs2.ko size, Freetz one is smaller.
	select FREETZ_MODULE_jffs2 if \
		FREETZ_AVM_VERSION_05_2X_MIN && \
		FREETZ_AVM_HAS_JFFS2_MODULE && !FREETZ_REMOVE_JFFS2
	#
	select FREETZ_MODULE_usbcore if \
		FREETZ_SYSTEM_TYPE_UR8 && FREETZ_AVM_SOURCE_7270_04_86
	#
	select FREETZ_MODULE_msdos if \
		! FREETZ_REMOVE_FAT && \
		( \
			FREETZ_AVM_SOURCE_7270_05_21 || \
			FREETZ_AVM_SOURCE_7270_05_51 || \
			FREETZ_AVM_SOURCE_7270_06_05    \
		)
	#
	select FREETZ_MODULE_vfat if \
		! FREETZ_REMOVE_FAT && \
		( \
			FREETZ_AVM_SOURCE_7270_05_21 || \
			FREETZ_AVM_SOURCE_7270_05_51 || \
			FREETZ_AVM_SOURCE_7270_06_05    \
		)
	default n

endif # FREETZ_SHOW_ADVANCED #
