mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* FW: Barebox on Karo TX25
@ 2013-11-27 11:28 John Parker
  2013-11-27 12:56 ` [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image Sascha Hauer
  2013-11-27 13:02 ` FW: Barebox on Karo TX25 Sascha Hauer
  0 siblings, 2 replies; 26+ messages in thread
From: John Parker @ 2013-11-27 11:28 UTC (permalink / raw)
  To: barebox

Hi all

I've spent a day trying to get barebox onto a Karo TX25. I've trawled the lists and documentation but seem to be missing something fundamental.

I need to replace Redboot with barebox and I know that barebox will need 512k (256k + 2 more blocks for env) rather than the 256k partition that Redboot has.

Redboot is version "Ka-Ro 2009-06-10" as supplied with the TX25.

The problem is that when I try to delete and recreate the Redboot partition, Redboot says no becays it is reserved, even though I'm running in ROMRAM mode.

I know the tx25 is a supported configuration because there is a defconfig for it.

Is it documented anywhere exactly how to replace redboot with barebox?

What magic am I missing?

Thanks

John

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image
  2013-11-27 11:28 FW: Barebox on Karo TX25 John Parker
@ 2013-11-27 12:56 ` Sascha Hauer
  2013-11-27 12:56   ` [PATCH 2/2] scripts: imx-image: Add i.MX25 support Sascha Hauer
  2013-11-27 14:49   ` [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image John Parker
  2013-11-27 13:02 ` FW: Barebox on Karo TX25 Sascha Hauer
  1 sibling, 2 replies; 26+ messages in thread
From: Sascha Hauer @ 2013-11-27 12:56 UTC (permalink / raw)
  To: barebox

Currently unused in barebox, but useful for bootstrapping a tx25
from USB where a imx-image is needed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg

diff --git a/arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg b/arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg
new file mode 100644
index 0000000..2345f18
--- /dev/null
+++ b/arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg
@@ -0,0 +1,23 @@
+#
+# currently unused in barebox, but useful to generate
+# a imx-image to use with imx-usb-loader
+#
+soc imx25
+loadaddr 0x80000000
+dcdofs 0x400
+wm 32 0xb8001010 0x00000002
+wm 32 0xb8001004 0x00095728
+wm 32 0xb8001000 0x92116480
+wm 32 0x80000400 0x92116480
+wm 32 0xb8001000 0xa2116480
+wm 32 0xb8001000 0xb2116480
+wm 8 0x80000033 0x80
+wm 32 0xb8001000 0x82116480
+
+wm 32 0xb800100c 0x00095728
+wm 32 0xb8001008 0x92116480
+wm 32 0x80000400 0x92116480
+wm 32 0xb8001008 0xa2116480
+wm 32 0xb8001008 0xb2116480
+wm 8 0x90000033 0x80
+wm 32 0xb8001008 0x82116480
-- 
1.8.4.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH 2/2] scripts: imx-image: Add i.MX25 support
  2013-11-27 12:56 ` [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image Sascha Hauer
@ 2013-11-27 12:56   ` Sascha Hauer
  2013-11-27 14:49   ` [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image John Parker
  1 sibling, 0 replies; 26+ messages in thread
From: Sascha Hauer @ 2013-11-27 12:56 UTC (permalink / raw)
  To: barebox

The i.MX25 works like the i.MX51, just add the SoC magic and the USB product
id.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 scripts/imx/imx-image.c      | 1 +
 scripts/imx/imx-usb-loader.c | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index ec571eb..1d935be 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -442,6 +442,7 @@ struct soc_type {
 };
 
 static struct soc_type socs[] = {
+	{ .name = "imx25", .header_version = 1, },
 	{ .name = "imx35", .header_version = 1, },
 	{ .name = "imx51", .header_version = 1, },
 	{ .name = "imx53", .header_version = 2, },
diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 7ccfc99..81c0640 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -124,6 +124,13 @@ struct mach_id imx_ids[] = {
 		.header_type = HDR_MX51,
 		.mode = MODE_BULK,
 		.max_transfer = 64,
+	}, {
+		.vid = 0x15a2,
+		.pid = 0x003a,
+		.name = "i.MX25",
+		.header_type = HDR_MX51,
+		.mode = MODE_BULK,
+		.max_transfer = 64,
 	},
 };
 
-- 
1.8.4.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: FW: Barebox on Karo TX25
  2013-11-27 11:28 FW: Barebox on Karo TX25 John Parker
  2013-11-27 12:56 ` [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image Sascha Hauer
@ 2013-11-27 13:02 ` Sascha Hauer
  2013-11-27 13:18   ` John Parker
                     ` (2 more replies)
  1 sibling, 3 replies; 26+ messages in thread
From: Sascha Hauer @ 2013-11-27 13:02 UTC (permalink / raw)
  To: John Parker; +Cc: barebox

Hi John,

On Wed, Nov 27, 2013 at 11:28:42AM +0000, John Parker wrote:
> Hi all
> 
> I've spent a day trying to get barebox onto a Karo TX25. I've trawled the lists and documentation but seem to be missing something fundamental.
> 
> I need to replace Redboot with barebox and I know that barebox will need 512k (256k + 2 more blocks for env) rather than the 256k partition that Redboot has.
> 
> Redboot is version "Ka-Ro 2009-06-10" as supplied with the TX25.
> 
> The problem is that when I try to delete and recreate the Redboot partition, Redboot says no becays it is reserved, even though I'm running in ROMRAM mode.
> 
> I know the tx25 is a supported configuration because there is a defconfig for it.
> 
> Is it documented anywhere exactly how to replace redboot with barebox?
> 
> What magic am I missing?

redboot is still a mystery to me and I try to avoid it. Let's try with
USB boot instead which has the advantage that you can erase your NAND
without risking to brick your board.

Please apply the two patches I just sent as answer to your mail. You can
then:

- make tx25stk5_defconfig
- make menuconfig, enable CONFIG_ARCH_IMX_USBLOADER
- make
- generate a imx-image:
  scripts/imx/imx-image -c \
	arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg -f \
	barebox-flash-image -o barebox.imx
- bring your board into USB boot mode (the baseboard should have a
  jumper to do this)
- connect to a host with a mini USB cable. 'lsusb' should show:
  Bus 001 Device 014: ID 15a2:003a Freescale Semiconductor, Inc.
- do: ./scripts/imx/imx-usb-loader barebox.imx

barebox should show up on the serial port.

Next step would be to write barebox to nand, but we can talk about this
once you've got barebox running.

Sascha

-- 
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] 26+ messages in thread

* RE: FW: Barebox on Karo TX25
  2013-11-27 13:02 ` FW: Barebox on Karo TX25 Sascha Hauer
@ 2013-11-27 13:18   ` John Parker
  2013-11-27 15:49   ` John Parker
  2013-11-27 19:45   ` John Parker
  2 siblings, 0 replies; 26+ messages in thread
From: John Parker @ 2013-11-27 13:18 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha

Great. Many thanks. I'll give it a go and will let you know.

Regards

John

-----Original Message-----
From: Sascha Hauer [mailto:s.hauer@pengutronix.de] 
Sent: 27 November 2013 13:03
To: John Parker
Cc: barebox@lists.infradead.org
Subject: Re: FW: Barebox on Karo TX25

Hi John,

On Wed, Nov 27, 2013 at 11:28:42AM +0000, John Parker wrote:
> Hi all
> 
> I've spent a day trying to get barebox onto a Karo TX25. I've trawled the lists and documentation but seem to be missing something fundamental.
> 
> I need to replace Redboot with barebox and I know that barebox will need 512k (256k + 2 more blocks for env) rather than the 256k partition that Redboot has.
> 
> Redboot is version "Ka-Ro 2009-06-10" as supplied with the TX25.
> 
> The problem is that when I try to delete and recreate the Redboot partition, Redboot says no becays it is reserved, even though I'm running in ROMRAM mode.
> 
> I know the tx25 is a supported configuration because there is a defconfig for it.
> 
> Is it documented anywhere exactly how to replace redboot with barebox?
> 
> What magic am I missing?

redboot is still a mystery to me and I try to avoid it. Let's try with USB boot instead which has the advantage that you can erase your NAND without risking to brick your board.

Please apply the two patches I just sent as answer to your mail. You can
then:

- make tx25stk5_defconfig
- make menuconfig, enable CONFIG_ARCH_IMX_USBLOADER
- make
- generate a imx-image:
  scripts/imx/imx-image -c \
	arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg -f \
	barebox-flash-image -o barebox.imx
- bring your board into USB boot mode (the baseboard should have a
  jumper to do this)
- connect to a host with a mini USB cable. 'lsusb' should show:
  Bus 001 Device 014: ID 15a2:003a Freescale Semiconductor, Inc.
- do: ./scripts/imx/imx-usb-loader barebox.imx

barebox should show up on the serial port.

Next step would be to write barebox to nand, but we can talk about this once you've got barebox running.

Sascha

-- 
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] 26+ messages in thread

* RE: [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image
  2013-11-27 12:56 ` [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image Sascha Hauer
  2013-11-27 12:56   ` [PATCH 2/2] scripts: imx-image: Add i.MX25 support Sascha Hauer
@ 2013-11-27 14:49   ` John Parker
  1 sibling, 0 replies; 26+ messages in thread
From: John Parker @ 2013-11-27 14:49 UTC (permalink / raw)
  To: Sascha Hauer, barebox

Hi Sascha

Has something strange happened to the wrapping In this file?

Regards

John

-----Original Message-----
From: barebox [mailto:barebox-bounces@lists.infradead.org] On Behalf Of Sascha Hauer
Sent: 27 November 2013 12:56
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image

Currently unused in barebox, but useful for bootstrapping a tx25 from USB where a imx-image is needed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg

diff --git a/arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg b/arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg
new file mode 100644
index 0000000..2345f18
--- /dev/null
+++ b/arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg
@@ -0,0 +1,23 @@
+#
+# currently unused in barebox, but useful to generate # a imx-image to 
+use with imx-usb-loader # soc imx25 loadaddr 0x80000000 dcdofs 0x400 wm 
+32 0xb8001010 0x00000002 wm 32 0xb8001004 0x00095728 wm 32 0xb8001000 
+0x92116480 wm 32 0x80000400 0x92116480 wm 32 0xb8001000 0xa2116480 wm 
+32 0xb8001000 0xb2116480 wm 8 0x80000033 0x80 wm 32 0xb8001000 
+0x82116480
+
+wm 32 0xb800100c 0x00095728
+wm 32 0xb8001008 0x92116480
+wm 32 0x80000400 0x92116480
+wm 32 0xb8001008 0xa2116480
+wm 32 0xb8001008 0xb2116480
+wm 8 0x90000033 0x80
+wm 32 0xb8001008 0x82116480
--
1.8.4.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: FW: Barebox on Karo TX25
  2013-11-27 13:02 ` FW: Barebox on Karo TX25 Sascha Hauer
  2013-11-27 13:18   ` John Parker
@ 2013-11-27 15:49   ` John Parker
  2013-11-27 21:01     ` Sascha Hauer
  2013-11-27 19:45   ` John Parker
  2 siblings, 1 reply; 26+ messages in thread
From: John Parker @ 2013-11-27 15:49 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi

I have a barebox prompt running from RAM!!

What next?

Regards

John

-----Original Message-----
From: Sascha Hauer [mailto:s.hauer@pengutronix.de] 
Sent: 27 November 2013 13:03
To: John Parker
Cc: barebox@lists.infradead.org
Subject: Re: FW: Barebox on Karo TX25

Hi John,

On Wed, Nov 27, 2013 at 11:28:42AM +0000, John Parker wrote:
> Hi all
> 
> I've spent a day trying to get barebox onto a Karo TX25. I've trawled the lists and documentation but seem to be missing something fundamental.
> 
> I need to replace Redboot with barebox and I know that barebox will need 512k (256k + 2 more blocks for env) rather than the 256k partition that Redboot has.
> 
> Redboot is version "Ka-Ro 2009-06-10" as supplied with the TX25.
> 
> The problem is that when I try to delete and recreate the Redboot partition, Redboot says no becays it is reserved, even though I'm running in ROMRAM mode.
> 
> I know the tx25 is a supported configuration because there is a defconfig for it.
> 
> Is it documented anywhere exactly how to replace redboot with barebox?
> 
> What magic am I missing?

redboot is still a mystery to me and I try to avoid it. Let's try with USB boot instead which has the advantage that you can erase your NAND without risking to brick your board.

Please apply the two patches I just sent as answer to your mail. You can
then:

- make tx25stk5_defconfig
- make menuconfig, enable CONFIG_ARCH_IMX_USBLOADER
- make
- generate a imx-image:
  scripts/imx/imx-image -c \
	arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg -f \
	barebox-flash-image -o barebox.imx
- bring your board into USB boot mode (the baseboard should have a
  jumper to do this)
- connect to a host with a mini USB cable. 'lsusb' should show:
  Bus 001 Device 014: ID 15a2:003a Freescale Semiconductor, Inc.
- do: ./scripts/imx/imx-usb-loader barebox.imx

barebox should show up on the serial port.

Next step would be to write barebox to nand, but we can talk about this once you've got barebox running.

Sascha

-- 
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] 26+ messages in thread

* RE: FW: Barebox on Karo TX25
  2013-11-27 13:02 ` FW: Barebox on Karo TX25 Sascha Hauer
  2013-11-27 13:18   ` John Parker
  2013-11-27 15:49   ` John Parker
@ 2013-11-27 19:45   ` John Parker
  2013-11-27 20:15     ` Eric Bénard
  2 siblings, 1 reply; 26+ messages in thread
From: John Parker @ 2013-11-27 19:45 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Oh, and just notices that after a few moments barebox hangs, no longer responding to input!!

Any ideas?

Regards

John

-----Original Message-----
From: John Parker 
Sent: 27 November 2013 15:50
To: 'Sascha Hauer'
Cc: barebox@lists.infradead.org
Subject: RE: FW: Barebox on Karo TX25

Hi

I have a barebox prompt running from RAM!!

What next?

Regards

John

-----Original Message-----
From: Sascha Hauer [mailto:s.hauer@pengutronix.de] 
Sent: 27 November 2013 13:03
To: John Parker
Cc: barebox@lists.infradead.org
Subject: Re: FW: Barebox on Karo TX25

Hi John,

On Wed, Nov 27, 2013 at 11:28:42AM +0000, John Parker wrote:
> Hi all
> 
> I've spent a day trying to get barebox onto a Karo TX25. I've trawled the lists and documentation but seem to be missing something fundamental.
> 
> I need to replace Redboot with barebox and I know that barebox will need 512k (256k + 2 more blocks for env) rather than the 256k partition that Redboot has.
> 
> Redboot is version "Ka-Ro 2009-06-10" as supplied with the TX25.
> 
> The problem is that when I try to delete and recreate the Redboot partition, Redboot says no becays it is reserved, even though I'm running in ROMRAM mode.
> 
> I know the tx25 is a supported configuration because there is a defconfig for it.
> 
> Is it documented anywhere exactly how to replace redboot with barebox?
> 
> What magic am I missing?

redboot is still a mystery to me and I try to avoid it. Let's try with USB boot instead which has the advantage that you can erase your NAND without risking to brick your board.

Please apply the two patches I just sent as answer to your mail. You can
then:

- make tx25stk5_defconfig
- make menuconfig, enable CONFIG_ARCH_IMX_USBLOADER
- make
- generate a imx-image:
  scripts/imx/imx-image -c \
	arch/arm/boards/karo-tx25/flash-header-tx25.imxcfg -f \
	barebox-flash-image -o barebox.imx
- bring your board into USB boot mode (the baseboard should have a
  jumper to do this)
- connect to a host with a mini USB cable. 'lsusb' should show:
  Bus 001 Device 014: ID 15a2:003a Freescale Semiconductor, Inc.
- do: ./scripts/imx/imx-usb-loader barebox.imx

barebox should show up on the serial port.

Next step would be to write barebox to nand, but we can talk about this once you've got barebox running.

Sascha

-- 
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] 26+ messages in thread

* Re: Barebox on Karo TX25
  2013-11-27 19:45   ` John Parker
@ 2013-11-27 20:15     ` Eric Bénard
  2013-11-27 20:54       ` Sascha Hauer
  0 siblings, 1 reply; 26+ messages in thread
From: Eric Bénard @ 2013-11-27 20:15 UTC (permalink / raw)
  To: John Parker; +Cc: barebox

Hi John,

Le Wed, 27 Nov 2013 19:45:09 +0000,
John Parker <John.Parker@lucyautomation.co.uk> a écrit :

> Oh, and just notices that after a few moments barebox hangs, no longer responding to input!!
> 
> Any ideas?
> 
IIRC watchdog is enabled when you are using the serial or USB boot.

Eric

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Barebox on Karo TX25
  2013-11-27 20:15     ` Eric Bénard
@ 2013-11-27 20:54       ` Sascha Hauer
  2013-11-28  4:16         ` Alexander Aring
  0 siblings, 1 reply; 26+ messages in thread
From: Sascha Hauer @ 2013-11-27 20:54 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Wed, Nov 27, 2013 at 09:15:31PM +0100, Eric Bénard wrote:
> Hi John,
> 
> Le Wed, 27 Nov 2013 19:45:09 +0000,
> John Parker <John.Parker@lucyautomation.co.uk> a écrit :
> 
> > Oh, and just notices that after a few moments barebox hangs, no longer responding to input!!
> > 
> > Any ideas?
> > 
> IIRC watchdog is enabled when you are using the serial or USB boot.

In this case it should be possible to enable the watchdog command
and trigger it regularly to keep the board alive. AFAIK the watchdog
can't be disabled completely, right?

Sascha

-- 
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] 26+ messages in thread

* Re: FW: Barebox on Karo TX25
  2013-11-27 15:49   ` John Parker
@ 2013-11-27 21:01     ` Sascha Hauer
  2013-11-28 16:13       ` John Parker
  0 siblings, 1 reply; 26+ messages in thread
From: Sascha Hauer @ 2013-11-27 21:01 UTC (permalink / raw)
  To: John Parker; +Cc: barebox

On Wed, Nov 27, 2013 at 03:49:49PM +0000, John Parker wrote:
> Hi
> 
> I have a barebox prompt running from RAM!!
> 
> What next?

Setup a tftp server, edit /env/network/eth0 to your liking using
'edit /env/network/eth0', do a 'saveenv' to safe your settings.
Test your network with:

cp /mnt/tftp/barebox.bin /barebox.bin

If that works you can do:

erase /dev/nand0.barebox.bb
cp /barebox.bin /dev/nand0.barebox.bb

(Note: you have to use barebox-flash-image as generated by the
compilation, not the imx-image you generated for USB boot)

That should be it. After a reset your board should come up with barebox.

Sascha

-- 
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] 26+ messages in thread

* Re: Barebox on Karo TX25
  2013-11-27 20:54       ` Sascha Hauer
@ 2013-11-28  4:16         ` Alexander Aring
  2013-11-28  7:20           ` Sascha Hauer
  0 siblings, 1 reply; 26+ messages in thread
From: Alexander Aring @ 2013-11-28  4:16 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

On Wed, Nov 27, 2013 at 09:54:22PM +0100, Sascha Hauer wrote:
> On Wed, Nov 27, 2013 at 09:15:31PM +0100, Eric Bénard wrote:
> > Hi John,
> > 
> > Le Wed, 27 Nov 2013 19:45:09 +0000,
> > John Parker <John.Parker@lucyautomation.co.uk> a écrit :
> > 
> > > Oh, and just notices that after a few moments barebox hangs, no longer responding to input!!
> > > 
> > > Any ideas?
> > > 
> > IIRC watchdog is enabled when you are using the serial or USB boot.
> 
> In this case it should be possible to enable the watchdog command
> and trigger it regularly to keep the board alive. AFAIK the watchdog

how would you do that in barebox? We don't have interrupts/parallel
things. I mean where do you want to trigger the watchdog command, in
the main loop (function "barebox_main" in common/startup.c) of barebox?

- Alex

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: Barebox on Karo TX25
  2013-11-28  4:16         ` Alexander Aring
@ 2013-11-28  7:20           ` Sascha Hauer
  2013-11-28  7:37             ` Alexander Aring
  0 siblings, 1 reply; 26+ messages in thread
From: Sascha Hauer @ 2013-11-28  7:20 UTC (permalink / raw)
  To: Alexander Aring; +Cc: barebox

On Thu, Nov 28, 2013 at 05:16:46AM +0100, Alexander Aring wrote:
> Hi Sascha,
> 
> On Wed, Nov 27, 2013 at 09:54:22PM +0100, Sascha Hauer wrote:
> > On Wed, Nov 27, 2013 at 09:15:31PM +0100, Eric Bénard wrote:
> > > Hi John,
> > > 
> > > Le Wed, 27 Nov 2013 19:45:09 +0000,
> > > John Parker <John.Parker@lucyautomation.co.uk> a écrit :
> > > 
> > > > Oh, and just notices that after a few moments barebox hangs, no longer responding to input!!
> > > > 
> > > > Any ideas?
> > > > 
> > > IIRC watchdog is enabled when you are using the serial or USB boot.
> > 
> > In this case it should be possible to enable the watchdog command
> > and trigger it regularly to keep the board alive. AFAIK the watchdog
> 
> how would you do that in barebox? We don't have interrupts/parallel
> things. I mean where do you want to trigger the watchdog command, in
> the main loop (function "barebox_main" in common/startup.c) of barebox?

I meant for debugging whether it's really the watchdog that hangs the
board.

Sascha

-- 
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] 26+ messages in thread

* Re: Barebox on Karo TX25
  2013-11-28  7:20           ` Sascha Hauer
@ 2013-11-28  7:37             ` Alexander Aring
  0 siblings, 0 replies; 26+ messages in thread
From: Alexander Aring @ 2013-11-28  7:37 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Thu, Nov 28, 2013 at 08:20:14AM +0100, Sascha Hauer wrote:
> On Thu, Nov 28, 2013 at 05:16:46AM +0100, Alexander Aring wrote:
> > Hi Sascha,
> > 
> > On Wed, Nov 27, 2013 at 09:54:22PM +0100, Sascha Hauer wrote:
> > > On Wed, Nov 27, 2013 at 09:15:31PM +0100, Eric Bénard wrote:
> > > > Hi John,
> > > > 
> > > > Le Wed, 27 Nov 2013 19:45:09 +0000,
> > > > John Parker <John.Parker@lucyautomation.co.uk> a écrit :
> > > > 
> > > > > Oh, and just notices that after a few moments barebox hangs, no longer responding to input!!
> > > > > 
> > > > > Any ideas?
> > > > > 
> > > > IIRC watchdog is enabled when you are using the serial or USB boot.
> > > 
> > > In this case it should be possible to enable the watchdog command
> > > and trigger it regularly to keep the board alive. AFAIK the watchdog
> > 
> > how would you do that in barebox? We don't have interrupts/parallel
> > things. I mean where do you want to trigger the watchdog command, in
> > the main loop (function "barebox_main" in common/startup.c) of barebox?
> 
> I meant for debugging whether it's really the watchdog that hangs the
> board.
> 
ah, ok. Thanks Sascha.

- Alex

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: FW: Barebox on Karo TX25
  2013-11-27 21:01     ` Sascha Hauer
@ 2013-11-28 16:13       ` John Parker
  2013-11-28 16:22         ` Baruch Siach
  0 siblings, 1 reply; 26+ messages in thread
From: John Parker @ 2013-11-28 16:13 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha

I still have a problem with barebox freezing. 

I've tried various things as you have suggested, but have not got any further.

