Boot from DoC2000
I'm new to linux, so my questions may seem rather simplistic <g>
Sorry for the multiple questions, I have read most of the papers and many of the posting on this list but these are missing pieces...
It seems the m-sys driver adds logic to the bios gaining access to the DoC. The mtd solution everyone is working so hard on seems to do things differently, but I'm not sure how or what. I am also unclear as to what boot loaders support this new way to boot an mtd device. I understand grub is designed to support that scenario but is still in development. Does the lilo solution rely on the m-sys patch?
I suppose a boot loader like grub is required because the bios doesn't support native access to the device(s).
So what filesystem options are there? I know that m-sys has their own "TrueFFS" fs, and it requires a kernel patch. Being new to linux, I'd like to stay away from that for the time being. I have read about jffs1 and jffs2, and from what I can tell jffs1 is stable but lacking the nice features, while jffs2 is very much experimental but coming along nicely.
Knowing all that, the options seem to be as follows:
1) LILO plus an m-sys patch with the TrueFFS or any other filesystem
2) GRUB with any filesystem including JFFS, but not TrueFFS
3) SYSLINUX ??? i suspect is not supported
I believe I read that to date, nobody has had a successful boot on a DoC with grub - yet!
So does that leave the only current option as LILO with the m-sys patch?
Darren
Quoted 23 lines · Darren Martz
I'm new to linux, so my questions may seem rather simplistic <g>
Sorry for the multiple questions, I have read most of the papers and many of the posting on this list but these are missing pieces...
It seems the m-sys driver adds logic to the bios gaining access to the DoC. The mtd solution everyone is working so hard on seems to do things differently, but I'm not sure how or what. I am also unclear as to what boot loaders support this new way to boot an mtd device. I understand grub is designed to support that scenario but is still in development. Does the lilo solution rely on the m-sys patch?
I suppose a boot loader like grub is required because the bios doesn't support native access to the device(s).
So what filesystem options are there? I know that m-sys has their own "TrueFFS" fs, and it requires a kernel patch. Being new to linux, I'd like to stay away from that for the time being. I have read about jffs1 and jffs2, and from what I can tell jffs1 is stable but lacking the nice features, while jffs2 is very much experimental but coming along nicely.
Knowing all that, the options seem to be as follows:
Quoted 7 lines
1) LILO plus an m-sys patch with the TrueFFS or any other filesystem
2) GRUB with any filesystem including JFFS, but not TrueFFS
3) SYSLINUX ??? i suspect is not supportedI believe I read that to date, nobody has had a successful boot on a DoC with grub - yet!
So does that leave the only current option as LILO with the m-sys patch?
look at the mailing list archives, grub works great on a DOC. jffs2 (or jffs) is not ready for use on a DOC, but its close, so you'd have to use a standard filesystem on top of NFTL.
actually, syslinux works fine with the original m-sys "firmware"
Russ,
Thanks for the clarification, I didn't realize that JFFS/2 was the only unstable part. Being new to this, I'm trying to stick to as few patches as possible. I'll look into grub with nftl.
Darren
Quoted 1 line
look at the mailing list archives, grub works great on a DOC. jffs2
(or
Quoted 1 line
jffs) is not ready for use on a DOC, but its close, so you'd have to
use a standard filesystem on top of NFTL.
Quoted 1 line
actually, syslinux works fine with the original m-sys "firmware"
Quoted 5 lines · Darren Martz
Russ,
Thanks for the clarification, I didn't realize that JFFS/2 was the only unstable part. Being new to this, I'm trying to stick to as few patches as possible. I'll look into grub with nftl.
For further clarification, JFFS2 is not unstable. There's just no support for DOC. :)
Signature · 4 lines
Thomas ___________________________________ autronix automation GmbH http://www.autronix.de [email protected]
You're a little confused. There are two options for the physical format on the DiskOnChip. First, there's 'NFTL', which is what M-Systems refer to as 'TrueFFS', which emulates a block device. On top of that block device you put a normal filesystem -- VFAT, ext2 or whatever you prefer.
You need support for that in two places - both in your bootloader which has to load the kernel off it, and in your kernel which has to actually _use_ it. Just to add to the confusion, for _each_ of those requirements you have a choice of two methods.
The kernel part is simple - either you use their binary-only module with an initrd hack to get it loaded, or you use the GPL'd support for NFTL which is included in the official 2.4 kernel tree.
The bootloader part is only slightly less simple. The DiskOnChip ships with firmware built-in that hooks into the INT 13h disk BIOS interrupt, to make it look like a normal hard disk driver to DOS and LILO. If you want, you can replace their firmware with Grub. To make that useful, you have to have a copy of Grub which is capable of reading the DiskOnChip directly, as you're going to have taken away the INT 13h support.
Alternatively, you can use JFFS2 on the DiskOnChip. You need to fix up the DiskOnChip hardware drivers a little to handle reads and writes larger than 512 bytes; nothing else that I recall. Booting a kernel on a JFFS2 file system on DiskOnChip is not yet implemented. I'd be inclined to use RedBoot for that.
--
dwmw2
That makes much more sense, you explained it very well - thanks David!
I'm going to push on with grub using the NFTL and ext2.
My PC/104 board has an older/patched version of lilo and linux on it, how do I replace the current lilo firmware? I have already formatted the device from a floppy boot (may that wasn't so smart). Can I install grub over top of the existing lilo by bootdisk, or do I need to uninstall lilo first?
So far I have downloaded grub 0.92, ran "configure" and "make" on my desktop-pc. I put the stage1 and stage2 files using dd, as the manual indicates, on a floppy and successfully booted the PC/104 board... but I am having troubles figuring out how to access the DoC or to install grub on the device. Is there a document that covers most/part of this? I am assuming the 0.92 build has DoC support.
Darren
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of David Woodhouse
You're a little confused. There are two options for the physical format on
the DiskOnChip. First, there's 'NFTL', which is what M-Systems refer to as
'TrueFFS', which emulates a block device. On top of that block device you
put a normal filesystem -- VFAT, ext2 or whatever you prefer.
You need support for that in two places - both in your bootloader which has
to load the kernel off it, and in your kernel which has to actually _use_
it. Just to add to the confusion, for _each_ of those requirements you have
a choice of two methods.
The kernel part is simple - either you use their binary-only module with an
initrd hack to get it loaded, or you use the GPL'd support for NFTL which
is included in the official 2.4 kernel tree.
The bootloader part is only slightly less simple. The DiskOnChip ships with
firmware built-in that hooks into the INT 13h disk BIOS interrupt, to make
it look like a normal hard disk driver to DOS and LILO. If you want, you
can replace their firmware with Grub. To make that useful, you have to have
a copy of Grub which is capable of reading the DiskOnChip directly, as you're going to have taken away the INT 13h support.
Alternatively, you can use JFFS2 on the DiskOnChip. You need to fix up the
DiskOnChip hardware drivers a little to handle reads and writes larger than
512 bytes; nothing else that I recall. Booting a kernel on a JFFS2 file system on DiskOnChip is not yet implemented. I'd be inclined to use RedBoot
for that.
--
dwmw2
Quoted 5 lines · [email protected] said:
My PC/104 board has an older/patched version of lilo and linux on it,
how do I replace the current lilo firmware? I have already formatted the device from a floppy boot (may that wasn't so smart). Can I install grub over top of the existing lilo by bootdisk, or do I need to uninstall lilo first?
Grub (or the original firmware) live in the raw flash, before the actual NFL format starts. Grub is bigger than the original firmware, so when you install Grub, you have to recreate the NFTL format. It's best to do this with the M-Systems DFORMAT program under DOS, but it's also possible to use the Linux nftl_format program which doesn't deal with bad blocks properly.
You can tell the DFORMAT program how much space to reserve for the firmware, I believe.
You need to apply the DiskOnChip patches to Grub, if they're not already merged.
--
dwmw2
Darren,
Quoted 2 lines · Darren Martz
Is there a document that covers most/part of this? I am assuming the 0.92 build has DoC support.
There is a patch to GRUB enabling DoC read support. The latest one is
patches/grub-2002-02-19-doc.patch
in MTD CVS repository. One has to apply it with the following command:
cd ~/grub
patch -p0 -i ~/infradead.org/mtd/patches/grub-2002-02-19-doc.patchYou can experience inconsistencies between the patch and the latest GRUB Changelog.
Once you patched the GRUB source code, take a look at README_DiskOnChip for further configuration commands. You may be required to update autoconf and automake.
Ilguiz
Quoted 3 lines · [email protected] said:
I have read about jffs1 and jffs2, and from what I can tell jffs1 is stable but lacking the nice features, while jffs2 is very much experimental but coming along nicely.
Forgot to respond to this bit earlier...
JFFS2 on NAND is experimental. JFFS2 on NOR is stable; more so than JFFS1 now, I think.
--
dwmw2