]> git.baikalelectronics.ru Git - arm-tf.git/commit
Fix build error when `BL32` is not defined
authorJuan Castillo <juan.castillo@arm.com>
Thu, 12 Nov 2015 10:59:26 +0000 (10:59 +0000)
committerJuan Castillo <juan.castillo@arm.com>
Tue, 17 Nov 2015 09:25:17 +0000 (09:25 +0000)
commit70d1fc5383b920652e1fe6d426183b7f874b3928
treeaedb416e6407fb5572ac90614a7d0bb825500189
parent4266228306de468dff34609581474f2f43d781fa
Fix build error when `BL32` is not defined

If an SPD wants to use a prebuilt binary as BL32 image (for example,
the OPTEE Dispatcher), it must point the `BL32` variable to the
image file. This dependency should apply only to the `fip` target.
However, it also applies to the `all` target at the moment. If the
user tries to build all individual TF images using `make all`
without setting BL32, the build fails. The following command will
throw the error:

    make CROSS_COMPILE=aarch64-linux-gnu- SPD=opteed all
    ...
    ...
    aarch64-linux-gnu-gcc: fatal error: no input files
    compilation terminated.
    make: *** [build/fvp/release/bl32/bl32.ld] Error 1

The reason is that the build system checks if BL32 is defined, and
if it is not, it will try to build BL32 from source. If the SPD
makefile does not provide support for that (as is the case of the
OPTEE Dispatcher, since OPTEE is provided as an external binary),
the build will fail.

This patch fixes the issue by checking if `BL32_SOURCES` has been
defined by the SPD before attempting to build BL32 from source.
If neither `BL32` nor `BL32_SOURCES` is defined when building the
FIP, a warning message will be printed and the process aborted.

Fixes ARM-software/tf-issues#333

Change-Id: I5e801ad333103ed9b042e5c4757424c8df2ff6e4
Makefile
make_helpers/tbbr/tbbr_tools.mk