Issuing wd 100, followed by wd repeated every few seconds seems to keep the system alive so it looks like the watchdog is to blame.

According to the mx25 reference manual the watchdog is disabled until it is enabled by setting the WDE bit.

I can't find anything (yet) in the startup which enables the watchdog by default?

Does the flash header you sent me include anything which enables the watchdog?

Despite this I have been able to follow your instructions and have got as far as copying the bin file to nand but resetting the board (with the usbloader jumper off") does not produce any output.

The barebox-flash-image link points to a zbarebox.bin which is what I've copied to nand. Was this right?

Many thanks for all your efforts

Regards

John

-----Original Message-----
From: Sascha Hauer [mailto:s.hauer@pengutronix.de] 
Sent: 27 November 2013 21:01
To: John Parker
Cc: barebox@lists.infradead.org
Subject: Re: FW: Barebox on Karo TX25

On Wed, Nov 27, 2013 at 03:49:49PM +0000, John Parker wrote:
> Hi
> 
> I have a barebox prompt running from RAM!!
> 
> What next?

Setup a tftp server, edit /env/network/eth0 to your liking using 'edit /env/network/eth0', do a 'saveenv' to safe your settings.
Test your network with:

cp /mnt/tftp/barebox.bin /barebox.bin

If that works you can do:

erase /dev/nand0.barebox.bb
cp /barebox.bin /dev/nand0.barebox.bb

(Note: you have to use barebox-flash-image as generated by the compilation, not the imx-image you generated for USB boot)

That should be it. After a reset your board should come up with barebox.

Sascha

-- 
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] 26+ messages in thread

* Re: FW: Barebox on Karo TX25
  2013-11-28 16:13       ` John Parker
@ 2013-11-28 16:22         ` Baruch Siach
  2013-11-29  8:16           ` John Parker
  0 siblings, 1 reply; 26+ messages in thread
From: Baruch Siach @ 2013-11-28 16:22 UTC (permalink / raw)
  To: John Parker; +Cc: barebox

Hi John,

On Thu, Nov 28, 2013 at 04:13:34PM +0000, John Parker wrote:
> I still have a problem with barebox freezing. 
> 
> I've tried various things as you have suggested, but have not got any further.
> 
> Issuing wd 100, followed by wd repeated every few seconds seems to keep the 
> system alive so it looks like the watchdog is to blame.
> 
> According to the mx25 reference manual the watchdog is disabled until it is 
> enabled by setting the WDE bit.
> 
> I can't find anything (yet) in the startup which enables the watchdog by 
> default?
> 
> Does the flash header you sent me include anything which enables the 
> watchdog?

When the i.MX25 boots using the serial protocol boot mode (either UART or USB) 
the watchdog gets enabled automatically. You can't disable it.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: FW: Barebox on Karo TX25
  2013-11-28 16:22         ` Baruch Siach
@ 2013-11-29  8:16           ` John Parker
  2013-11-29  9:46             ` Sascha Hauer
  0 siblings, 1 reply; 26+ messages in thread
From: John Parker @ 2013-11-29  8:16 UTC (permalink / raw)
  To: Baruch Siach; +Cc: barebox

Hi Baruch

Thank you for this. I've now found this info in the reference manual - not under the watchdog section but elsewhere - under the boot modes.

So now I can concentrate on why the zbarebox.bin wont run!

Regards

John




-----Original Message-----
From: Baruch Siach [mailto:baruch@tkos.co.il] 
Sent: 28 November 2013 16:22
To: John Parker
Cc: Sascha Hauer; barebox@lists.infradead.org
Subject: Re: FW: Barebox on Karo TX25

Hi John,

On Thu, Nov 28, 2013 at 04:13:34PM +0000, John Parker wrote:
> I still have a problem with barebox freezing. 
> 
> I've tried various things as you have suggested, but have not got any further.
> 
> Issuing wd 100, followed by wd repeated every few seconds seems to 
> keep the system alive so it looks like the watchdog is to blame.
> 
> According to the mx25 reference manual the watchdog is disabled until 
> it is enabled by setting the WDE bit.
> 
> I can't find anything (yet) in the startup which enables the watchdog 
> by default?
> 
> Does the flash header you sent me include anything which enables the 
> watchdog?

When the i.MX25 boots using the serial protocol boot mode (either UART or USB) the watchdog gets enabled automatically. You can't disable it.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: FW: Barebox on Karo TX25
  2013-11-29  8:16           ` John Parker
@ 2013-11-29  9:46             ` Sascha Hauer
  2013-11-29 10:27               ` John Parker
                                 ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Sascha Hauer @ 2013-11-29  9:46 UTC (permalink / raw)
  To: John Parker; +Cc: barebox

On Fri, Nov 29, 2013 at 08:16:21AM +0000, John Parker wrote:
> Hi Baruch
> 
> Thank you for this. I've now found this info in the reference manual - not under the watchdog section but elsewhere - under the boot modes.
> 
> So now I can concentrate on why the zbarebox.bin wont run!

Sorry, John. I can confirm the startup is broken since:

commit cf4271ee12f8ce61598a327a72026226441dca72
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Thu Jan 24 17:09:00 2013 +0100

    ARM i.MX: prepare external nand boot for SoC specific entry
    
    i.MX will get SoC specific entry points for barebox. To find the
    correct one we have to call these from the SoC specific
    imx*_barebox_boot_nand_external functions.
    
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Unfortunately I haven't figured out yet how to fix this. For now you could
go back before this commit by checking out cf4271ee12f8ce61598a~1. This
should work.

Sascha

-- 
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] 26+ messages in thread

* RE: FW: Barebox on Karo TX25
  2013-11-29  9:46             ` Sascha Hauer
@ 2013-11-29 10:27               ` John Parker
  2013-11-29 10:41               ` John Parker
  2013-12-02  9:13               ` John Parker
  2 siblings, 0 replies; 26+ messages in thread
From: John Parker @ 2013-11-29 10:27 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Thank you Sascha, I'll give that a go and report back

Regards

John

-----Original Message-----
From: Sascha Hauer [mailto:s.hauer@pengutronix.de] 
Sent: 29 November 2013 09:46
To: John Parker
Cc: Baruch Siach; barebox@lists.infradead.org
Subject: Re: FW: Barebox on Karo TX25

On Fri, Nov 29, 2013 at 08:16:21AM +0000, John Parker wrote:
> Hi Baruch
> 
> Thank you for this. I've now found this info in the reference manual - not under the watchdog section but elsewhere - under the boot modes.
> 
> So now I can concentrate on why the zbarebox.bin wont run!

Sorry, John. I can confirm the startup is broken since:

commit cf4271ee12f8ce61598a327a72026226441dca72
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Thu Jan 24 17:09:00 2013 +0100

    ARM i.MX: prepare external nand boot for SoC specific entry
    
    i.MX will get SoC specific entry points for barebox. To find the
    correct one we have to call these from the SoC specific
    imx*_barebox_boot_nand_external functions.
    
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Unfortunately I haven't figured out yet how to fix this. For now you could go back before this commit by checking out cf4271ee12f8ce61598a~1. This should work.

Sascha

-- 
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] 26+ messages in thread

* RE: FW: Barebox on Karo TX25
  2013-11-29  9:46             ` Sascha Hauer
  2013-11-29 10:27               ` John Parker
@ 2013-11-29 10:41               ` John Parker
  2013-12-02  9:13               ` John Parker
  2 siblings, 0 replies; 26+ messages in thread
From: John Parker @ 2013-11-29 10:41 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Fantastic! That works!

Many thanks

Regards

John

-----Original Message-----
From: John Parker 
Sent: 29 November 2013 10:27
To: 'Sascha Hauer'
Cc: Baruch Siach; barebox@lists.infradead.org
Subject: RE: FW: Barebox on Karo TX25

Thank you Sascha, I'll give that a go and report back

Regards

John

-----Original Message-----
From: Sascha Hauer [mailto:s.hauer@pengutronix.de] 
Sent: 29 November 2013 09:46
To: John Parker
Cc: Baruch Siach; barebox@lists.infradead.org
Subject: Re: FW: Barebox on Karo TX25

On Fri, Nov 29, 2013 at 08:16:21AM +0000, John Parker wrote:
> Hi Baruch
> 
> Thank you for this. I've now found this info in the reference manual - not under the watchdog section but elsewhere - under the boot modes.
> 
> So now I can concentrate on why the zbarebox.bin wont run!

Sorry, John. I can confirm the startup is broken since:

commit cf4271ee12f8ce61598a327a72026226441dca72
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Thu Jan 24 17:09:00 2013 +0100

    ARM i.MX: prepare external nand boot for SoC specific entry
    
    i.MX will get SoC specific entry points for barebox. To find the
    correct one we have to call these from the SoC specific
    imx*_barebox_boot_nand_external functions.
    
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Unfortunately I haven't figured out yet how to fix this. For now you could go back before this commit by checking out cf4271ee12f8ce61598a~1. This should work.

Sascha

-- 
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] 26+ messages in thread

* RE: FW: Barebox on Karo TX25
  2013-11-29  9:46             ` Sascha Hauer
  2013-11-29 10:27               ` John Parker
  2013-11-29 10:41               ` John Parker
@ 2013-12-02  9:13               ` John Parker
  2013-12-03  9:26                 ` Sascha Hauer
  2 siblings, 1 reply; 26+ messages in thread
From: John Parker @ 2013-12-02  9:13 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi again

So now my problem is that I really could do with the LED and UBIFS stuff that happened since February.

Should I try to fix mx25 in the latest code, or undo the problematic commit?

Regards

John

-----Original Message-----
From: John Parker 
Sent: 29 November 2013 10:42
To: 'Sascha Hauer'
Cc: 'Baruch Siach'; 'barebox@lists.infradead.org'
Subject: RE: FW: Barebox on Karo TX25

Fantastic! That works!

Many thanks

Regards

John

-----Original Message-----
From: John Parker 
Sent: 29 November 2013 10:27
To: 'Sascha Hauer'
Cc: Baruch Siach; barebox@lists.infradead.org
Subject: RE: FW: Barebox on Karo TX25

Thank you Sascha, I'll give that a go and report back

Regards

John

-----Original Message-----
From: Sascha Hauer [mailto:s.hauer@pengutronix.de] 
Sent: 29 November 2013 09:46
To: John Parker
Cc: Baruch Siach; barebox@lists.infradead.org
Subject: Re: FW: Barebox on Karo TX25

On Fri, Nov 29, 2013 at 08:16:21AM +0000, John Parker wrote:
> Hi Baruch
> 
> Thank you for this. I've now found this info in the reference manual - not under the watchdog section but elsewhere - under the boot modes.
> 
> So now I can concentrate on why the zbarebox.bin wont run!

Sorry, John. I can confirm the startup is broken since:

commit cf4271ee12f8ce61598a327a72026226441dca72
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Thu Jan 24 17:09:00 2013 +0100

    ARM i.MX: prepare external nand boot for SoC specific entry
    
    i.MX will get SoC specific entry points for barebox. To find the
    correct one we have to call these from the SoC specific
    imx*_barebox_boot_nand_external functions.
    
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Unfortunately I haven't figured out yet how to fix this. For now you could go back before this commit by checking out cf4271ee12f8ce61598a~1. This should work.

Sascha

-- 
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] 26+ messages in thread

* Re: FW: Barebox on Karo TX25
  2013-12-02  9:13               ` John Parker
@ 2013-12-03  9:26                 ` Sascha Hauer
  2013-12-03 19:01                   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 26+ messages in thread
From: Sascha Hauer @ 2013-12-03  9:26 UTC (permalink / raw)
  To: John Parker; +Cc: barebox

BTW Please don't top-post.

On Mon, Dec 02, 2013 at 09:13:31AM +0000, John Parker wrote:
> Hi again
> 
> So now my problem is that I really could do with the LED and UBIFS stuff that happened since February.
> 
> Should I try to fix mx25 in the latest code, or undo the problematic commit?

