* Re: mtd mount problem
2005-04-21 9:17 mtd mount problem Marco Schramel
@ 2005-04-21 8:50 ` Eugene Surovegin
2005-04-21 9:44 ` Marco Schramel
2005-04-21 9:54 ` Daniel Ann
2005-04-21 10:32 ` Wolfgang Denk
2 siblings, 1 reply; 12+ messages in thread
From: Eugene Surovegin @ 2005-04-21 8:50 UTC (permalink / raw)
To: Marco Schramel; +Cc: PPC_LINUX
On Thu, Apr 21, 2005 at 11:17:25AM +0200, Marco Schramel wrote:
> Hi all,
>
> in our system (MPC8270, 2.4.25) i can't mount the mtd devices (two AM29LV256MH)
>
> I created a map based on tqm8260.c. I can use the "eraseall" command and i can write the mtdx devices.
> But if i try to mount the mtd devices (jffs or jffs2) then it fails.
> Output:
> The eraseall command
> /dev # eraseall /dev/mtd1
> MTD_open
> MTD_ioctl
> MTD_write
> Erased 8192 Kibyte @ 0 -- 100% complete.
> MTD_close
>
> try to write
> /dev # date > /dev/mtd1
> MTD_open
> MTD_ioctl
> MTD_write
> MTD_close
>
> ok, now try onesmore
> /dev # date > /dev/mtd1
> MTD_open
> MTD_ioctl
> MTD_write
> MTD do_write_buffer(): software timeout
> MTD_close
> /dev #
>
> It all seems to be fine, but...
>
> dev # mount -t jffs2 /dev/mtdblock1 /mnt/Flash1
> mount: Mounting /dev/mtdblock1 on /mnt/Flash1 failed: No such device
>
> I checked out the Majors of my ramdisk, they are ok.
ramdisk? why?
Check that you have CONFIG_MTD_BLOCK enabled in your .config.
Also, check that you have /dev/mtdblock1 node in /dev directory on the
target.
--
Eugene
^ permalink raw reply [flat|nested] 12+ messages in thread
* mtd mount problem
@ 2005-04-21 9:17 Marco Schramel
2005-04-21 8:50 ` Eugene Surovegin
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Marco Schramel @ 2005-04-21 9:17 UTC (permalink / raw)
To: PPC_LINUX
Hi all,
in our system (MPC8270, 2.4.25) i can't mount the mtd devices (two AM29LV256MH)
I created a map based on tqm8260.c. I can use the "eraseall" command and i can write the mtdx devices.
But if i try to mount the mtd devices (jffs or jffs2) then it fails.
Output:
The eraseall command
/dev # eraseall /dev/mtd1
MTD_open
MTD_ioctl
MTD_write
Erased 8192 Kibyte @ 0 -- 100% complete.
MTD_close
try to write
/dev # date > /dev/mtd1
MTD_open
MTD_ioctl
MTD_write
MTD_close
ok, now try onesmore
/dev # date > /dev/mtd1
MTD_open
MTD_ioctl
MTD_write
MTD do_write_buffer(): software timeout
MTD_close
/dev #
It all seems to be fine, but...
dev # mount -t jffs2 /dev/mtdblock1 /mnt/Flash1
mount: Mounting /dev/mtdblock1 on /mnt/Flash1 failed: No such device
I checked out the Majors of my ramdisk, they are ok.
Any ideas.
Best regards and thank you in advance.
Marco
--
---------
Marco Schramel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-21 8:50 ` Eugene Surovegin
@ 2005-04-21 9:44 ` Marco Schramel
2005-04-21 15:47 ` Eugene Surovegin
0 siblings, 1 reply; 12+ messages in thread
From: Marco Schramel @ 2005-04-21 9:44 UTC (permalink / raw)
To: Eugene Surovegin; +Cc: PPC_LINUX
Hi Eugene,
thanks for your answer
> Check that you have CONFIG_MTD_BLOCK enabled in your .config.
#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
CONFIG_MTD_DEBUG=y
CONFIG_MTD_DEBUG_VERBOSE=0
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_CONCAT is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
>
> Also, check that you have /dev/mtdblock1 node in /dev directory on the
> target.
>
This is what i meant before with ramdisk.
/dev # ls -al mtdblock1
brw-rw-r-- 1 root root 31, 1 Mar 17 2005 mtdblock1
It should be ok. Isn't it ??
Thanks
Marco
--
---------
Marco Schramel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-21 9:17 mtd mount problem Marco Schramel
2005-04-21 8:50 ` Eugene Surovegin
@ 2005-04-21 9:54 ` Daniel Ann
2005-04-21 10:32 ` Wolfgang Denk
2 siblings, 0 replies; 12+ messages in thread
From: Daniel Ann @ 2005-04-21 9:54 UTC (permalink / raw)
To: Marco Schramel; +Cc: PPC_LINUX
On 4/21/05, Marco Schramel <Schramel.Linux@go.bartec.de> wrote:
> It all seems to be fine, but...
>=20
> dev # mount -t jffs2 /dev/mtdblock1 /mnt/Flash1
> mount: Mounting /dev/mtdblock1 on /mnt/Flash1 failed: No such device
Shouldnt you be doing eraseall first ? It seems to me, you were
writing output of date to the flash earlier.
If you get No such device, it maybe that your configuration of bus
width, and base address could be wrong. (I take it that you did
configure the physmap)
--=20
Daniel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-21 9:17 mtd mount problem Marco Schramel
2005-04-21 8:50 ` Eugene Surovegin
2005-04-21 9:54 ` Daniel Ann
@ 2005-04-21 10:32 ` Wolfgang Denk
2005-04-21 13:02 ` Marco Schramel
2005-04-21 14:44 ` Kylo Ginsberg
2 siblings, 2 replies; 12+ messages in thread
From: Wolfgang Denk @ 2005-04-21 10:32 UTC (permalink / raw)
To: Marco Schramel; +Cc: PPC_LINUX
In message <200504211117.25584.Schramel.Linux@go.bartec.de> you wrote:
>
> /dev # date > /dev/mtd1
> MTD_open
> MTD_ioctl
> MTD_write
> MTD do_write_buffer(): software timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR ERROR ERROR ERROR ERROR ERROR ERROR
> MTD_close
> /dev #
>
> It all seems to be fine, but...
I disagree. There was a pretty clear error message above. Don't
ignore this, it will bite you later.
> dev # mount -t jffs2 /dev/mtdblock1 /mnt/Flash1
> mount: Mounting /dev/mtdblock1 on /mnt/Flash1 failed: No such device
Assuming that this is a mount builtin to the busybox, this message
means that there is no such file as "/dev/mtdblock1" in your root
file system - exactly as the error message says.
> I checked out the Majors of my ramdisk, they are ok.
What has a ramdisk to do with this?
What does "cat /proc/mtd" show? What are the kernel boot messages
look like?
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"It was the Law of the Sea, they said. Civilization ends at the wa-
terline. Beyond that, we all enter the food chain, and not always
right at the top." - Hunter S. Thompson
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-21 10:32 ` Wolfgang Denk
@ 2005-04-21 13:02 ` Marco Schramel
2005-04-22 1:31 ` Jörn Engel
2005-04-21 14:44 ` Kylo Ginsberg
1 sibling, 1 reply; 12+ messages in thread
From: Marco Schramel @ 2005-04-21 13:02 UTC (permalink / raw)
To: PPC_LINUX
Hi,
> >
> > /dev # date > /dev/mtd1
> > MTD_open
> > MTD_ioctl
> > MTD_write
> > MTD do_write_buffer(): software timeout
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ERROR ERROR ERROR ERROR ERROR ERROR ERROR
This only occurs if i write the second time to the flash memory without erasing it before.
> What has a ramdisk to do with this?
I wrote in a message later, that i meant the /dev nodes in this case.
> What does "cat /proc/mtd" show? What are the kernel boot messages
> look like?
>
mtd0: 01000000 00020000 "JFFS2 partition 1"
mtd1: 00800000 00020000 "JFFS2 partition 2"
mtd2: 00400000 00020000 "RAMDISK "
mtd3: 00300000 00020000 "kernel image 2_4"
mtd4: 00100000 00020000 "Das U-Boot "
Best regards
Marco
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-21 10:32 ` Wolfgang Denk
2005-04-21 13:02 ` Marco Schramel
@ 2005-04-21 14:44 ` Kylo Ginsberg
1 sibling, 0 replies; 12+ messages in thread
From: Kylo Ginsberg @ 2005-04-21 14:44 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: PPC_LINUX
On 4/21/05, Wolfgang Denk <wd@denx.de> wrote:
> > dev # mount -t jffs2 /dev/mtdblock1 /mnt/Flash1
> > mount: Mounting /dev/mtdblock1 on /mnt/Flash1 failed: No such device
>=20
> Assuming that this is a mount builtin to the busybox, this message
> means that there is no such file as "/dev/mtdblock1" in your root
> file system - exactly as the error message says.
I believe you can also get "No such device" if you haven't configured
linux for JFFS2 support; another thing to double check in your
.config.
Cheers,
Kylo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-21 9:44 ` Marco Schramel
@ 2005-04-21 15:47 ` Eugene Surovegin
0 siblings, 0 replies; 12+ messages in thread
From: Eugene Surovegin @ 2005-04-21 15:47 UTC (permalink / raw)
To: Marco Schramel; +Cc: PPC_LINUX
On Thu, Apr 21, 2005 at 11:44:28AM +0200, Marco Schramel wrote:
> Hi Eugene,
>
> thanks for your answer
>
> > Check that you have CONFIG_MTD_BLOCK enabled in your .config.
> #
> # Memory Technology Devices (MTD)
> #
> CONFIG_MTD=y
> CONFIG_MTD_DEBUG=y
> CONFIG_MTD_DEBUG_VERBOSE=0
> CONFIG_MTD_PARTITIONS=y
> # CONFIG_MTD_CONCAT is not set
> # CONFIG_MTD_REDBOOT_PARTS is not set
> # CONFIG_MTD_CMDLINE_PARTS is not set
> CONFIG_MTD_CHAR=y
> CONFIG_MTD_BLOCK=y
> # CONFIG_FTL is not set
> # CONFIG_NFTL is not set
> # CONFIG_INFTL is not set
>
> >
> > Also, check that you have /dev/mtdblock1 node in /dev directory on the
> > target.
> >
>
> This is what i meant before with ramdisk.
>
> /dev # ls -al mtdblock1
> brw-rw-r-- 1 root root 31, 1 Mar 17 2005 mtdblock1
>
> It should be ok. Isn't it ??
Hmm, yes, provided you have also jffs2 enabled, but I'd expect
different error message if not.
Could you show us dmesg output, and also `cat /proc/devices`?
--
Eugene
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-21 13:02 ` Marco Schramel
@ 2005-04-22 1:31 ` Jörn Engel
2005-04-22 1:53 ` Eugene Surovegin
0 siblings, 1 reply; 12+ messages in thread
From: Jörn Engel @ 2005-04-22 1:31 UTC (permalink / raw)
To: Marco Schramel; +Cc: PPC_LINUX
On Thu, 21 April 2005 15:02:48 +0200, Marco Schramel wrote:
>
> > > /dev # date > /dev/mtd1
> > > MTD_open
> > > MTD_ioctl
> > > MTD_write
> > > MTD do_write_buffer(): software timeout
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > ERROR ERROR ERROR ERROR ERROR ERROR ERROR
>
> This only occurs if i write the second time to the flash memory without erasing it before.
That's harmless. Flash is a write-once medium between erases.
Your setup appears sane in principle, so there must me a subtle
mistake you made (bugs are out of the question of course ;). Missing
a real howto, let me run through the sequence:
1. Erase the flash partition. Either
o eraseall /dev/mtdX or
o cat file_filled_with_0xff > /dev/mtdblockX
2. Do *not* write anything to it afterwards. Jffs2 would just error
out.
3. Mount jffs2. Either
o mount mtdX -t jffs2 <mount_point> or
o mount /dev/mtdblockX -t jffs2 <mount_point>
Jörn
--
The grand essentials of happiness are: something to do, something to
love, and something to hope for.
-- Allan K. Chalmers
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-22 1:31 ` Jörn Engel
@ 2005-04-22 1:53 ` Eugene Surovegin
2005-04-22 1:55 ` Eugene Surovegin
0 siblings, 1 reply; 12+ messages in thread
From: Eugene Surovegin @ 2005-04-22 1:53 UTC (permalink / raw)
To: J?rn Engel; +Cc: PPC_LINUX
On Fri, Apr 22, 2005 at 03:31:34AM +0200, J?rn Engel wrote:
[snip]
> 1. Erase the flash partition. Either
> o eraseall /dev/mtdX or
> o cat file_filled_with_0xff > /dev/mtdblockX
Huh? I fail to see how options you listed are equivalent. By
"cat"ing file filled with 0xff you cannot erase flash, period.
Only eraseall (or erase, if partition occupies 1 erase block) flash
can be erased.
--
Eugene
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-22 1:53 ` Eugene Surovegin
@ 2005-04-22 1:55 ` Eugene Surovegin
2005-04-22 2:11 ` Jörn Engel
0 siblings, 1 reply; 12+ messages in thread
From: Eugene Surovegin @ 2005-04-22 1:55 UTC (permalink / raw)
To: J?rn Engel, Marco Schramel, PPC_LINUX
On Thu, Apr 21, 2005 at 06:53:37PM -0700, Eugene Surovegin wrote:
> On Fri, Apr 22, 2005 at 03:31:34AM +0200, J?rn Engel wrote:
>
> [snip]
>
> > 1. Erase the flash partition. Either
> > o eraseall /dev/mtdX or
> > o cat file_filled_with_0xff > /dev/mtdblockX
>
> Huh? I fail to see how options you listed are equivalent. By
> "cat"ing file filled with 0xff you cannot erase flash, period.
>
> Only eraseall (or erase, if partition occupies 1 erase block) flash
> can be erased.
Oops, sorry, I failed to notice /dev/mtdblockX. Stupid me. Ignore this
noise.
--
Eugene
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: mtd mount problem
2005-04-22 1:55 ` Eugene Surovegin
@ 2005-04-22 2:11 ` Jörn Engel
0 siblings, 0 replies; 12+ messages in thread
From: Jörn Engel @ 2005-04-22 2:11 UTC (permalink / raw)
To: Marco Schramel, PPC_LINUX
On Thu, 21 April 2005 18:55:52 -0700, Eugene Surovegin wrote:
> On Thu, Apr 21, 2005 at 06:53:37PM -0700, Eugene Surovegin wrote:
> > On Fri, Apr 22, 2005 at 03:31:34AM +0200, J?rn Engel wrote:
> >
> > [snip]
> >
> > > 1. Erase the flash partition. Either
> > > o eraseall /dev/mtdX or
> > > o cat file_filled_with_0xff > /dev/mtdblockX
> >
> > Huh? I fail to see how options you listed are equivalent. By
> > "cat"ing file filled with 0xff you cannot erase flash, period.
> >
> > Only eraseall (or erase, if partition occupies 1 erase block) flash
> > can be erased.
>
> Oops, sorry, I failed to notice /dev/mtdblockX. Stupid me. Ignore this
> noise.
Btw, I've also written a tool called 'ff' once. It will simply write
tons of 0xff to stdout. Rewriting the thing from scratch should be
slightly faster than me trying to look for the source (about 4 lines
of code?).
Jörn
--
My second remark is that our intellectual powers are rather geared to
master static relations and that our powers to visualize processes
evolving in time are relatively poorly developed.
-- Edsger W. Dijkstra
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-04-22 2:11 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-21 9:17 mtd mount problem Marco Schramel
2005-04-21 8:50 ` Eugene Surovegin
2005-04-21 9:44 ` Marco Schramel
2005-04-21 15:47 ` Eugene Surovegin
2005-04-21 9:54 ` Daniel Ann
2005-04-21 10:32 ` Wolfgang Denk
2005-04-21 13:02 ` Marco Schramel
2005-04-22 1:31 ` Jörn Engel
2005-04-22 1:53 ` Eugene Surovegin
2005-04-22 1:55 ` Eugene Surovegin
2005-04-22 2:11 ` Jörn Engel
2005-04-21 14:44 ` Kylo Ginsberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).