* howto
@ 2001-01-04 17:48 Livio Plos
2001-01-04 17:57 ` howto David Woodhouse
0 siblings, 1 reply; 6+ messages in thread
From: Livio Plos @ 2001-01-04 17:48 UTC (permalink / raw)
To: mtd
Hi,
I'm trying to build a system with flash chips instead of an
hard disk or a disk on module and this seems to be the
most advanced project to help me doing this.
Neverthless, it is not easy to begin understanding how to
move between sources, configuration, modules...
Can I boot totally from flash without any other storage support?
Is there any howto or high level docs to configure and compile?
Thank you very much.
Livio
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: howto
2001-01-04 17:48 howto Livio Plos
@ 2001-01-04 17:57 ` David Woodhouse
2001-01-04 19:31 ` mtdchar.c and vmalloc Alice Hennessy
0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2001-01-04 17:57 UTC (permalink / raw)
To: Livio Plos; +Cc: mtd
livioplos@bigfoot.com said:
> I'm trying to build a system with flash chips instead of an hard disk
> or a disk on module and this seems to be the most advanced project to
> help me doing this.
> Neverthless, it is not easy to begin understanding how to move
> between sources, configuration, modules...
Documentation is moving up the TODO list very slowly, as I get the code
closer to a state where I'm happy with it.
> Can I boot totally from flash without any other storage support?
Yes, as long as you have the flash mapped where the CPU startup vector
points, or the board's firmware has support for starting the Linux kernel
from flash (RedBoot does).
> Is there any howto or high level docs to configure and compile?
Drop the latest code from CVS on top of your 2.4 kernel tree. Enable all the
CFI stuff, enable CONFIG_MTD_PHYSMAP and set the address, size and bus width
for your flash mapping appropriately. Boot it and see what happens.
If you want to partition the flash, as most people do, you'll want to copy
one of the other 'map' drivers (eg. pnc2000.c) and change the numbers
accordingly.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* mtdchar.c and vmalloc
2001-01-04 17:57 ` howto David Woodhouse
@ 2001-01-04 19:31 ` Alice Hennessy
2001-01-05 10:31 ` David Woodhouse
0 siblings, 1 reply; 6+ messages in thread
From: Alice Hennessy @ 2001-01-04 19:31 UTC (permalink / raw)
To: David Woodhouse; +Cc: ahennessy, mtd
Hello,
During stress testing, I ran into a data corruption problem that went away
after I changed vmalloc to
kmalloc in mtd_read and mtd_write functions (mtdchar.c). I added a loop to
the code so that malloc size
doesn't exceed the kmalloc maximum of 128k bytes.
Seems to work fine now.
Does this make sense? Anyone else see this problem? Any opinions if this is
an ok solution until
kiovec or something else is implemented?
Alice
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: mtdchar.c and vmalloc
2001-01-04 19:31 ` mtdchar.c and vmalloc Alice Hennessy
@ 2001-01-05 10:31 ` David Woodhouse
0 siblings, 0 replies; 6+ messages in thread
From: David Woodhouse @ 2001-01-05 10:31 UTC (permalink / raw)
To: Alice Hennessy; +Cc: mtd
ahennessy@mvista.com said:
> Any opinions if this is an ok solution until kiovec or something
> else is implemented?
S'fine.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: howto
@ 2001-01-10 22:15 Michael Stumpf
2001-01-11 18:58 ` howto Bjorn Wesen
0 siblings, 1 reply; 6+ messages in thread
From: Michael Stumpf @ 2001-01-10 22:15 UTC (permalink / raw)
To: Livio Plos; +Cc: mtd
Sorry for the slow response; been on vacation.
> Can I boot totally from flash without any other storage support?
I'm doing some work requiring precisely this--flash chips, preprogrammed,
intended to boot linux with a read-only filesystem, preferrably compressed,
from a well-known ROM address.
I originally hacked up mtdram.c to do what has already been done, quite
elegantly infact..
There is a patch out there somewhere (search this list, if you can't find it,
let me know and I'll get it to you.) that adds a block device to the kernel
called "/dev/rom".. it has two modes of operation:
1) Encodes the binary filesystem image and compiles it directly into the
kernel, bloating its final size
or 2) Allow you to point it to a "well known" memory address that has (this is
unclear) 4 bytes containing the filesystem size (in bytes), 4 bytes of "00",
and then the filesystem image, whatever that may be. I use cramfs with great
success on a very memory-constrained target.
> Is there any howto or high level docs to configure and compile?
Patch it in, enable it in config, refer to above notes. Let me know if you're
still lost.
Regards,
Michael
=====
=====================================================================
Michael J. Stumpf
LinuxPPC enablement
IBM-Austin, TX 512.838.1524 [lab] 512.838.5335 [work]
http://www.pobox.com/~mstumpf
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: howto
2001-01-10 22:15 howto Michael Stumpf
@ 2001-01-11 18:58 ` Bjorn Wesen
0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Wesen @ 2001-01-11 18:58 UTC (permalink / raw)
To: mstumpf; +Cc: Livio Plos, mtd
On Wed, 10 Jan 2001, Michael Stumpf wrote:
> > Can I boot totally from flash without any other storage support?
>
> There is a patch out there somewhere (search this list, if you can't find it,
> let me know and I'll get it to you.) that adds a block device to the kernel
> called "/dev/rom".. it has two modes of operation:
That would be the krom device, I think it was done by the uClinux
guys. It's not necessary for booting from cramfs though, it was made for
hackish support of romfs/mmap's directly to flash without going through
the buffer layer.
> unclear) 4 bytes containing the filesystem size (in bytes), 4 bytes of "00",
> and then the filesystem image, whatever that may be. I use cramfs with great
> success on a very memory-constrained target.
To do that I just replace cramfs_read with this (romfs_start is defined by
head.S during boot to the place where the cramfs lives):
static inline void *cramfs_read(struct super_block *sb, unsigned int
offset, unsigned int len)
{
return romfs_start + offset;
}
Then to be able to boot from it, add this to fs/super.c:
#ifdef CONFIG_ROOT_CRAMFS_AS_IMAGE
void *data;
fs_type = get_fs_type("cramfs");
ROOT_DEV = get_unnamed_dev();
sb = read_super(ROOT_DEV, NULL, fs_type, root_mountflags, data, 1);
goto mount_it;
#endif
in mount_root just above the CONFIG_NFS_ROOT check.
-BW
To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-01-11 16:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-04 17:48 howto Livio Plos
2001-01-04 17:57 ` howto David Woodhouse
2001-01-04 19:31 ` mtdchar.c and vmalloc Alice Hennessy
2001-01-05 10:31 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2001-01-10 22:15 howto Michael Stumpf
2001-01-11 18:58 ` howto Bjorn Wesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox