mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* barebox tftp to 2k pagesize NAND
@ 2010-05-25 12:14 Eric Bénard
  2010-05-25 13:18 ` Sascha Hauer
  2010-05-26 12:25 ` Ivo Clarysse
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Bénard @ 2010-05-25 12:14 UTC (permalink / raw)
  To: barebox

Hi,

while running barebox on a i.MX25 which has 2k pagesize nand, I noticed 
it's not possible to do a tftp directly to NAND (tftp barebox.bin 
/dev/nand0.barebox for example).

tftp try to write 512bytes packets to the NAND thus we get :
offset 0x00000200 not page aligned
when it tries to write the second packet.

The workaround is :
tftp to ram
cp ram => nand

Do you have any idea on how tof ix this problem ?

Thanks,
Eric

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

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

* Re: barebox tftp to 2k pagesize NAND
  2010-05-25 12:14 barebox tftp to 2k pagesize NAND Eric Bénard
@ 2010-05-25 13:18 ` Sascha Hauer
  2010-05-25 13:27   ` Eric Bénard
  2010-05-26 12:25 ` Ivo Clarysse
  1 sibling, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2010-05-25 13:18 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Tue, May 25, 2010 at 02:14:15PM +0200, Eric Bénard wrote:
> Hi,
>
> while running barebox on a i.MX25 which has 2k pagesize nand, I noticed  
> it's not possible to do a tftp directly to NAND (tftp barebox.bin  
> /dev/nand0.barebox for example).
>
> tftp try to write 512bytes packets to the NAND thus we get :
> offset 0x00000200 not page aligned
> when it tries to write the second packet.
>
> The workaround is :
> tftp to ram
> cp ram => nand
>
> Do you have any idea on how tof ix this problem ?

Use /dev/nand0.barebox.bb instead. You are not supposed to use the non
bad block aware devices directly.

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

* Re: barebox tftp to 2k pagesize NAND
  2010-05-25 13:18 ` Sascha Hauer
@ 2010-05-25 13:27   ` Eric Bénard
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Bénard @ 2010-05-25 13:27 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Le 25/05/2010 15:18, Sascha Hauer a écrit :
> Use /dev/nand0.barebox.bb instead. You are not supposed to use the non
> bad block aware devices directly.
>
OK, this works fine by using .bb device

Many thanks,
Eric

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

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

* Re: barebox tftp to 2k pagesize NAND
  2010-05-25 12:14 barebox tftp to 2k pagesize NAND Eric Bénard
  2010-05-25 13:18 ` Sascha Hauer
@ 2010-05-26 12:25 ` Ivo Clarysse
  2010-05-26 12:52   ` Eric Bénard
  1 sibling, 1 reply; 5+ messages in thread
From: Ivo Clarysse @ 2010-05-26 12:25 UTC (permalink / raw)
  To: Eric Bénard, barebox

On Tue, May 25, 2010 at 2:14 PM, Eric Bénard <eric@eukrea.com> wrote:
[...]
> while running barebox on a i.MX25 which has 2k pagesize nand, I noticed it's
> not possible to do a tftp directly to NAND (tftp barebox.bin
> /dev/nand0.barebox for example).
[...]

Eric,

  Are you able to boot from 2k pagesize NAND ?

  I only have 512byte pagesize NAND, but shouldn't
nand_imx.c:imx_nand_load_image(..) have something
like:

#ifdef CONFIG_ARCH_IMX25
        if (readl(IMX_CCM_BASE + CCM_RCSR) & (1 << 8))
                host.pagesize_2k = 1;
        else
                host.pagesize_2k = 0;
#endif

(For mainline inclusion, I'd propose to rework that part, to group
i.MX25 with i.MX35, and i.MX21 with i.MX27)

Best regards,

Ivo.

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

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

* Re: barebox tftp to 2k pagesize NAND
  2010-05-26 12:25 ` Ivo Clarysse
@ 2010-05-26 12:52   ` Eric Bénard
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Bénard @ 2010-05-26 12:52 UTC (permalink / raw)
  To: Ivo Clarysse; +Cc: barebox

Hi Ivo,

Le 26/05/2010 14:25, Ivo Clarysse a écrit :
> On Tue, May 25, 2010 at 2:14 PM, Eric Bénard<eric@eukrea.com>  wrote:
> [...]
>> while running barebox on a i.MX25 which has 2k pagesize nand, I noticed it's
>> not possible to do a tftp directly to NAND (tftp barebox.bin
>> /dev/nand0.barebox for example).
> [...]
>
> Eric,
>
>    Are you able to boot from 2k pagesize NAND ?
>
yes but I'm using internal boot mode.

>    I only have 512byte pagesize NAND, but shouldn't
> nand_imx.c:imx_nand_load_image(..) have something
> like:
>
> #ifdef CONFIG_ARCH_IMX25
>          if (readl(IMX_CCM_BASE + CCM_RCSR)&  (1<<  8))
>                  host.pagesize_2k = 1;
>          else
>                  host.pagesize_2k = 0;
> #endif
>
yes something like this should be necessary for direct NAND boot.

Eric

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

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

end of thread, other threads:[~2010-05-26 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-25 12:14 barebox tftp to 2k pagesize NAND Eric Bénard
2010-05-25 13:18 ` Sascha Hauer
2010-05-25 13:27   ` Eric Bénard
2010-05-26 12:25 ` Ivo Clarysse
2010-05-26 12:52   ` Eric Bénard

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