Well preferably you should fix the latest code and send a patch to make
it work again ;) However, that could become tricky. For doing so the
patch to enable the debug UART early may become useful. With this you
can use putc_ll and puthex_ll in early code.

I did some investigation. What happens here is really strange. First I
added a missing instruction cache invalidation. That alone doesn't fix
the problem. Inserting a nop fixes booting for me, see the attached
patch. If I move the nop up in the code it still works. If I move it
down, then the board does not work. I have no idea what's happening here
:(

Sascha


From 1bf9ced65ffcfc452957a68060a0e3f56ef3f023 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Tue, 3 Dec 2013 10:22:07 +0100
Subject: [PATCH] ARM: tx25: Make it boot by inserting a nop

SIGH!

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/karo-tx25/lowlevel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boards/karo-tx25/lowlevel.c b/arch/arm/boards/karo-tx25/lowlevel.c
index d010043..cf6295b 100644
--- a/arch/arm/boards/karo-tx25/lowlevel.c
+++ b/arch/arm/boards/karo-tx25/lowlevel.c
@@ -121,6 +121,8 @@ void __bare_init __naked barebox_arm_reset_vector(void)
 	/* set to 3.3v SDRAM */
 	writel(0x800, MX25_IOMUXC_BASE_ADDR + 0x454);
 
+	asm volatile ("nop;"::);
+
 	writel(ESDMISC_RST, MX25_ESDCTL_BASE_ADDR + IMX_ESDMISC);
 
 	while (!(readl(MX25_ESDCTL_BASE_ADDR + IMX_ESDMISC) & (1 << 31)));
-- 
1.8.4.3

-- 
1.8.4.3

Sascha

-- 
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] 26+ messages in thread

* Re: FW: Barebox on Karo TX25
  2013-12-03  9:26                 ` Sascha Hauer
@ 2013-12-03 19:01                   ` Jean-Christophe PLAGNIOL-VILLARD
  2013-12-05 15:24                     ` Sascha Hauer
  0 siblings, 1 reply; 26+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-12-03 19:01 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 10:26 Tue 03 Dec     , Sascha Hauer wrote:
> BTW Please don't top-post.
> 
> On Mon, Dec 02, 2013 at 09:13:31AM +0000, John Parker wrote:
> > Hi again
> > 
> > So now my problem is that I really could do with the LED and UBIFS stuff that happened since February.
> > 
> > Should I try to fix mx25 in the latest code, or undo the problematic commit?
> 
> Well preferably you should fix the latest code and send a patch to make
> it work again ;) However, that could become tricky. For doing so the
> patch to enable the debug UART early may become useful. With this you
> can use putc_ll and puthex_ll in early code.
> 
> I did some investigation. What happens here is really strange. First I
> added a missing instruction cache invalidation. That alone doesn't fix
> the problem. Inserting a nop fixes booting for me, see the attached
> patch. If I move the nop up in the code it still works. If I move it
> down, then the board does not work. I have no idea what's happening here
> :(

could be that the sdram controler need times to stabelized and that you miss a
delay for this

Best Regards,
J.
> 
> Sascha
> 
> 
> From 1bf9ced65ffcfc452957a68060a0e3f56ef3f023 Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Tue, 3 Dec 2013 10:22:07 +0100
> Subject: [PATCH] ARM: tx25: Make it boot by inserting a nop
> 
> SIGH!
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/boards/karo-tx25/lowlevel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/boards/karo-tx25/lowlevel.c b/arch/arm/boards/karo-tx25/lowlevel.c
> index d010043..cf6295b 100644
> --- a/arch/arm/boards/karo-tx25/lowlevel.c
> +++ b/arch/arm/boards/karo-tx25/lowlevel.c
> @@ -121,6 +121,8 @@ void __bare_init __naked barebox_arm_reset_vector(void)
>  	/* set to 3.3v SDRAM */
>  	writel(0x800, MX25_IOMUXC_BASE_ADDR + 0x454);
>  
> +	asm volatile ("nop;"::);
> +
>  	writel(ESDMISC_RST, MX25_ESDCTL_BASE_ADDR + IMX_ESDMISC);
>  
>  	while (!(readl(MX25_ESDCTL_BASE_ADDR + IMX_ESDMISC) & (1 << 31)));
> -- 
> 1.8.4.3
> 
> -- 
> 1.8.4.3
> 
> Sascha
> 
> -- 
> 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

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: FW: Barebox on Karo TX25
  2013-12-03 19:01                   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2013-12-05 15:24                     ` Sascha Hauer
  2013-12-05 16:48                       ` Jean-Christophe PLAGNIOL-VILLARD
  2013-12-19 14:14                       ` John Parker
  0 siblings, 2 replies; 26+ messages in thread
From: Sascha Hauer @ 2013-12-05 15:24 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Tue, Dec 03, 2013 at 08:01:26PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:26 Tue 03 Dec     , Sascha Hauer wrote:
> > BTW Please don't top-post.
> > 
> > On Mon, Dec 02, 2013 at 09:13:31AM +0000, John Parker wrote:
> > > Hi again
> > > 
> > > So now my problem is that I really could do with the LED and UBIFS stuff that happened since February.
> > > 
> > > Should I try to fix mx25 in the latest code, or undo the problematic commit?
> > 
> > Well preferably you should fix the latest code and send a patch to make
> > it work again ;) However, that could become tricky. For doing so the
> > patch to enable the debug UART early may become useful. With this you
> > can use putc_ll and puthex_ll in early code.
> > 
> > I did some investigation. What happens here is really strange. First I
> > added a missing instruction cache invalidation. That alone doesn't fix
> > the problem. Inserting a nop fixes booting for me, see the attached
> > patch. If I move the nop up in the code it still works. If I move it
> > down, then the board does not work. I have no idea what's happening here
> > :(
> 
> could be that the sdram controler need times to stabelized and that you miss a
> delay for this

I thought about this aswell, but I don't believe that a single nop could
make such a reproducable difference. I tried all this with JTAG
debugging aswell which should make all timing issues vanish.

Sascha

-- 
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] 26+ messages in thread

