-
Juan Castillo authored
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
70d1fc53