summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing Liu <ting.liu@freescale.com>2015-10-29 17:39:59 +0800
committerZhenhua Luo <zhenhua.luo@nxp.com>2015-12-28 11:01:07 +0800
commited5ecce3c50a13439dc86d4be1b46d79660030f9 (patch)
tree60a84d30d36e66b96cd35488e5dca74fc066c9ad
parent666b7775d7840bc4185a3c848fc5358bf84f0758 (diff)
downloadmeta-fsl-ppc-ed5ecce3c50a13439dc86d4be1b46d79660030f9.tar.gz
rcw: swap qspi binary in do_install_append
Signed-off-by: Ting Liu <ting.liu@freescale.com> Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
-rw-r--r--recipes-bsp/rcw/rcw/rcw-make-BOARDS-DESTDIR-overidable-in-Makefile.patch57
-rw-r--r--recipes-bsp/rcw/rcw_git.bb10
2 files changed, 7 insertions, 60 deletions
diff --git a/recipes-bsp/rcw/rcw/rcw-make-BOARDS-DESTDIR-overidable-in-Makefile.patch b/recipes-bsp/rcw/rcw/rcw-make-BOARDS-DESTDIR-overidable-in-Makefile.patch
deleted file mode 100644
index 49d99fc..0000000
--- a/recipes-bsp/rcw/rcw/rcw-make-BOARDS-DESTDIR-overidable-in-Makefile.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From f2e796c903b2a3f81dbd38da3dc087cb7539d307 Mon Sep 17 00:00:00 2001
2From: Zhenhua Luo <zhenhua.luo@freescale.com>
3Date: Wed, 3 Sep 2014 03:03:42 -0500
4Subject: [PATCH] Makefile: make BOARDS/DESTDIR overidable and add endian
5 switch
6
71. For one specific board, no need to build the rcw for all supported
8 targets, make BOARDS and DESTDIR overridable to achieve this.
92. Add the endian swap for qspiboot rcw
10
11Upstream-Status: Pending
12
13Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
14---
15 Makefile | 4 ++--
16 Makefile.inc | 9 +++++++--
17 2 files changed, 9 insertions(+), 4 deletions(-)
18
19diff --git a/Makefile b/Makefile
20index 6ec1697..0f94293 100644
21--- a/Makefile
22+++ b/Makefile
23@@ -1,5 +1,5 @@
24-DESTDIR = .
25-BOARDS = b4420qds b4860qds \
26+DESTDIR ?= .
27+BOARDS ?= b4420qds b4860qds \
28 ls1021aqds ls1021atwr \
29 p2041rdb p3041ds p4080ds p5020ds p5040ds \
30 t1024qds t1023rdb t1024rdb t1040rdb t1042rdb t1042rdb_pi t1040qds \
31diff --git a/Makefile.inc b/Makefile.inc
32index 4cadb2e..6e8b78f 100644
33--- a/Makefile.inc
34+++ b/Makefile.inc
35@@ -1,4 +1,4 @@
36-DESTDIR = .
37+DESTDIR ?= .
38 INSTALL = install
39 PYTHON ?= python2
40 RCW = $(PYTHON) ../rcw.py
41@@ -18,7 +18,12 @@ all: $(targets)
42 install: $(targets)
43 $(INSTALL) -d $(DESTDIR)
44 @for file in $^; do \
45- $(INSTALL) -m 644 -D $$file $(DESTDIR)/$$file; \
46+ case $$file in \
47+ *qspiboot*) file_swap="`echo $$file | sed -e 's/qspiboot/qspiboot_swap/'`"; \
48+ tclsh byte_swap.tcl $$file $$file_swap 8 ; \
49+ $(INSTALL) -m 644 -D $$file_swap $(DESTDIR)/$$file_swap ;; \
50+ *) $(INSTALL) -m 644 -D $$file $(DESTDIR)/$$file; \
51+ esac \
52 done
53 $(INSTALL) -m 644 -D README $(DESTDIR)
54
55--
561.7.9.7
57
diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb
index 57f305a..76bbf2a 100644
--- a/recipes-bsp/rcw/rcw_git.bb
+++ b/recipes-bsp/rcw/rcw_git.bb
@@ -9,9 +9,7 @@ inherit deploy
9 9
10SRCBRANCH = "master" 10SRCBRANCH = "master"
11SRCREV = "426f7a6535d93dac76f5125035e0938a85e778d2" 11SRCREV = "426f7a6535d93dac76f5125035e0938a85e778d2"
12SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git;branch=${SRCBRANCH} \ 12SRC_URI = "git://git.freescale.com/ppc/sdk/rcw.git;branch=${SRCBRANCH}"
13 file://rcw-make-BOARDS-DESTDIR-overidable-in-Makefile.patch \
14"
15 13
16S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
17 15
@@ -20,6 +18,12 @@ EXTRA_OEMAKE = "BOARDS=${@d.getVar('MACHINE', True).replace('-64b','')} DESTDIR=
20do_install () { 18do_install () {
21 oe_runmake install 19 oe_runmake install
22} 20}
21do_install_append_ls102xa () {
22 for f in `find ${D}/boot/rcw/ -name "*qspiboot*"`;do
23 f_swap=`echo $f |sed -e 's/qspiboot/qspiboot_swap/'`
24 tclsh ${STAGING_BINDIR_NATIVE}/byte_swap.tcl $f $f_swap 8
25 done
26}
23 27
24do_deploy () { 28do_deploy () {
25 install -d ${DEPLOYDIR}/rcw 29 install -d ${DEPLOYDIR}/rcw