Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Strange MTD problem (ARM)
  2009-12-07  8:36 [Buildroot] Strange MTD problem (ARM) Joachim Pihl
@ 2009-12-07  8:34 ` Peter Korsgaard
  2009-12-07  8:52   ` Joachim Pihl
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2009-12-07  8:34 UTC (permalink / raw)
  To: buildroot

>>>>> "Joachim" == Joachim Pihl <jpihl@nevion.com> writes:

 Joachim> This may not be related to Buildroot, but I am completely stumped:

I take it that this is with busybox cp and not coreutils? You might have
better luck asking on the busybox list.

 Joachim> # cp mtdblock2 /dev/mtdblock2

So you want cp to detect that the target is a special file and not
unlink it, but instead do something like cat mtdblock2 >/dev/mtdblock2 ?

Why not simply use cat instead?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] Strange MTD problem (ARM)
@ 2009-12-07  8:36 Joachim Pihl
  2009-12-07  8:34 ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Joachim Pihl @ 2009-12-07  8:36 UTC (permalink / raw)
  To: buildroot


This may not be related to Buildroot, but I am completely stumped:

# ls -al /dev/mtdblock*
brw-r-----    1 root     root      31,   0 Dec  3 12:26 mtdblock0
brw-r-----    1 root     root      31,   1 Dec  3 12:26 mtdblock1
brw-r-----    1 root     root      31,   2 Dec  3 12:26 mtdblock2
brw-r-----    1 root     root      31,   3 Dec  3 12:26 mtdblock3
#
#
#
# cp mtdblock2 /dev/mtdblock2
#
# ls -al /dev/mtdblock*
brw-r-----    1 root     root      31,   0 Dec  3 12:26 mtdblock0
brw-r-----    1 root     root      31,   1 Dec  3 12:26 mtdblock1
-rw-r--r--    1 root     root      6815744 Dec  7 17:58 mtdblock2
brw-r-----    1 root     root      31,   3 Dec  3 12:26 mtdblock3
#


Running 2009.11 on PXA255 with a 2.6.27.39 preemptible kernel, EABI,  
running the same patches used for 2.6.27.10 (OABI and non-preemptible)  
where it worked.

mtd_debug write /dev/mtd2 0 0x680000 mtdblock2 works, results does not  
seems correct for /dev/mtd1.


Does anyone know where to look, so far I strike out on the google searches.

-- 
Joachim Pihl
Senior R&D Engineer
Nevion Europe

Tel: +47 33 48 94 66
Fax: +47 33 48 99 98
Mobile: +47 91 33 98 91
jpihl at nevion.com
www.nevion.com

------------------------------------------------------
The Global Video Transport Leader
------------------------------------------------------

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

* [Buildroot] Strange MTD problem (ARM)
  2009-12-07  8:34 ` Peter Korsgaard
@ 2009-12-07  8:52   ` Joachim Pihl
  2009-12-07  8:57     ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Joachim Pihl @ 2009-12-07  8:52 UTC (permalink / raw)
  To: buildroot

On Mon, 07 Dec 2009 09:34:25 +0100, Peter Korsgaard <jacmet@uclibc.org>  
wrote:

>>>>>> "Joachim" == Joachim Pihl <jpihl@nevion.com> writes:
>
>  Joachim> This may not be related to Buildroot, but I am completely  
> stumped:
>
> I take it that this is with busybox cp and not coreutils? You might have
> better luck asking on the busybox list.

This is with busybox, yes. Will repost to the busybox list and see what  
comes up.


>  Joachim> # cp mtdblock2 /dev/mtdblock2
>
> So you want cp to detect that the target is a special file and not
> unlink it, but instead do something like cat mtdblock2 >/dev/mtdblock2 ?
>
> Why not simply use cat instead?

Actually, I have never thought of that, but will that start from the  
beginning of the MTD block? We have used "cp mtdblock2 /dev/mtdblock2" for  
7 years in the product, this is the first time I have seen it fail.


-- 
Joachim Pihl
Senior R&D Engineer
Nevion

Tel: +47 33 48 94 66
Fax: +47 33 48 99 98
Mobile: +47 91 33 98 91
jpihl at nevion.com
www.nevion.com

-----------------------------------
The Global Video Transport Leader
-----------------------------------

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

* [Buildroot] Strange MTD problem (ARM)
  2009-12-07  8:52   ` Joachim Pihl
@ 2009-12-07  8:57     ` Peter Korsgaard
  2009-12-07  9:17       ` Joachim Pihl
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2009-12-07  8:57 UTC (permalink / raw)
  To: buildroot

>>>>> "Joachim" == Joachim Pihl <jpihl@nevion.com> writes:

Hi,

 >> I take it that this is with busybox cp and not coreutils? You might have
 >> better luck asking on the busybox list.

 Joachim> This is with busybox, yes. Will repost to the busybox list and see
 Joachim> what comes up.

Ok.

 >> Why not simply use cat instead?

 Joachim> Actually, I have never thought of that, but will that start from the
 Joachim> beginning of the MTD block?

Yes it will.

 Joachim> We have used "cp mtdblock2 /dev/mtdblock2" for 7 years in the
 Joachim> product, this is the first time I have seen it fail.

OK. FYI, busybox nowadays also has the flashcp applet from mtd-utils
which does the right thing.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] Strange MTD problem (ARM)
  2009-12-07  8:57     ` Peter Korsgaard
@ 2009-12-07  9:17       ` Joachim Pihl
  2009-12-07  9:28         ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Joachim Pihl @ 2009-12-07  9:17 UTC (permalink / raw)
  To: buildroot

On Mon, 07 Dec 2009 09:57:00 +0100, Peter Korsgaard <jacmet@uclibc.org>  
wrote:

>>>>>> "Joachim" == Joachim Pihl <jpihl@nevion.com> writes:

>  Joachim> We have used "cp mtdblock2 /dev/mtdblock2" for 7 years in the
>  Joachim> product, this is the first time I have seen it fail.
>
> OK. FYI, busybox nowadays also has the flashcp applet from mtd-utils
> which does the right thing.

Thanks, that solved the problem. Will simply replace "cp mtdblock2  
/dev/mtdblock2" with "flashcp mtdblock2 /dev/mtd2" and all is well.


-- 
Joachim Pihl
Senior R&D Engineer
Nevion

Tel: +47 33 48 94 66
Fax: +47 33 48 99 98
Mobile: +47 91 33 98 91
jpihl at nevion.com
www.nevion.com

-----------------------------------
The Global Video Transport Leader
-----------------------------------

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

* [Buildroot] Strange MTD problem (ARM)
  2009-12-07  9:17       ` Joachim Pihl
@ 2009-12-07  9:28         ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2009-12-07  9:28 UTC (permalink / raw)
  To: buildroot

>>>>> "Joachim" == Joachim Pihl <jpihl@nevion.com> writes:

Hi,

 >> OK. FYI, busybox nowadays also has the flashcp applet from mtd-utils
 >> which does the right thing.

 Joachim> Thanks, that solved the problem. Will simply replace "cp mtdblock2
 Joachim> /dev/mtdblock2" with "flashcp mtdblock2 /dev/mtd2" and all is well.

Ok, but please still bring it up on the busybox list if it is a cp
regression.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2009-12-07  9:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07  8:36 [Buildroot] Strange MTD problem (ARM) Joachim Pihl
2009-12-07  8:34 ` Peter Korsgaard
2009-12-07  8:52   ` Joachim Pihl
2009-12-07  8:57     ` Peter Korsgaard
2009-12-07  9:17       ` Joachim Pihl
2009-12-07  9:28         ` Peter Korsgaard

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