* [Novice] Few simple questions on DOC.
@ 2001-08-17 9:01 Riipinen Petri
2001-08-17 9:08 ` David Woodhouse
0 siblings, 1 reply; 6+ messages in thread
From: Riipinen Petri @ 2001-08-17 9:01 UTC (permalink / raw)
To: linux-mtd
Hi folks,
I'm setting up a Linux system on a SBC which has a DOC 2000 socket on it.
This is going to be a pretty small setup for the simple purpose of running
a dedicated program, so no need for very large setup.
So far I've built my setup (kernel + devices + boot stuff + few libs +
binaries + my application binaries) on a hard disk that's connected to
the SBC and it works fine, booting the system to run only my application
and nothign else. I'm not using Lilo/Grub, instead I'm booting directly
the Kernel (2.4.7). My whole setup requires about 10 megs of space, so I
thought I'd use 16M DOC chip, although I might expand to 32M as well,
haven't really decided on that yet.
The next step is to transfer the setup to the DOC, remove the hard disk
and use only DOC for bootin the system and starting my application. And
that's where I would like to ask some "novice" questions to avoid
making some obvious mistakes in the beginning.
Ok, now on to few of questions:
1) I found a DOC driver for Linux from M-Systems website. Do I need this
at all or is everything included in the 2.4.7 kernel? I have read the
mtd-jffs-HOWTO and configured the kernel accordingly.
2) Do I really need to use Lilo/Grub, or can I just write the kernel
directly into beginning of the DOC to make it boot? I don't need to
give any parameters to the kernel when booting from hd, so I don't really
see a need for a boot manager from my point of view.
3) How should I partition the DOC? First a small partition for the kernel,
and then another partition for the rest of the files? Do I use fdisk for
that?
4) Maybe I should use jffs on the DOC, can I just make it with mkfs -t
jffs ...?
5) If I want to write some data into the DOC to keep between boots,
would it be a good idea to make a small partition (and mount it to /var?)
and mount that RW and then mount the other partition with other files as
RO?
6) To write the kernel bzImage to DOC boot sector, would I just use dd
if=input of=/dev/mtd ... or what?
Thanks!
- Petri
PS. I haven't really done anything with the DOC-chips so far (only with
hard disk) so bear with me if I'm not making the right questions...;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Novice] Few simple questions on DOC.
2001-08-17 9:01 [Novice] Few simple questions on DOC Riipinen Petri
@ 2001-08-17 9:08 ` David Woodhouse
2001-08-17 9:52 ` Riipinen Petri
0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2001-08-17 9:08 UTC (permalink / raw)
To: Riipinen Petri; +Cc: linux-mtd
riipinen@nic.fi said:
> 1) I found a DOC driver for Linux from M-Systems website. Do I need
> this at all or is everything included in the 2.4.7 kernel? I have read
> the mtd-jffs-HOWTO and configured the kernel accordingly.
The DiskOnChip driver on the M-Systems website is a different driver. It's
binary-only, so if you're going to distribute the box you're making, it's
illegal to link it into the kernel, and it's dubious even whether it's
legal to use it as a module.
The code in 2.4.7 is slightly out of date - you should update to the latest
code from CVS which has a couple of useful bug fixes in it.
> 2) Do I really need to use Lilo/Grub, or can I just write the kernel
> directly into beginning of the DOC to make it boot? I don't need to
> give any parameters to the kernel when booting from hd, so I don't
> really see a need for a boot manager from my point of view.
If you just write the kernel to the beginning of the device, what's going
to load it? The bootsector built into the kernel is old, probably broken,
and only designed for use on floppies - I don't think it'll do the job.
> 3) How should I partition the DOC? First a small partition for the
> kernel, and then another partition for the rest of the files? Do I use
> fdisk for that?
Don't partition it. Just make a filesystem on /dev/nftla and put the kernel
in that filesystem.
> 4) Maybe I should use jffs on the DOC, can I just make it with mkfs
> -t jffs ...?
JFFS doesn't work on it yet.
> 5) If I want to write some data into the DOC to keep between boots,
> would it be a good idea to make a small partition (and mount it to /
> var?) and mount that RW and then mount the other partition with other
> files as RO?
No point. NFTL uses the whole device anyway, and partitions within the
block device wouldn't buy you anything. The NFTL write code ought to be
fine now anyway - don't be too scared by the help text for CONFIG_NFTL_RW
> 6) To write the kernel bzImage to DOC boot sector, would I just use dd
> if=input of=/dev/mtd ... or what?
Don't do that. Just use the patched LILO and pretend it's a hard drive.
--
dwmw2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Novice] Few simple questions on DOC.
2001-08-17 9:08 ` David Woodhouse
@ 2001-08-17 9:52 ` Riipinen Petri
2001-08-17 9:57 ` David Woodhouse
0 siblings, 1 reply; 6+ messages in thread
From: Riipinen Petri @ 2001-08-17 9:52 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd
Great response time...;)
Well, I'd just like to continue with some follow-up questions below. But I
must say that your answers cleared a lot of confusion in my head already
and I'm pretty confident to continue.
> The DiskOnChip driver on the M-Systems website is a different driver. It's
> binary-only, so if you're going to distribute the box you're making, it's
> illegal to link it into the kernel, and it's dubious even whether it's
> legal to use it as a module.
Ok, I'm perfectly happy to forget it then.
> The code in 2.4.7 is slightly out of date - you should update to the latest
> code from CVS which has a couple of useful bug fixes in it.
Are the fixes in 2.4.9? I could just as well update my kernel source tree
anyway and forget 2.4.7 completely, nothing in particular is forcing me to
stay on 2.4.7.
> If you just write the kernel to the beginning of the device, what's going
> to load it? The bootsector built into the kernel is old, probably broken,
> and only designed for use on floppies - I don't think it'll do the job.
Well, hmm... Ok, I assumed that the bootsector included in bzImage works
just as well as it does with floppies and hd. Well, I was really thinking
that I could save some space by not using Lilo/Grub but maybe that's not
worth it then.
And would you recommend Lilo over Grub?
> JFFS doesn't work on it yet.
So ext2 is the most practical choise currently?
Would there be any problems if the user shuts down the SBC when my
application is still writing some data file onto the DOC? I guess those
will be dealt with on boot.
Thanks!
- Petri
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Novice] Few simple questions on DOC.
2001-08-17 9:52 ` Riipinen Petri
@ 2001-08-17 9:57 ` David Woodhouse
2001-08-17 10:05 ` Riipinen Petri
0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2001-08-17 9:57 UTC (permalink / raw)
To: Riipinen Petri; +Cc: linux-mtd
riipinen@nic.fi said:
> Are the fixes in 2.4.9? I could just as well update my kernel source
> tree anyway and forget 2.4.7 completely, nothing in particular is
> forcing me to stay on 2.4.7.
Not yet, sorry - I sent them once but Linus dropped them. I'll resend when
he gets back from .fi.
> Well, hmm... Ok, I assumed that the bootsector included in bzImage
> works just as well as it does with floppies and hd. Well, I was really
> thinking that I could save some space by not using Lilo/Grub but maybe
> that's not worth it then.
I suppose it _might_ work. Don't be surprised if it doesn't though.
> And would you recommend Lilo over Grub?
Until someone does the relatively small amount of work to finish the Grub
DiskOnChip support, yes.
> So ext2 is the most practical choise currently?
Yep.
> Would there be any problems if the user shuts down the SBC when my
> application is still writing some data file onto the DOC? I guess
> those will be dealt with on boot.
It should be just the same as on a hard drive - which means that you should
probably be using ext3, but that's a little heavyweight for use on the
DiskOnChip.
--
dwmw2
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-08-17 10:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-17 9:01 [Novice] Few simple questions on DOC Riipinen Petri
2001-08-17 9:08 ` David Woodhouse
2001-08-17 9:52 ` Riipinen Petri
2001-08-17 9:57 ` David Woodhouse
2001-08-17 10:05 ` Riipinen Petri
2001-08-17 10:06 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox