public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* DOC2000 erase size of 16k?
@ 2001-08-12 23:33 pla
  2001-08-12 23:46 ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: pla @ 2001-08-12 23:33 UTC (permalink / raw)
  To: linux-mtd

I have a problem with a DOC2000.  I use the 2.4.5 kernel, and the
20010807 MTD snapshot for the utils.
 
Everything goes just fine at boot.  The NFTL driver reports
"Could not find valid boot record."
"Could not mount NFTL device."
Okay, I think, not a problem, the MTD-JFFS HowTo specifically
says to run nftl_format for that problem.
 
Now for the problem... nftl_format reports "Erase size not
8Kb - I'm confused".  I do a "cat /proc/mtd", and it shows
me "mtd0: 02000000 "DiskOnChip 2000".  Note the lack of an
erase size in there (someone posted about a similar problem
about two months ago, with no replies, but he also reported
an odd boot message from the MTD driver).
 
So, I quickly hacked nftl_format.c to show me what *it* sees as
the erase size, and it tells me 16K.
 
Anyone have any ideas?  In case it matters, I use devfs, but had
no problems with it recognizing the DiskOnChip or any "normal"
devices.
 
Thank you.
 
 
 
                                      - Ben

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

* Re: DOC2000 erase size of 16k?
  2001-08-12 23:33 pla
@ 2001-08-12 23:46 ` David Woodhouse
  2001-08-13 14:40   ` Vipin Malik
  0 siblings, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2001-08-12 23:46 UTC (permalink / raw)
  To: pla; +Cc: linux-mtd

pla@tmok.com said:
> I have a problem with a DOC2000.  I use the 2.4.5 kernel, and the
> 20010807 MTD snapshot for the utils. 

Use the latest code. It may fix it.


pla@tmok.com said:
> Okay, I think, not a problem, the MTD-JFFS HowTo specifically says to
> run nftl_format for that problem. 

It shouldn't. Never run nftl_format unless you really have to.

--
dwmw2

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

* Re: DOC2000 erase size of 16k?
@ 2001-08-13  1:29 pla
  2001-08-13  7:37 ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: pla @ 2001-08-13  1:29 UTC (permalink / raw)
  To: linux-mtd

> Use the latest code. It may fix it.

Ah, many thanks.  the 2.4.8 kernel made all my problems magically go
away, how wonderful!  (Guess I should have paid more attention to
the kernel changelogs, my bad).
 
Now on to the fun of getting GRUB to work as the DOC firmware (I don't
suppose anyone's written a more detailed guide than the 4-step README
in mtd/grub?  Such as, where does an 80k stage2 go when the DOC
firmware region only holds 48k?  <G>)
 
 
 
                                  - Ben

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

* Re: DOC2000 erase size of 16k?
  2001-08-13  1:29 pla
@ 2001-08-13  7:37 ` David Woodhouse
  0 siblings, 0 replies; 8+ messages in thread
From: David Woodhouse @ 2001-08-13  7:37 UTC (permalink / raw)
  To: pla; +Cc: linux-mtd

pla@tmok.com said:
>  Ah, many thanks.  the 2.4.8 kernel made all my problems magically go
> away, how wonderful!  (Guess I should have paid more attention to the
> kernel changelogs, my bad).

Er, that code is older than the 20010807 snapshot you said you were using. 
I meant the latest code from my CVS. I'm slightly concerned that the older 
code works when the newer code doesn't - it's supposed to work the other 
way round. Can you check the latest code and make sure it works there too?

>   Now on to the fun of getting GRUB to work as the DOC firmware (I
> don't suppose anyone's written a more detailed guide than the 4-step
> README in mtd/grub?  Such as, where does an 80k stage2 go when the DOC
> firmware region only holds 48k?  <G>)

It doesn't work perfectly yet, although it shouldn't take much to fix it.
To make it fit, you have to use nftl_format to make the NFTL start further 
in to the device.


--
dwmw2

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

* Re: DOC2000 erase size of 16k?
  2001-08-12 23:46 ` David Woodhouse
@ 2001-08-13 14:40   ` Vipin Malik
  0 siblings, 0 replies; 8+ messages in thread
From: Vipin Malik @ 2001-08-13 14:40 UTC (permalink / raw)
  To: David Woodhouse; +Cc: pla, linux-mtd

David Woodhouse wrote:

> pla@tmok.com said:
> > Okay, I think, not a problem, the MTD-JFFS HowTo specifically says to
> > run nftl_format for that problem.
>
> It shouldn't. Never run nftl_format unless you really have to.

I've seen a couple of other folks being confused by this issue- and I
guess that I'm to blame (as I put it there).
Since it's been a LONG time since I last played with DOC, I don't remember
anything re. using them anymore :)

Could you please correct the HOWTO with what to do instead (if the DOC
format is screwed up etc.)?

Thanks

Vipin

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

* Re: DOC2000 erase size of 16k?
@ 2001-08-13 19:25 pla
  2001-08-13 23:56 ` David Woodhouse
  0 siblings, 1 reply; 8+ messages in thread
From: pla @ 2001-08-13 19:25 UTC (permalink / raw)
  To: linux-mtd

