All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhenhua Luo <zhenhua.luo@freescale.com>
To: <meta-freescale@yoctoproject.org>
Subject: [meta-fsl-arm][PATCH v4 4/6] rcw: add recipes for Layerscape1 support
Date: Thu, 4 Sep 2014 12:33:17 +0800	[thread overview]
Message-ID: <1409805199-684-4-git-send-email-zhenhua.luo@freescale.com> (raw)
In-Reply-To: <1409805199-684-1-git-send-email-zhenhua.luo@freescale.com>

The reset configuration word (RCW) manages the hardware configuration
info for QorIQ targets, rcw is used by the preboot loader to begin
system configuration.

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 ...ake-BOARDS-DESTDIR-overidable-in-Makefile.patch | 57 ++++++++++++++++++++++
 recipes-bsp/rcw/rcw_git.bb                         | 36 ++++++++++++++
 2 files changed, 93 insertions(+)
 create mode 100644 recipes-bsp/rcw/rcw/rcw-make-BOARDS-DESTDIR-overidable-in-Makefile.patch
 create mode 100644 recipes-bsp/rcw/rcw_git.bb

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
new file mode 100644
index 0000000..51f6eeb
--- /dev/null
+++ b/recipes-bsp/rcw/rcw/rcw-make-BOARDS-DESTDIR-overidable-in-Makefile.patch
@@ -0,0 +1,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 \
+ 	 t1040rdb t1042rdb t1042rdb_pi t1040qds t2080rdb t2080qds t2081qds t4240qds t4240rdb
+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
+
diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb
new file mode 100644
index 0000000..5849a7c
--- /dev/null
+++ b/recipes-bsp/rcw/rcw_git.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Reset Configuration Word"
+DESCRIPTION = "Reset Configuration Word - hardware boot-time parameters for the QorIQ targets"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e"
+
+DEPENDS += "u-boot-ls1-tools-native"
+
+inherit deploy
+
+SRCBRANCH = "LS1-SDK"
+SRCREV = "7b358441dfd35afbf01491649cc3f4396154a546"
+SRC_URI = "git://git.freescale.com/layerscape/ls1021a/rcw.git;branch=${SRCBRANCH} \
+    file://rcw-make-BOARDS-DESTDIR-overidable-in-Makefile.patch \
+"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "BOARDS=${@d.getVar('MACHINE', True).replace('-64b','')} DESTDIR=${D}/boot/rcw/"
+
+do_install () {
+    oe_runmake install 
+}
+
+do_deploy () {
+    install -d ${DEPLOYDIR}/rcw
+    cp -r ${D}/boot/rcw/* ${DEPLOYDIR}/rcw/
+}
+addtask deploy after do_install
+
+PACKAGES += "${PN}-image"
+FILES_${PN}-image += "/boot"
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(ls102xa)"
-- 
1.9.3



  parent reply	other threads:[~2014-09-04  4:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04  4:33 [meta-fsl-arm][PATCH v4 1/6] ls-base.inc: Add base configuration for Layerspace1 support Zhenhua Luo
2014-09-04  4:33 ` [meta-fsl-arm][PATCH v4 2/6] u-boot-ls1: Add recipe for Layerscape1 support Zhenhua Luo
2014-09-04  4:33 ` [meta-fsl-arm][PATCH v4 3/6] linux-ls1: Add kernel recipes " Zhenhua Luo
2014-09-04  4:33 ` Zhenhua Luo [this message]
2014-09-04  4:33 ` [meta-fsl-arm][PATCH v4 5/6] ls1021aqds.conf: Add machine conf for ls1021aqds Zhenhua Luo
2014-09-04  4:33 ` [meta-fsl-arm][PATCH v4 6/6] ls1021aqtwr.conf: Add machine conf for ls1021atwr Zhenhua Luo
2014-09-04 18:00 ` [meta-fsl-arm][PATCH v4 1/6] ls-base.inc: Add base configuration for Layerspace1 support Otavio Salvador
2014-09-05  1:58   ` zhenhua.luo
2014-09-05  2:00     ` Otavio Salvador
2014-09-10  3:08       ` zhenhua.luo
2014-09-10 14:33         ` zhenhua.luo
2014-09-05  2:39 ` John Weber
2014-09-05  3:10   ` zhenhua.luo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409805199-684-4-git-send-email-zhenhua.luo@freescale.com \
    --to=zhenhua.luo@freescale.com \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.