@ -150,6 +150,9 @@ endif
i f d e f B L 2 _ S O U R C E S
i f d e f B L 2 _ S O U R C E S
NEED_BL2 := yes
NEED_BL2 := yes
i n c l u d e b l 2 / b l 2 . m k
i n c l u d e b l 2 / b l 2 . m k
# Using the ARM Trusted Firmware BL2 implies that a BL3-3 image also need to be supplied for the FIP.
# This flag can be overridden by the platform.
NEED_BL33 ?= yes
e n d i f
e n d i f
i f d e f B L 3 1 _ S O U R C E S
i f d e f B L 3 1 _ S O U R C E S
@ -168,9 +171,10 @@ ifneq (${SPD},none)
$( info Including ${ SPD_MAKE } )
$( info Including ${ SPD_MAKE } )
include ${ SPD_MAKE }
include ${ SPD_MAKE }
# If there's BL32 companion for the chosen SPD, and the SPD wants to build the
# If there's BL3-2 companion for the chosen SPD, and the SPD wants to build the
# BL2 from source, we expect that the SPD's Makefile would set NEED_BL32
# BL3-2 from source, we expect that the SPD's Makefile would set NEED_BL32
# variable to "yes"
# variable to "yes". In case the BL3-2 is a binary which needs to be included in
# fip, then the NEED_BL32 needs to be set and BL3-2 would need to point to the bin.
e n d i f
e n d i f
.PHONY : all msg_start clean realclean distclean cscope locate -checkpatch checkcodebase checkpatch fiptool fip
.PHONY : all msg_start clean realclean distclean cscope locate -checkpatch checkcodebase checkpatch fiptool fip
@ -438,39 +442,53 @@ $(eval $(call MAKE_BL,1))
e n d i f
e n d i f
i f e q ( $ { N E E D _ B L 2 } , y e s )
i f e q ( $ { N E E D _ B L 2 } , y e s )
$( eval $ ( call MAKE_BL ,2,in_fip ) )
$( if $ {BL 2}, $ ( eval FIP_DEPS += $ {BL 2}) $ ( eval FIP_ARGS += --bl 2 $ {BL 2}) ,\
$( eval $( call MAKE_BL,2,in_fip) ) )
e n d i f
e n d i f
i f e q ( $ { N E E D _ B L 3 1 } , y e s )
i f e q ( $ { N E E D _ B L 3 1 } , y e s )
BL31_SOURCES += ${ SPD_SOURCES }
BL31_SOURCES += ${ SPD_SOURCES }
$( eval $ ( call MAKE_BL ,31,in_fip ) )
$( if $ {BL 31}, $ ( eval FIP_DEPS += $ {BL 31}) $ ( eval FIP_ARGS += --bl 31 $ {BL 31}) ,\
$( eval $( call MAKE_BL,31,in_fip) ) )
e n d i f
e n d i f
i f e q ( $ { N E E D _ B L 3 2 } , y e s )
i f e q ( $ { N E E D _ B L 3 2 } , y e s )
$( eval $ ( call MAKE_BL ,32,in_fip ) )
$( if $ {BL 32}, $ ( eval FIP_DEPS += $ {BL 32}) $ ( eval FIP_ARGS += --bl 32 $ {BL 32}) ,\
$( eval $( call MAKE_BL,32,in_fip) ) )
e n d i f
e n d i f
i f e q ( $ { N E E D _ B L 3 0 } , y e s )
i f e q ( $ { N E E D _ B L 3 0 } , y e s )
FIP_DEPS += ${ BL30 }
$( if $ {BL 30}, $ ( eval FIP_DEPS += $ {BL 30}) $ ( eval FIP_ARGS += --bl 30 $ {BL 30}) , )
FIP_ARGS += --bl30 ${ BL30 }
e n d i f
i f e q ( $ { N E E D _ B L 3 0 } , y e s )
# If BL3-0 is needed by the platform then 'BL30' variable must be defined.
# If BL3-0 is needed by the platform then 'BL30' variable must be defined.
check_bl30 :
check_bl30 :
$( if ${ BL30 } ,,$( error " To build a FIP for platform ${ PLAT } , please set BL30 to point to the SCP firmware " ) )
$( if ${ BL30 } ,,$( error " To build a FIP for platform ${ PLAT } , please set BL30 to point to the SCP firmware " ) )
e l s e
e l s e
# If BL3-0 is not needed by the platform but the user still specified the path
# If BL3-0 is not needed by the platform but the user still specified the path
# to a BL3-0 image then warn him that it will be ignored.
# to a BL3-0 image then warn him that it will be ignored.
check_bl30 :
check_bl30 :
$( if ${ BL30 } ,$( warning " BL3-0 is not supported on platform ${ PLAT } , it will just be ignored " ) ,)
$( if ${ BL30 } ,$( warning " BL3-0 is not supported on platform ${ PLAT } , it will just be ignored " ) ,)
e n d i f
e n d i f
${BUILD_PLAT}/fip.bin : ${FIP_DEPS } ${BL 33} ${FIPTOOL } check_bl 30
i f e q ( $ { N E E D _ B L 3 3 } , y e s )
$( if $ {BL 33}, $ ( eval FIP_DEPS += $ {BL 33}) $ ( eval FIP_ARGS += --bl 33 $ {BL 33}) , )
# If BL3-3 is needed by the platform then 'BL33' variable must be defined.
check_bl33 :
$( if ${ BL33 } ,,$( error "To build a FIP, please set BL33 to point to the Normal World binary, eg: BL33=../uefi/FVP_AARCH64_EFI.fd" ) )
$( if ${ BL33 } ,,$( error "To build a FIP, please set BL33 to point to the Normal World binary, eg: BL33=../uefi/FVP_AARCH64_EFI.fd" ) )
e l s e
# If BL3-3 is not needed by the platform but the user still specified the path
# to a BL3-3 image then warn him that it will be ignored.
check_bl33 :
$( if ${ BL33 } ,$( warning " BL3-3 is not supported on platform ${ PLAT } , it will just be ignored " ) ,)
e n d i f
${BUILD_PLAT}/fip.bin : ${FIP_DEPS } ${FIPTOOL } check_bl 30 check_bl 33
${ Q } ${ FIPTOOL } --dump \
${ Q } ${ FIPTOOL } --dump \
${ FIP_ARGS } \
${ FIP_ARGS } \
--bl33 ${ BL33 } \
$@
$@
@echo
@echo
@echo " Built $@ successfully "
@echo " Built $@ successfully "