> Er, that code is older than the 20010807 snapshot you said you were using. 
> I meant the latest code from my CVS. I'm slightly concerned that the older 
> code works when the newer code doesn't - it's supposed to work the other 
> way round. Can you check the latest code and make sure it works there too?

Hmm, yes, the 20010812 snapshot works correctly.  I just diff'd the two
snapshots, and would have to say that the problems I experienced did not
result from anything in the MTD code, so don't trouble yourself with
what went wrong.  I must have accidentally whacked something without
noticing.  My apologies for wasting your time.
 

> It doesn't work perfectly yet, although it shouldn't take much to fix it.
> To make it fit, you have to use nftl_format to make the NFTL start further 
> in to the device.

Ah!  Now I see how this all fits together.  Many thanks, and I will
certainly write up my experiences for the HowTo.  Incidentally, for
anyone else trying this, it would serve them well to back up the
bad blocks section of their DOC before doing *anything*.  I seem
to have killed my DOC by overwriting it, without a backup (fortunately,
I can just get another from work, but not everyone has that
luxury).
 
 
 
                              - Ben

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

* Re: DOC2000 erase size of 16k?
  2001-08-13 19:25 DOC2000 erase size of 16k? pla
@ 2001-08-13 23:56 ` David Woodhouse
  0 siblings, 0 replies; 8+ messages in thread
From: David Woodhouse @ 2001-08-13 23:56 UTC (permalink / raw)
  To: pla; +Cc: linux-mtd

pla@tmok.com said:
>  Ah!  Now I see how this all fits together.  Many thanks, and I will
> certainly write up my experiences for the HowTo.  Incidentally, for
> anyone else trying this, it would serve them well to back up the bad
> blocks section of their DOC before doing *anything*.  I seem to have
> killed my DOC by overwriting it, without a backup (fortunately, I can
> just get another from work, but not everyone has that luxury).

I don't believe it's possible to really kill the hardware. Just unwise to 
lose the factory-programmed information about bad sectors. We could fix 
nftl_format to preserve that information, and probably should do so quite 
soon.

What failure mode are you seeing with it now?

--
dwmw2

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

* Re: DOC2000 erase size of 16k?
@ 2001-08-14  1:40 pla
  0 siblings, 0 replies; 8+ messages in thread
From: pla @ 2001-08-14  1:40 UTC (permalink / raw)
  To: linux-mtd

> What failure mode are you seeing with it now?

Well, under Linux, the MTD driver sees it, but the NFTL layer reports
it as unrecognized and doesn't see any partitions on it (and as a
result, I have no /dev/nftl, since I use devfs).  Under DOS, the
"official" DOC utils report a couple of curious errors, but in no
case will they cooperate and fix it as worked in the past.  Incidentally,
I have had email correspondence with tech support at MSystems, and
they suggested that I have it replaced (as in, for free, so not just
trying to get me to buy another one) after I described the output
of the DOS utils and tried a few things.  Perhaps I should actually
consider the possibility that I simply had a bad chip.
 
If it helps, I will describe exactly what I did, and you can see if
I did anything blatantly stupid (though for the most part I followed
the MTD-JFFS HowTo):
 
    1) Built a totally-minimal 2.4.5 kernel with the 20010807 MTD
       drivers included (most likely, as I mentioned, I may have
       accidentally broken the MTD part).
    2) Threw together a 1-disk boot/root combo with busybox, tinylogin,
       and the MTD utils.
    3) tried running "nftl_format /dev/mtd/0", it complained about the
       erase size.
    4) "fixed" nftl_format to tell me what it saw as the erase size,
       then again to do the format anyway.  (1st major DOC failure)
    5) used the DOS DOC utils to reinstall the stock 4.2 firmware and
       freshly format it.
    6) Upgraded to the 2.4.8 kernel, which saw everything just fine,
       then to the 20010812 MTD snapshot, everything still fine.
    7) built the grub DOC firmware image and invoked the command
       "doc_loadbios /dev/mtd0 grub_firmware" as instructed by the
       HowTo. (2nd major DOC failure, never recovered)
    8) Contacted MSystems tech support to see if they knew of an
       easy fix for what I'd done.
    9) After a few rounds with tech support (very friendly, incidentally),
       simply replaced the seemingly-dead DOC with another I had.  The
       new one works just fine, though I've not yet tried to use GRUB
       as its boot-image.
 
I apologize for the length of this, and if you've grown tired of
reading about my careless mistakes, I really don't mind writing
this one off.  I've installed a new DOC, and moved on.  (I still
need to get GRUB working, so I doubt you've heard the last from
me, but... <G>)
 
 
  
                                        - Ben

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

end of thread, other threads:[~2001-08-14  1:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-13 19:25 DOC2000 erase size of 16k? pla
2001-08-13 23:56 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2001-08-14  1:40 pla
2001-08-13  1:29 pla
2001-08-13  7:37 ` David Woodhouse
2001-08-12 23:33 pla
2001-08-12 23:46 ` David Woodhouse
2001-08-13 14:40   ` Vipin Malik

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