* [PATCH 0/5] arch/arm: mioa701 linux booting
@ 2012-05-15 21:21 Robert Jarzmik
2012-05-15 21:21 ` [PATCH 1/5] arm/board: mioa701 align kernel options with kernel mtd Robert Jarzmik
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Robert Jarzmik @ 2012-05-15 21:21 UTC (permalink / raw)
To: barebox
This patch serie makes linux autobooting and barebox flashing
and reflashing much more automated.
This serie serves as the first fully working barebox setup,
fully replacing the existing legacy boot code on the mioa701.
--
Robert
Robert Jarzmik (5):
arm/board: mioa701 align kernel options with kernel mtd
arch/arm: mioa701 make autoboot of Linux work
arch/arm: mioa701 add IPL and DPS1 updater
arch/arm: mioa701 use maximum CPU frequency
arch/arm: mioa701 improve barebox_update script
arch/arm/boards/mioa701/board.c | 13 +++++++++++--
arch/arm/boards/mioa701/env/bin/barebox_update | 5 +++++
arch/arm/boards/mioa701/env/bin/dps1_unlock | 12 ++++++++++++
arch/arm/boards/mioa701/env/bin/dps1_update | 12 ++++++++++++
arch/arm/boards/mioa701/env/bin/init | 19 ++++++++++++-------
arch/arm/boards/mioa701/env/data/dps1.raw.gz | Bin 0 -> 1239 bytes
6 files changed, 52 insertions(+), 9 deletions(-)
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
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] arm/board: mioa701 align kernel options with kernel mtd
2012-05-15 21:21 [PATCH 0/5] arch/arm: mioa701 linux booting Robert Jarzmik
@ 2012-05-15 21:21 ` Robert Jarzmik
2012-05-15 21:21 ` [PATCH 2/5] arch/arm: mioa701 make autoboot of Linux work Robert Jarzmik
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Robert Jarzmik @ 2012-05-15 21:21 UTC (permalink / raw)
To: barebox
Recent evolutions of linux kernel's drivers for docg3 chip,
ie. it's renaming for mtdparts option, is handled by this
patch.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
arch/arm/boards/mioa701/env/bin/init | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boards/mioa701/env/bin/init b/arch/arm/boards/mioa701/env/bin/init
index 8a54da0..2e806b9 100644
--- a/arch/arm/boards/mioa701/env/bin/init
+++ b/arch/arm/boards/mioa701/env/bin/init
@@ -31,5 +31,5 @@ if [ $? != 0 ]; then
fi
echo "Booting linux kernel on docg3 chip ..."
-bootargs="$bootargs mtdparts=mtd0:$mtdparts root=/dev/mtd4"
+bootargs="$bootargs mtdparts=docg3.0:$mtdparts ubi.mtd=4 rootfstype=ubifs root=ubi0:linux_root ro"
bootm /dev/mtd0.kernel
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/5] arch/arm: mioa701 make autoboot of Linux work
2012-05-15 21:21 [PATCH 0/5] arch/arm: mioa701 linux booting Robert Jarzmik
2012-05-15 21:21 ` [PATCH 1/5] arm/board: mioa701 align kernel options with kernel mtd Robert Jarzmik
@ 2012-05-15 21:21 ` Robert Jarzmik
2012-05-15 21:21 ` [PATCH 3/5] arch/arm: mioa701 add IPL and DPS1 updater Robert Jarzmik
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Robert Jarzmik @ 2012-05-15 21:21 UTC (permalink / raw)
To: barebox
Make the autoboot work :
- if no USB cuable is plugged, continue directly to
autoboot
- if an USB cable is plugged, wait for 3 seconds for
any input on the USB serial gadget, and if none
happens, continue to autoboot linux kernel
- else interrupt autoboot and interact on barebox
console
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
arch/arm/boards/mioa701/env/bin/init | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boards/mioa701/env/bin/init b/arch/arm/boards/mioa701/env/bin/init
index 2e806b9..494d067 100644
--- a/arch/arm/boards/mioa701/env/bin/init
+++ b/arch/arm/boards/mioa701/env/bin/init
@@ -22,12 +22,17 @@ if [ $? = 0 ]; then
fi
echo "No custom environment found"
-echo -n "Hit any key to stop autoboot: "
-timeout -a $autoboot_timeout
-if [ $? != 0 ]; then
- echo
- echo "Welcome to barebox console"
- exit
+
+gpio_get_value 22
+is_usb_connected=$?
+if [ $is_usb_connected != 0 ]; then
+ echo -n "Hit any key to stop autoboot: "
+ timeout -a $autoboot_timeout
+ if [ $? != 0 ]; then
+ echo
+ echo "Welcome to barebox console"
+ exit
+ fi
fi
echo "Booting linux kernel on docg3 chip ..."
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/5] arch/arm: mioa701 add IPL and DPS1 updater
2012-05-15 21:21 [PATCH 0/5] arch/arm: mioa701 linux booting Robert Jarzmik
2012-05-15 21:21 ` [PATCH 1/5] arm/board: mioa701 align kernel options with kernel mtd Robert Jarzmik
2012-05-15 21:21 ` [PATCH 2/5] arch/arm: mioa701 make autoboot of Linux work Robert Jarzmik
@ 2012-05-15 21:21 ` Robert Jarzmik
2012-05-15 21:21 ` [PATCH 4/5] arch/arm: mioa701 use maximum CPU frequency Robert Jarzmik
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Robert Jarzmik @ 2012-05-15 21:21 UTC (permalink / raw)
To: barebox
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 <robert.jarzmik@free.fr>
---
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)%f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;h{w|97<|GzI*j;htpzo{?q}f7
z#zgH7X#a@27JqczpM<}PJton&(YM{a3h6V2o$kW-@y-{9r^}3;R6%-L*Y62|{QLI_
z8D=xML#JwaBJPZexTk8l8F&WX0v`qc3gQ#sjv`+#{0aC;_~Y<X@W<c}!XJhI2z;Hx
zg>NHY_uaw|z*2~@V#4o&S#Hj^5y$&-((64d`CU1=a1Yu<PTK49<CtFp=iQf+T-&{8
zYhya6m$=dAy}9fCx_+H!1r=mPxv;Y+ZI+dUT(j=xwK#@7viq%yh~nL_tom1TbzO3j
z@XaImj;HsT#G3X@OFKDJyTfB%p;lA9t}sm3uy$u%J469a_4_c@^}*Xu{`nEQfnWpS
zmGZvZD8j94jTbItKk2SkhgaWy-Fe?ihw_LK-Vc2%Qzy<@)SmI^@-|}q)D8ZkM+W}~
zSmz=;Qjfm*lhFsG54HPX^ub^Qj6N8BF#2Gy6^uR@eK7i9uobTB!{4r^9LIn$0011R
Bg!KRb
literal 0
HcmV?d00001
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/5] arch/arm: mioa701 use maximum CPU frequency
2012-05-15 21:21 [PATCH 0/5] arch/arm: mioa701 linux booting Robert Jarzmik
` (2 preceding siblings ...)
2012-05-15 21:21 ` [PATCH 3/5] arch/arm: mioa701 add IPL and DPS1 updater Robert Jarzmik
@ 2012-05-15 21:21 ` Robert Jarzmik
2012-05-15 21:21 ` [PATCH 5/5] arch/arm: mioa701 improve barebox_update script Robert Jarzmik
2012-05-16 17:22 ` [PATCH 0/5] arch/arm: mioa701 linux booting Sascha Hauer
5 siblings, 0 replies; 7+ messages in thread
From: Robert Jarzmik @ 2012-05-15 21:21 UTC (permalink / raw)
To: barebox
To speed-up linux kernel loading, switch the PXA cpu to the
maximum allowed frequency (520 MHz). This improves the load
time from several seconds to less than a second from the
MTD.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
arch/arm/boards/mioa701/board.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/mioa701/board.c b/arch/arm/boards/mioa701/board.c
index 14c8110..ab5a493 100644
--- a/arch/arm/boards/mioa701/board.c
+++ b/arch/arm/boards/mioa701/board.c
@@ -261,8 +261,17 @@ static int mioa701_coredevice_init(void)
/* route pins */
pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
- CCCR = CCCR_A | 0x20110;
- cclk = 0x02;
+ /*
+ * Put the board in superspeed (520 MHz) to speed-up logo/OS loading.
+ * This requires to command the Maxim 1586 to upgrade core voltage to
+ * 1.475 V, on the power I2C bus (device 0x14).
+ */
+ CCCR = CCCR_A | 0x20290;
+ PCFR = PCFR_GPR_EN | PCFR_FVC | PCFR_DC_EN | PCFR_PI2C_EN | PCFR_OPDE;
+ PCMD(0) = PCMD_LC | 0x1f;
+ PVCR = 0x14;
+
+ cclk = 0x0b;
asm volatile("mcr p14, 0, %0, c6, c0, 0 @ set CCLK"
: : "r" (cclk) : "cc");
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 5/5] arch/arm: mioa701 improve barebox_update script
2012-05-15 21:21 [PATCH 0/5] arch/arm: mioa701 linux booting Robert Jarzmik
` (3 preceding siblings ...)
2012-05-15 21:21 ` [PATCH 4/5] arch/arm: mioa701 use maximum CPU frequency Robert Jarzmik
@ 2012-05-15 21:21 ` Robert Jarzmik
2012-05-16 17:22 ` [PATCH 0/5] arch/arm: mioa701 linux booting Sascha Hauer
5 siblings, 0 replies; 7+ messages in thread
From: Robert Jarzmik @ 2012-05-15 21:21 UTC (permalink / raw)
To: barebox
Add a check to verify if /barebox.BIP0 exists, and if so,
unlock the protection area, flash barebox, and reprotect the
area.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
arch/arm/boards/mioa701/env/bin/barebox_update | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boards/mioa701/env/bin/barebox_update b/arch/arm/boards/mioa701/env/bin/barebox_update
index 564549b..b544563 100644
--- a/arch/arm/boards/mioa701/env/bin/barebox_update
+++ b/arch/arm/boards/mioa701/env/bin/barebox_update
@@ -3,3 +3,8 @@
# Page+OOB specific partitions
addpart /dev/mtdraw0 1081344@3649536(msipl)
addpart /dev/mtdraw0 270336@3649536(barebox)
+
+if [ -r /barebox.BIP0 ]; then
+ erase /dev/mtdraw0.barebox
+ cp -v /barebox.BIP0 /dev/mtdraw0.barebox
+fi
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] arch/arm: mioa701 linux booting
2012-05-15 21:21 [PATCH 0/5] arch/arm: mioa701 linux booting Robert Jarzmik
` (4 preceding siblings ...)
2012-05-15 21:21 ` [PATCH 5/5] arch/arm: mioa701 improve barebox_update script Robert Jarzmik
@ 2012-05-16 17:22 ` Sascha Hauer
5 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2012-05-16 17:22 UTC (permalink / raw)
To: Robert Jarzmik; +Cc: barebox
On Tue, May 15, 2012 at 11:21:12PM +0200, Robert Jarzmik wrote:
> This patch serie makes linux autobooting and barebox flashing
> and reflashing much more automated.
> This serie serves as the first fully working barebox setup,
> fully replacing the existing legacy boot code on the mioa701.
>
> --
> Robert
>
Applied, thanks
Sascha
> Robert Jarzmik (5):
> arm/board: mioa701 align kernel options with kernel mtd
> arch/arm: mioa701 make autoboot of Linux work
> arch/arm: mioa701 add IPL and DPS1 updater
> arch/arm: mioa701 use maximum CPU frequency
> arch/arm: mioa701 improve barebox_update script
>
> arch/arm/boards/mioa701/board.c | 13 +++++++++++--
> arch/arm/boards/mioa701/env/bin/barebox_update | 5 +++++
> arch/arm/boards/mioa701/env/bin/dps1_unlock | 12 ++++++++++++
> arch/arm/boards/mioa701/env/bin/dps1_update | 12 ++++++++++++
> arch/arm/boards/mioa701/env/bin/init | 19 ++++++++++++-------
> arch/arm/boards/mioa701/env/data/dps1.raw.gz | Bin 0 -> 1239 bytes
> 6 files changed, 52 insertions(+), 9 deletions(-)
> 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
>
> --
> 1.7.10
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-05-16 17:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-15 21:21 [PATCH 0/5] arch/arm: mioa701 linux booting Robert Jarzmik
2012-05-15 21:21 ` [PATCH 1/5] arm/board: mioa701 align kernel options with kernel mtd Robert Jarzmik
2012-05-15 21:21 ` [PATCH 2/5] arch/arm: mioa701 make autoboot of Linux work Robert Jarzmik
2012-05-15 21:21 ` [PATCH 3/5] arch/arm: mioa701 add IPL and DPS1 updater Robert Jarzmik
2012-05-15 21:21 ` [PATCH 4/5] arch/arm: mioa701 use maximum CPU frequency Robert Jarzmik
2012-05-15 21:21 ` [PATCH 5/5] arch/arm: mioa701 improve barebox_update script Robert Jarzmik
2012-05-16 17:22 ` [PATCH 0/5] arch/arm: mioa701 linux booting Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox