* Booting from the flash
@ 2000-03-01 20:22 Dvir Oren
2000-03-01 22:09 ` Bill Roman
0 siblings, 1 reply; 3+ messages in thread
From: Dvir Oren @ 2000-03-01 20:22 UTC (permalink / raw)
To: MTD
It appears that nftl_format deletes M-Systems' firmware. I
remember that David wrote something about fixing that.
doc_loadbios seems to destroy the partition entirely. Neither M-
Systems' drivers nor MTD drivers can recognize anything on the
flash after doc_loadbios.
Is there a way to boot from a DOC2000 flash using MTD drivers?
[BTW: I was only successful at creating a 2.3 kernel with MTD
drivers. 2.2 kernels don't seem to work. I think I have an idea what
could be wrong, and I'll try to test it soon]
---------
Dvir Oren <dvir@lucidvon.com>
Lucid VON Ltd. <http://www.lucidvon.com>
9 Saloniki St., Tel-Aviv Israel
Tel: +972 3 644 3038 Fax: +972 3 644 3039
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Booting from the flash
2000-03-01 20:22 Booting from the flash Dvir Oren
@ 2000-03-01 22:09 ` Bill Roman
0 siblings, 0 replies; 3+ messages in thread
From: Bill Roman @ 2000-03-01 22:09 UTC (permalink / raw)
To: mtd
Dvir Oren wrote:
>
> It appears that nftl_format deletes M-Systems' firmware. I
> remember that David wrote something about fixing that.
> doc_loadbios seems to destroy the partition entirely. Neither M-
> Systems' drivers nor MTD drivers can recognize anything on the
> flash after doc_loadbios.
>
> Is there a way to boot from a DOC2000 flash using MTD drivers?
Yes, I've just gone through this. I've had mixed results resurrecting devices
after destroying their firmware this way: a 4 MB DiskOnChip 2000 was
recoverable, while a 2 MB unit was not.
What I learned is that doc_loadbios seems to need an image captured by "dd
if=/dev/mtd0 ...". Given this, I was able to destroy and reload the M-Systems
firmware on the 4 MB device. I confess, after the lack of success with the 2 MB
unit, I didn't try too hard to explore the failure modes in this process, so I'm
not promising it's foolproof.
Of course if that firmware is already gone, you can't capture an image of it! I
managed to get out of this situation by using the DOS utilities from M-Systems'
web site, and thrashing around booting Linux and DOS from a floppy. First, I
used the firmware image (DOC121.EXB) and doc_loadbios to load it. This isn't
enough to make the firmware work, but it's enough to persuade DUPDATE.EXE
(running under DOS, I didn't try dosemu) that the DiskOnChip is present so it
would write the firmware the right way.
After you've succeeded in restoring the boot code (or, preferably, before you've
destroyed it), dd it off of /dev/mtd0 to make an image that works with
doc_loadbios.
You avoid getting into this mess in the first place by supplying an offset of
49152 (48 * 1024) when doing nftl_format. For example:
nftl_format /dev/mtd0 49152
This leaves the firmware intact. Then insmod nftl.o, run fdisk to create a
partition, make a DOS filesystem on it with mkdosfs, and use syslinux to boot.
I put the necessary modules (doc2000.o, mtd.o, and nftl.o) on an initial RAM
disk image. This way I can access the flash to update the RAM disk image stored
there.
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Booting from the flash
@ 2000-03-02 10:37 jyllyj
0 siblings, 0 replies; 3+ messages in thread
From: jyllyj @ 2000-03-02 10:37 UTC (permalink / raw)
To: mtd
Dvir Oren wrote:
It appears that nftl_format deletes M-Systems' firmware. I
remember that David wrote something about fixing that.
doc_loadbios seems to destroy the partition entirely. Neither M-
Systems' drivers nor MTD drivers can recognize anything on the
flash after doc_loadbios.
Is there a way to boot from a DOC2000 flash using MTD drivers?
[BTW: I was only successful at creating a 2.3 kernel with MTD
drivers. 2.2 kernels don't seem to work. I think I have an idea what
could be wrong, and I'll try to test it soon]
in my case I had some experience about it
1:get mtd-20000131 release and grub from GNU's CVS
2:change doc_stage1.S like this
.......
3. Return, and wait for our INT 18h to be called.
*/
/* Store the DiskOnChip segment */
movw %ds, %cs:doc_seg
/* Find top of memory */
xorw %ax, %ax
movw %ax, %ds
movw 0x0413, %ax
/* Set up our shiny net INT 18h handler */
/* Steal 1K from the top */
decw %ax
movw %ax,0x0413
/* Generate segment address */
shlw $6,%ax
movw %ax,%es
/* Debug: print the address at which we're installing */
pushw %cs
popw %ds
/* Copy ourself into the new segment we've just reserved */
movw $0x80, %cx
cld
xorw %si,%si
xorw %di,%di
rep
movsw
xorw %ax, %ax
movw %ax, %ds
movw %es,0x0062
movw $int18,0x0060
........
3:compile grub
4:cp /cvs/grub/stage2/pre_stage2 /mtd-20000131/grub/
5:compile mtd-20000131
6:inmod mtd
insmod doc2000
7: cd /mtd-20000131/grub
doc_loadbios /dev/mtd0 grub_firmware
8:reboot into dos
i use int18 just for test.so you must make a floppy to boot it
in my case like it
in dos
debug
-a
-xxxx:100 int 18
-
-w 100 0 0 1
-q
i write 512 byte to floppy boot sector.just to execute int 18 interrupt at
floppy boot stage
9:reboot and use floppy boot.if all is ok.you can execute into grub command
interface
Is someone dealing with that grub boot from DOC? i 'm hacking grub code but
only
can do something that "periphery" because I can't read ntfl's partition in
doc.is anyone
doing it? some advice?
David Woodhourse,how are you ?
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-03-02 10:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-01 20:22 Booting from the flash Dvir Oren
2000-03-01 22:09 ` Bill Roman
-- strict thread matches above, loose matches on Subject: below --
2000-03-02 10:37 jyllyj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox