# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

config ADKVERSION
	string
	option env="ADKVERSION"

config MODULES
	bool
	default y

config ADK_HAVE_DOT_CONFIG
	bool
	default y

mainmenu "OpenADK Configuration"

config ADK_CHOOSE_TARGET_SYSTEM
	boolean
	default y if ADK_CHOOSE_TARGET_SYSTEM_ARM
	default y if ADK_CHOOSE_TARGET_SYSTEM_M68K
	default y if ADK_CHOOSE_TARGET_SYSTEM_MICROBLAZE
	default y if ADK_CHOOSE_TARGET_SYSTEM_MIPS
	default y if ADK_CHOOSE_TARGET_SYSTEM_PPC
	default y if ADK_CHOOSE_TARGET_SYSTEM_PPC64
	default y if ADK_CHOOSE_TARGET_SYSTEM_SPARC
	default y if ADK_CHOOSE_TARGET_SYSTEM_SPARC64
	default y if ADK_CHOOSE_TARGET_SYSTEM_SH
	default y if ADK_CHOOSE_TARGET_SYSTEM_X86
	default y if ADK_CHOOSE_TARGET_SYSTEM_X86_64
	default n

source "target/config/Config.in"

menu "Runtime configuration"
depends on !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_KERNEL && !ADK_CHOOSE_TARGET_SYSTEM
source "target/config/Config.in.runtime"
endmenu

menu "Package collection"
depends on !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_KERNEL && !ADK_CHOOSE_TARGET_SYSTEM
source "target/packages/Config.in"
endmenu

menu "Package selection"
depends on !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_KERNEL && !ADK_CHOOSE_TARGET_SYSTEM

config ADK_LEAVE_ETC_ALONE
	boolean "do not install anything into /etc"
	default n
	help
	  Enabling this option will prevent the ADK from installing anything
	  into /etc. This is useful for highly customised setups with custom
	  base-files packages.

	  Package Makefiles can override this setting by passing "force_etc" to
	  the package-template.  to a non-empty value. This is useful for
	  packages traditionally installing non-config stuff into /etc, like
	  e.g. ca-certificates.

	  Note that without further customisation, turning this option
	  on will almost certainly render the resulting system unusable.

config ADK_INSTALL_PACKAGE_INIT_SCRIPTS
	boolean "ship custom init-scripts along with packages"
	default y
	depends on !ADK_LEAVE_ETC_ALONE
	help
	  Turning this option to false will prevent the ADK from
	  installing init-scripts (i.e. files in /etc/init.d) for
	  certain daemons and daemon-like applications.

	  Note that without further customisation, turning this option
	  off will almost certainly render the resulting system unusable.

config ADK_INSTALL_PACKAGE_NETWORK_SCRIPTS
	boolean "ship custom network-scripts along with packages"
	default y
	depends on !ADK_LEAVE_ETC_ALONE
	help
	  Turning this option to false will prevent the ADK from
	  installing network-scripts (i.e. files in /etc/network/) for
	  packages providing any.

	  Note that without further customisation, turning this option
	  off will almost certainly render the resulting system unusable.

source "package/Config.in.auto.global"
source "package/Config.in.auto"
endmenu

config ADK_USE_KERNEL_MINICONFIG
	boolean

choice
prompt "Kernel Version"
depends on ADK_TOOLCHAIN_ONLY

config ADK_KERNEL_VERSION_TOOLCHAIN
	prompt "3.12.13"
	boolean
	depends on ADK_TOOLCHAIN_ONLY

endchoice

menu "Kernel configuration"
depends on !ADK_TOOLCHAIN_ONLY && !ADK_CHOOSE_TARGET_ARCH && !ADK_CHOOSE_TARGET_KERNEL && !ADK_CHOOSE_TARGET_SYSTEM && ADK_TARGET_KERNEL_CUSTOMISING

choice
prompt "Kernel Version"

config ADK_KERNEL_VERSION_3_13_5
	prompt "3.13.5"
	boolean

config ADK_KERNEL_VERSION_3_12_13
	prompt "3.12.13"
	boolean

config ADK_KERNEL_VERSION_3_11_10
	prompt "3.11.10"
	boolean

config ADK_KERNEL_VERSION_3_4_82
	prompt "3.4.82"
	boolean

endchoice

config ADK_KERNEL_VERSION
	string
	default "3.13.5" if ADK_KERNEL_VERSION_3_13_5
	default "3.12.13" if ADK_KERNEL_VERSION_3_12_13
	default "3.11.10" if ADK_KERNEL_VERSION_3_11_10
	default "3.4.82" if ADK_KERNEL_VERSION_3_4_82
	help

config ADK_KERNEL_COMP_GZIP_RASPBERRY_PI
	depends on ADK_TARGET_SYSTEM_RASPBERRY_PI
        boolean
        select ADK_KERNEL_RD_GZIP
        select ADK_KERNEL_KERNEL_GZIP
        select ADK_KERNEL_INITRAMFS_COMPRESSION_GZIP
	default y

choice
prompt "Kernel Compression"
depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
config ADK_KERNEL_COMP_XZ
	prompt "use XZ compression"
	boolean
	select ADK_KERNEL_RD_XZ
	select ADK_KERNEL_KERNEL_XZ
	select ADK_KERNEL_INITRAMFS_COMPRESSION_XZ
	depends on !ADK_LINUX_MIPS

config ADK_KERNEL_COMP_LZMA
	prompt "use LZMA compression"
	boolean
	select ADK_KERNEL_RD_LZMA
	select ADK_KERNEL_KERNEL_LZMA
	select ADK_KERNEL_INITRAMFS_COMPRESSION_LZMA

config ADK_KERNEL_COMP_LZO
	prompt "use LZO compression"
	boolean
	select ADK_KERNEL_RD_LZO
	select ADK_KERNEL_KERNEL_LZO
	select ADK_KERNEL_INITRAMFS_COMPRESSION_LZO

config ADK_KERNEL_COMP_GZIP
	prompt "use GZIP compression"
	boolean
	select ADK_KERNEL_RD_GZIP
	select ADK_KERNEL_KERNEL_GZIP
	select ADK_KERNEL_INITRAMFS_COMPRESSION_GZIP

config ADK_KERNEL_COMP_BZIP2
	prompt "use BZIP2 compression"
	boolean
	select ADK_KERNEL_RD_BZIP2
	select ADK_KERNEL_KERNEL_BZIP2
	select ADK_KERNEL_INITRAMFS_COMPRESSION_BZIP2

endchoice

config ADK_COMPRESSION_TOOL
	string
	default "gzip -n9" if ADK_KERNEL_INITRAMFS_COMPRESSION_GZIP
	default "bzip2" if ADK_KERNEL_INITRAMFS_COMPRESSION_BZIP2
	default "xz --check=crc32" if ADK_KERNEL_INITRAMFS_COMPRESSION_XZ
	default "lzma -9" if ADK_KERNEL_INITRAMFS_COMPRESSION_LZMA
	default "lzop" if ADK_KERNEL_INITRAMFS_COMPRESSION_LZO
	default "gzip -n9"
	help

source "target/linux/Config.in"
endmenu

source "target/config/Config.in.adk"
source "toolchain/Config.in"