* Re: FW: Barebox on Karo TX25
  2013-12-05 15:24                     ` Sascha Hauer
@ 2013-12-05 16:48                       ` Jean-Christophe PLAGNIOL-VILLARD
  2013-12-19 14:14                       ` John Parker
  1 sibling, 0 replies; 26+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-12-05 16:48 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 16:24 Thu 05 Dec     , Sascha Hauer wrote:
> On Tue, Dec 03, 2013 at 08:01:26PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 10:26 Tue 03 Dec     , Sascha Hauer wrote:
> > > BTW Please don't top-post.
> > > 
> > > On Mon, Dec 02, 2013 at 09:13:31AM +0000, John Parker wrote:
> > > > Hi again
> > > > 
> > > > So now my problem is that I really could do with the LED and UBIFS stuff that happened since February.
> > > > 
> > > > Should I try to fix mx25 in the latest code, or undo the problematic commit?
> > > 
> > > Well preferably you should fix the latest code and send a patch to make
> > > it work again ;) However, that could become tricky. For doing so the
> > > patch to enable the debug UART early may become useful. With this you
> > > can use putc_ll and puthex_ll in early code.
> > > 
> > > I did some investigation. What happens here is really strange. First I
> > > added a missing instruction cache invalidation. That alone doesn't fix
> > > the problem. Inserting a nop fixes booting for me, see the attached
> > > patch. If I move the nop up in the code it still works. If I move it
> > > down, then the board does not work. I have no idea what's happening here
> > > :(
> > 
> > could be that the sdram controler need times to stabelized and that you miss a
> > delay for this
> 
> I thought about this aswell, but I don't believe that a single nop could
> make such a reproducable difference. I tried all this with JTAG
> debugging aswell which should make all timing issues vanish.

on at91 we need to do a bus access to validate the sdram config so could be
an out of sync on the bus

Best Regards,
J.
> 
> Sascha
> 
> -- 
> 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] 26+ messages in thread

* RE: FW: Barebox on Karo TX25
  2013-12-05 15:24                     ` Sascha Hauer
  2013-12-05 16:48                       ` Jean-Christophe PLAGNIOL-VILLARD
@ 2013-12-19 14:14                       ` John Parker
  1 sibling, 0 replies; 26+ messages in thread
From: John Parker @ 2013-12-19 14:14 UTC (permalink / raw)
  To: Sascha Hauer, Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer@pengutronix.de]
> Sent: 05 December 2013 15:25
> To: Jean-Christophe PLAGNIOL-VILLARD
> Cc: John Parker; barebox@lists.infradead.org
> Subject: Re: FW: Barebox on Karo TX25
> 
> On Tue, Dec 03, 2013 at 08:01:26PM +0100, Jean-Christophe PLAGNIOL-
> VILLARD wrote:
> > On 10:26 Tue 03 Dec     , Sascha Hauer wrote:
> > > BTW Please don't top-post.
> > >
> > > On Mon, Dec 02, 2013 at 09:13:31AM +0000, John Parker wrote:
> > > > Hi again
> > > >
> > > > So now my problem is that I really could do with the LED and UBIFS stuff
> that happened since February.
> > > >
> > > > Should I try to fix mx25 in the latest code, or undo the problematic
> commit?
> > >
> > > Well preferably you should fix the latest code and send a patch to
> > > make it work again ;) However, that could become tricky. For doing
> > > so the patch to enable the debug UART early may become useful. With
> > > this you can use putc_ll and puthex_ll in early code.
> > >
> > > I did some investigation. What happens here is really strange. First
> > > I added a missing instruction cache invalidation. That alone doesn't
> > > fix the problem. Inserting a nop fixes booting for me, see the
> > > attached patch. If I move the nop up in the code it still works. If
> > > I move it down, then the board does not work. I have no idea what's
> > > happening here :(
> >
> > could be that the sdram controler need times to stabelized and that
> > you miss a delay for this
> 
> I thought about this aswell, but I don't believe that a single nop could make
> such a reproducable difference. I tried all this with JTAG debugging aswell
> which should make all timing issues vanish.
> 
> Sascha
> 

Hi again

Sorry for the delay coming back on this.

I was able to get the 2013.02 release working well on the tx25 and have made a huge amount of progress.

I have even automated the replacement of Redboot with Barebox!

In the New Year I will try your patch on the latest code and let you know how I get on.

Once again , many thanks all.

Seasons Greetings and Happy New Year to you all.

Kind regards

John

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2013-12-19 14:16 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27 11:28 FW: Barebox on Karo TX25 John Parker
2013-11-27 12:56 ` [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image Sascha Hauer
2013-11-27 12:56   ` [PATCH 2/2] scripts: imx-image: Add i.MX25 support Sascha Hauer
2013-11-27 14:49   ` [PATCH 1/2] ARM: imx: karo tx25: Add config file for imx-image John Parker
2013-11-27 13:02 ` FW: Barebox on Karo TX25 Sascha Hauer
2013-11-27 13:18   ` John Parker
2013-11-27 15:49   ` John Parker
2013-11-27 21:01     ` Sascha Hauer
2013-11-28 16:13       ` John Parker
2013-11-28 16:22         ` Baruch Siach
2013-11-29  8:16           ` John Parker
2013-11-29  9:46             ` Sascha Hauer
2013-11-29 10:27               ` John Parker
2013-11-29 10:41               ` John Parker
2013-12-02  9:13               ` John Parker
2013-12-03  9:26                 ` Sascha Hauer
2013-12-03 19:01                   ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-05 15:24                     ` Sascha Hauer
2013-12-05 16:48                       ` Jean-Christophe PLAGNIOL-VILLARD
2013-12-19 14:14                       ` John Parker
2013-11-27 19:45   ` John Parker
2013-11-27 20:15     ` Eric Bénard
2013-11-27 20:54       ` Sascha Hauer
2013-11-28  4:16         ` Alexander Aring
2013-11-28  7:20           ` Sascha Hauer
2013-11-28  7:37             ` Alexander Aring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox