arm: Add Kconfig entry to select CONFIG_DTB_FILE
authorMichal Orzel <michal.orzel@arm.com>
Mon, 22 Mar 2021 08:17:15 +0000 (09:17 +0100)
committerJulien Grall <jgrall@amazon.com>
Thu, 1 Apr 2021 16:12:05 +0000 (17:12 +0100)
commit831f01021f99d2d08909b5c054dd87de30c4f5e1
treee35b3efe9b8acae96a77deda2b16921baa37a258
parentd66bf122c0ab79063a607d6cf68edf5e91d17d5e
arm: Add Kconfig entry to select CONFIG_DTB_FILE

Currently in order to link existing DTB into Xen image
we need to either specify option CONFIG_DTB_FILE on the
command line or manually add it into .config.
Add Kconfig entry: CONFIG_DTB_FILE
to be able to provide the path to DTB we want to embed
into Xen image. If no path provided - the dtb will not
be embedded.

Remove the line: AFLAGS-y += -DCONFIG_DTB_FILE=\"$(CONFIG_DTB_FILE)\"
as it is not needed since Kconfig will define it in a header
with all the other config options.

Move definition of _sdtb into dtb.S to prevent defining it
if there is no reference to it or if someone protects
_sdtb with #ifdef rather than with .ifnes. If the latter,
we will get a compiler error.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/Makefile
xen/arch/arm/arm32/head.S
xen/arch/arm/arm64/head.S
xen/arch/arm/dtb.S
xen/arch/arm/xen.lds.S
xen/common/Kconfig