blob: 49d99fc5a9e4e3b116450fe266f1b849a4e96894 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
From f2e796c903b2a3f81dbd38da3dc087cb7539d307 Mon Sep 17 00:00:00 2001
From: Zhenhua Luo <zhenhua.luo@freescale.com>
Date: Wed, 3 Sep 2014 03:03:42 -0500
Subject: [PATCH] Makefile: make BOARDS/DESTDIR overidable and add endian
switch
1. For one specific board, no need to build the rcw for all supported
targets, make BOARDS and DESTDIR overridable to achieve this.
2. Add the endian swap for qspiboot rcw
Upstream-Status: Pending
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
Makefile | 4 ++--
Makefile.inc | 9 +++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 6ec1697..0f94293 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-DESTDIR = .
-BOARDS = b4420qds b4860qds \
+DESTDIR ?= .
+BOARDS ?= b4420qds b4860qds \
ls1021aqds ls1021atwr \
p2041rdb p3041ds p4080ds p5020ds p5040ds \
t1024qds t1023rdb t1024rdb t1040rdb t1042rdb t1042rdb_pi t1040qds \
diff --git a/Makefile.inc b/Makefile.inc
index 4cadb2e..6e8b78f 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -1,4 +1,4 @@
-DESTDIR = .
+DESTDIR ?= .
INSTALL = install
PYTHON ?= python2
RCW = $(PYTHON) ../rcw.py
@@ -18,7 +18,12 @@ all: $(targets)
install: $(targets)
$(INSTALL) -d $(DESTDIR)
@for file in $^; do \
- $(INSTALL) -m 644 -D $$file $(DESTDIR)/$$file; \
+ case $$file in \
+ *qspiboot*) file_swap="`echo $$file | sed -e 's/qspiboot/qspiboot_swap/'`"; \
+ tclsh byte_swap.tcl $$file $$file_swap 8 ; \
+ $(INSTALL) -m 644 -D $$file_swap $(DESTDIR)/$$file_swap ;; \
+ *) $(INSTALL) -m 644 -D $$file $(DESTDIR)/$$file; \
+ esac \
done
$(INSTALL) -m 644 -D README $(DESTDIR)
--
1.7.9.7
|