From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp6-g21.free.fr ([2a01:e0c:1:1599::15]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SUPBc-0003pv-Qx for barebox@lists.infradead.org; Tue, 15 May 2012 21:21:41 +0000 From: Robert Jarzmik Date: Tue, 15 May 2012 23:21:15 +0200 Message-Id: <1337116877-17657-4-git-send-email-robert.jarzmik@free.fr> In-Reply-To: <1337116877-17657-1-git-send-email-robert.jarzmik@free.fr> References: <1337116877-17657-1-git-send-email-robert.jarzmik@free.fr> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 3/5] arch/arm: mioa701 add IPL and DPS1 updater To: barebox@lists.infradead.org In order for barebox to be functional, the docg3 DPS1 has to protect barebox from writes, and have its embedded IPL coded to load barebox (as barebox is the SPL). Add a raw DPS1, which : - protects the area from block 6 to block 123 This is DPS1 + barebox + barebox-logo - encodes the 2048 bytes IPL Signed-off-by: Robert Jarzmik --- arch/arm/boards/mioa701/env/bin/dps1_unlock | 12 ++++++++++++ arch/arm/boards/mioa701/env/bin/dps1_update | 12 ++++++++++++ arch/arm/boards/mioa701/env/data/dps1.raw.gz | Bin 0 -> 1239 bytes 3 files changed, 24 insertions(+) create mode 100644 arch/arm/boards/mioa701/env/bin/dps1_unlock create mode 100644 arch/arm/boards/mioa701/env/bin/dps1_update create mode 100644 arch/arm/boards/mioa701/env/data/dps1.raw.gz diff --git a/arch/arm/boards/mioa701/env/bin/dps1_unlock b/arch/arm/boards/mioa701/env/bin/dps1_unlock new file mode 100644 index 0000000..2d7dab8 --- /dev/null +++ b/arch/arm/boards/mioa701/env/bin/dps1_unlock @@ -0,0 +1,12 @@ +#!/bin/sh +# +# Shell to unlock the DPS1 with "12345678" key. + +mw -b 0x105e 0x31 +mw -b 0x105e 0x32 +mw -b 0x105e 0x33 +mw -b 0x105e 0x34 +mw -b 0x105e 0x35 +mw -b 0x105e 0x36 +mw -b 0x105e 0x37 +mw -b 0x105e 0x38 diff --git a/arch/arm/boards/mioa701/env/bin/dps1_update b/arch/arm/boards/mioa701/env/bin/dps1_update new file mode 100644 index 0000000..a9d72da --- /dev/null +++ b/arch/arm/boards/mioa701/env/bin/dps1_update @@ -0,0 +1,12 @@ +#!/bin/sh + +# Page+OOB specific partitions +addpart /dev/mtdraw0 67584@202752(dps1) +uncompress /env/data/dps1.raw.gz /dps1.raw + +if [ -r /dps1.raw ]; then + dps1_unlock + erase /dev/mtdraw0.dps1 + cp -v /dps1.raw /dev/mtdraw0.dps1 + dps1_unlock +fi diff --git a/arch/arm/boards/mioa701/env/data/dps1.raw.gz b/arch/arm/boards/mioa701/env/data/dps1.raw.gz new file mode 100644 index 0000000000000000000000000000000000000000..93112bfca14762534de50443d4e0b4c9333d0936 GIT binary patch literal 1239 zcmV;|1StC-iwFqP5SLE?17vV>F)ngpcL42GPiS0482{ex+hmijd6T#{>2_^iLe#A$ zxW+Z6Aju=GQZ>@G4bnpnE9B5a)%fSolbPK_@lVlh=}D9w1SOz{5PIrCv#p3ot1VLF z!Q#Fh$3sGwC?XXD>u)yMHZ6%>JjwjvW9IwKH{YB2X6E;TG(->dKbU%G;Nih25w-ns z^~>nT{Z#`41B0N^2Ll5G1A|Rq{tpHQ23x`CgTX(6N{-)I`bK_NdPlab?DnG;Eq_n6 zoC+3HI}@^pam5O(;^dpkJ>Xg$r^1}J3X$;bl>_BtBqVdJn>e(x-3eFPoyN+0FwNhv z65@lE9|HvyXL-e3ApWV+8B>J`+-W0q#yA`LK|kc_A%N$cTGMgmQ_|qDdjE86jUrJ*Hqo;F`dF2=00K-Dsaf%ahaP$IuQ=X3J+@ zEMi@Ys)3lSRI4%0g?tKQtIrnHJT3b3?xMd7-_W_V1;QNh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