arm-trusted-firmware.inc: Add support for debug flag
If debug variable is set, debug flag will be passed to EXTRA_OEMAKE and
OUTPUT_DIR will be set to ${B}/${PLATFORM}/debug, as all the generated
binaries will be there instead of the 'release' directory
@@ -39,8 +39,10 @@ AS[unexport] = "1"
LD[unexport] = "1"
ATF_CONSOLE ?= "cadence"
+DEBUG ?= ""
+EXTRA_OEMAKE_append = " ZYNQMP_CONSOLE=${ATF_CONSOLE} ${@bb.utils.contains('DEBUG', '1', ' DEBUG=${DEBUG}', '', d)}"
+OUTPUT_DIR = "${@bb.utils.contains('DEBUG', '1', '${B}/${PLATFORM}/debug', '${B}/${PLATFORM}/release', d)}"
-EXTRA_OEMAKE += "ZYNQMP_CONSOLE=${ATF_CONSOLE}"
do_configure() {
oe_runmake clean -C ${S} BUILD_BASE=${B} PLAT=${PLATFORM}
@@ -54,8 +56,6 @@ do_install() {
:
}
-OUTPUT_DIR = "${B}/${PLATFORM}/release"
-
do_deploy() {
install -d ${DEPLOYDIR}
install -m 0644 ${OUTPUT_DIR}/bl31/bl31.elf ${DEPLOYDIR}/${ATF_BASE_NAME}.elf
