# SPDX-License-Identifier: GPL-2.0
#
# General architecture dependent options
#

#
# Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can
# override the default values in this file.
#
source "arch/$(SRCARCH)/Kconfig"

config ARCH_HAS_CTRLC
	bool

#
# Select this option if the architecture assumes DMA devices are coherent
# by default.
#
config ARCH_DMA_DEFAULT_COHERENT
	bool

config ARCH_HAS_ASAN_FIBER_API
	bool

config ARCH_LINUX_NAME
	string
	default "$(SRCARCH)"

config ARCH_MKIMAGE_NAME
	string
	default "invalid"

config HAVE_ARCH_BOARD_GENERIC_DT
	bool

menu "General architecture-dependent options"

config BOARD_GENERIC_DT
	depends on HAVE_ARCH_BOARD_GENERIC_DT
	bool "Build generic device tree 2nd stage image"
	default y
	help
	  This enables compilation of a generic image that can be started 2nd
	  stage from qemu, barebox, or other bootloaders. It picks up a device
	  tree passed by the Linux kernel's boot convention for the given
	  architecture and thus can be used anywhere that a Kernel image could be used.
	  The image will be called images/barebox-dt-2nd.img

config BOARD_GENERIC_FIT
	depends on BOARD_GENERIC_DT
	bool "Build generic device tree 2nd stage FIT image"
	help
	  This enables compilation of a generic FIT image that combines
	  barebox-dt-2nd.img as well as all enabled device trees.
	  This single image is the bootable from coreboot, barebox, or any other
	  bootloader capable of booting a Linux kernel out of FIT images.
	  The image will be called images/barebox-$(CONFIG_ARCH_LINUX_NAME).fit

	  The image can be built manually, even without enabling this option
	  by running make barebox.fit, which will create a barebox.fit symlink
	  pointing at the built image.

	  Note that this option requires python3 and its libfdt module to be
	  installed on the build host.

endmenu
