diff mbox

[v4,9/9] hikey: Add hikey-u-boot.mak

Message ID 1438278925-3038-10-git-send-email-peter.griffin@linaro.org
State New
Headers show

Commit Message

Peter Griffin July 30, 2015, 5:55 p.m. UTC
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 hikey-u-boot.mak | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 hikey-u-boot.mak

Comments

Peter Griffin July 30, 2015, 8:14 p.m. UTC | #1
Pleas ignore this last patch. I didn't mean to send it as part of the v4
series.

regards,

Peter.

On 30 July 2015 at 18:55, Peter Griffin <peter.griffin@linaro.org> wrote:

> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> ---
>  hikey-u-boot.mak | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>  create mode 100644 hikey-u-boot.mak
>
> diff --git a/hikey-u-boot.mak b/hikey-u-boot.mak
> new file mode 100644
> index 0000000..f4cd547
> --- /dev/null
> +++ b/hikey-u-boot.mak
> @@ -0,0 +1,33 @@
> +CROSS_COMPILE  := aarch64-linux-gnu-
> +build_dir       := $(CURDIR)/build-hikey
> +output_dir     := $(HOME)/aarch64
> +
> +.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
> +       rm -rf $(build_dir)
> +       @mkdir -p $(build_dir)
> +       $(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE) distclean
> +       $(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE) hikey_config
> +       $(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE)
> +       cp $(build_dir)/u-boot.bin $(output_dir)/u-boot-hikey.bin
> +       cp $(build_dir)/u-boot.bin /tftpboot/u-boot-hikey.bin
> +
> +menuconfig:
> +       $(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE) menuconfig
> +
> +clean:
> +       $(MAKE) O=$(build_dir) clean
> +       rm -rf $(build_dir)
> +
> +FORCE:
> --
> 1.9.1
>
>
diff mbox

Patch

diff --git a/hikey-u-boot.mak b/hikey-u-boot.mak
new file mode 100644
index 0000000..f4cd547
--- /dev/null
+++ b/hikey-u-boot.mak
@@ -0,0 +1,33 @@ 
+CROSS_COMPILE	:= aarch64-linux-gnu-
+build_dir       := $(CURDIR)/build-hikey
+output_dir	:= $(HOME)/aarch64
+
+.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
+	rm -rf $(build_dir)
+	@mkdir -p $(build_dir)
+	$(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE) distclean
+	$(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE) hikey_config
+	$(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE)
+	cp $(build_dir)/u-boot.bin $(output_dir)/u-boot-hikey.bin
+	cp $(build_dir)/u-boot.bin /tftpboot/u-boot-hikey.bin
+
+menuconfig:
+	$(MAKE) O=$(build_dir) CROSS_COMPILE=$(CROSS_COMPILE) menuconfig
+
+clean:
+	$(MAKE) O=$(build_dir) clean
+	rm -rf $(build_dir)
+
+FORCE: