1 CROSS_COMPILE := aarch64-linux-gnu-
2 output_dir := $(PWD)/../bin
3 makejobs := $(shell grep '^processor' /proc/cpuinfo | sort -u | wc -l)
4 makethreads := $(shell dc -e "$(makejobs) 1 + p")
5 make_options := GCC49_AARCH64_PREFIX=$CROSS_COMPILE \
6 -j$(makethreads) -l$(makejobs)
8 BL30_HIKEY := $(output_dir)/mcuimage.bin
9 BL33_HIKEY := $(output_dir)/u-boot-hikey.bin
13 @echo "**** Common Makefile ****"
15 @echo "make -f build-tf.mak build"
17 .PHONY: have-crosscompiler
19 @echo -n "Check that $(CROSS_COMPILE)gcc is available..."
20 @which $(CROSS_COMPILE)gcc > /dev/null ; \
21 if [ ! $$? -eq 0 ] ; then \
22 echo "ERROR: cross-compiler $(CROSS_COMPILE)gcc not in PATH=$$PATH!" ; \
29 build: have-crosscompiler FORCE
30 @echo "Build TF for Hikey..."
32 CROSS_COMPILE=$(CROSS_COMPILE) \
38 @echo "Copy resulting binaries..."
39 cp build/hikey/debug/bl1.bin $(output_dir)/bl1-hikey.bin
40 cp build/hikey/debug/fip.bin $(output_dir)/fip-hikey.bin