From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 24 Sep 2015 17:09:59 -0400 Subject: [U-Boot] [PATCH v2 2/8] ARM: hikey: Add ATF makefile referenced by README In-Reply-To: <1441918518-25629-3-git-send-email-peter.griffin@linaro.org> References: <1441918518-25629-1-git-send-email-peter.griffin@linaro.org> <1441918518-25629-3-git-send-email-peter.griffin@linaro.org> Message-ID: <20150924210959.GU26600@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Sep 10, 2015 at 09:55:12PM +0100, Peter Griffin wrote: > Rather than relying on an external URL in the README > include the Makefile in the hikey directory. > > Signed-off-by: Peter Griffin > --- > board/hisilicon/hikey/build-tf.mak | 42 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 42 insertions(+) > create mode 100644 board/hisilicon/hikey/build-tf.mak > > 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: For the record, I'm not super happy about including makefiles/scripts for other projects. This seems complex enough that we need to handle the case for now at least, so, yeah, OK, we'll do it like this for now. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: