diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2015-10-14 10:46:36 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2015-10-14 10:46:36 +0200 |
commit | 13a3972585af60ec367d209cedbd3601e0c77467 (patch) | |
tree | 4b3312669b3e501f6bc10b39d8c7bbf516f07aac /board/hisilicon/hikey/build-tf.mak | |
parent | 208bd51396fb606dbdcf45b064e6b372d7dd3e81 (diff) | |
parent | 297faccca2235e359012118495b9b73451d54bb9 (diff) | |
download | u-boot-imx-13a3972585af60ec367d209cedbd3601e0c77467.zip u-boot-imx-13a3972585af60ec367d209cedbd3601e0c77467.tar.gz u-boot-imx-13a3972585af60ec367d209cedbd3601e0c77467.tar.bz2 |
Merge remote-tracking branch 'u-boot/master'
Diffstat (limited to 'board/hisilicon/hikey/build-tf.mak')
-rw-r--r-- | board/hisilicon/hikey/build-tf.mak | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/board/hisilicon/hikey/build-tf.mak b/board/hisilicon/hikey/build-tf.mak new file mode 100644 index 0000000..cebb34b --- /dev/null +++ b/board/hisilicon/hikey/build-tf.mak @@ -0,0 +1,42 @@ +CROSS_COMPILE := aarch64-linux-gnu- +output_dir := $(PWD)/../bin +makejobs := $(shell grep '^processor' /proc/cpuinfo | sort -u | wc -l) +makethreads := $(shell dc -e "$(makejobs) 1 + p") +make_options := GCC49_AARCH64_PREFIX=$CROSS_COMPILE \ + -j$(makethreads) -l$(makejobs) + +BL30_HIKEY := $(output_dir)/mcuimage.bin +BL33_HIKEY := $(output_dir)/u-boot-hikey.bin + +.PHONY: help +help: + @echo "**** Common Makefile ****" + @echo "example:" + @echo "make -f build-tf.mak build" + +.PHONY: have-crosscompiler +have-crosscompiler: + @echo -n "Check that $(CROSS_COMPILE)gcc is available..." + @which $(CROSS_COMPILE)gcc > /dev/null ; \ + if [ ! $$? -eq 0 ] ; then \ + echo "ERROR: cross-compiler $(CROSS_COMPILE)gcc not in PATH=$$PATH!" ; \ + echo "ABORTING." ; \ + exit 1 ; \ + else \ + echo "OK" ;\ + fi + +build: have-crosscompiler FORCE + @echo "Build TF for Hikey..." + rm -rf build/ + CROSS_COMPILE=$(CROSS_COMPILE) \ + make all fip \ + BL30=$(BL30_HIKEY) \ + BL33=$(BL33_HIKEY) \ + DEBUG=1 \ + PLAT=hikey + @echo "Copy resulting binaries..." + cp build/hikey/debug/bl1.bin $(output_dir)/bl1-hikey.bin + cp build/hikey/debug/fip.bin $(output_dir)/fip-hikey.bin + +FORCE: |