From: David Woodhouse <dwmw2@infradead.org>
To: Patrick Higgins <phiggins@transzap.com>
Cc: mtd@infradead.org
Subject: Re: Write support
Date: Thu, 18 May 2000 10:29:57 +0100 [thread overview]
Message-ID: <15757.958642197@devel2.axiom.internal> (raw)
In-Reply-To: <Pine.LNX.4.21.0005171506400.17790-100000@phiggins.transzap.com>
phiggins@transzap.com said:
> I missed the -DCONFIG_NFTL_RW option to gcc.
Hmmm. I'd quite it not to let you remount RW when write support isn't
present. However, I can even do it with a read-only floppy disc, so I
assume that deeper magic would be required.
> The driver also detects two Disk on Chips, although I only have one,
> as seen in the following console output:
Hmmm. Your hardware doesn't seem to be decoding all the address lines; so
the DiskOnChip appears at both 0xd8000 and 0xda000.
We need to eliminate duplicates - which means that the code in which you
fixed the NULL pointer dereference needs to be made stricter - it needs to
verify not only that our potential new DiskOnChip isn't at the same
location as any of the old ones, but also that it's not the same hardware
in a different location.
I'm not sure how to do this off-hand - possibly by writing to an
unimportant register in one, and seeing if it changes in the other.
If you don't want to do that right now, just remove one of the two
addresses from the doc_locations list in your copy of docprobe.c
phiggins@transzap.com said:
> NFTL capacity reduced for geometry reasons from bba0 to bb80 sectors
Now this I disapprove of. I thought I was using exactly the same method for
calculating geometry as they did. Could you load M-Systems' driver and tell
me what geometry it reports, along with the geometry reported by my code?
phiggins@transzap.com said:
> I know you said earlier that the .exb files are not straight firmware
> images. Do you know what format they are in, and how to convert them?
IIRC the IPL ROM loads the first 0x2000 bytes of the firmware only from the
'left-hand-side' of the first 0x4000 bytes of the actual flash - using 256
bytes of each 512-byte page. After that, the whole of the flash is used.
Therefore, I assume that the EXB files can be converted by something like...
u_char buf[512];
long c=0;
memset(buf,0xff, 512);
while (c<0x2000) {
read(exbfile, buf, 256);
write(flash, buf, 512);
}
while (!eof(exbfile)) {
read(exbfile, buf, 512);
write(flash, buf, 512);
}
The dd utility could also do this for you without much difficulty, allowing
you to then feed your converted firmware file to doc_loadbios.
You could confirm this by using the DOS utility to load the firmware once,
then using dd to read it back off the raw flash (/dev/mtd0). Even if you
can't work out the conversion from the original EXB file, you'll then have
a firmware image that _is_ just an image of what to put on the flash, and
hence can be used with doc_loadbios.
phiggins@transzap.com said:
> How much work do you estimate would be required to get grub working,
> and what advantages and disadvantages would it have in comparison to
> lilo and syslinux?
The advantage of Grub once it's done is that it would be capable of
driving the DiskOnChip directly - you wouldn't need to work around the
problems with the M-Systems firmware using up all your precious sub-640K
RAM.
It's already capable of finding and driving the hardware, and scanning for
an NFTL Media Header. All that remains is to transplant some simple
read-only NFTL support from the existing code in nftl.c - I reckon not a
lot more than a couple of days' work.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
next prev parent reply other threads:[~2000-05-18 9:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-17 21:33 Write support Patrick Higgins
2000-05-18 9:29 ` David Woodhouse [this message]
[not found] <29190.958995911@devel2.axiom.internal>
2000-05-22 18:47 ` Patrick Higgins
[not found] <14634.41505.90854.754749@jodie.lucid>
2000-05-23 17:43 ` Patrick Higgins
2000-05-23 17:56 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15757.958642197@devel2.axiom.internal \
--to=dwmw2@infradead.org \
--cc=mtd@infradead.org \
--cc=phiggins@transzap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox