public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* mtd partitions on Sharp Zaurus
@ 2002-04-23 19:08 Albert Rybalkin
  2002-04-23 22:23 ` David Woodhouse
  2002-04-23 23:17 ` Tim Riker
  0 siblings, 2 replies; 4+ messages in thread
From: Albert Rybalkin @ 2002-04-23 19:08 UTC (permalink / raw)
  To: linux-mtd

Hi, 

I'm new to linux and mtd, sorry if my post is misdirected... 

I have a Sharp Zaurus PDA with 16MB sharp flash rom. There's a linux
mtd chip driver `coolie_sharp.c` written by Sharp/Lineo for this
flash chip (there's two 8MB chips actually for total of 16MB in there).
This PDA comes with linux 2.4.6 kernel and initrd
that has root partition mounted as cramfs. Both zImage and initrd can
be flashed into the rom separately. Apparently, rom has some kind
of partitioning already. There's a boot loader in the flash rom, no
separate program to perform flashing. 

I have source code for most of the kernel (save for couple of
closed-source drivers for which I have binary KLMs). But I don't
have source code or any documentation on sharp boot loader/flash
program. 

With the sharp stock kernel I have a couple of mtd devices, i.e.: 

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01000000 00020000 "mtdrom"
mtd1: 02200000 00000400 "mtdram"
# 

Also, I have /dev/collie-fl that I think is a flash chip device. 

I've recompiled the kernel to remove cramfs and use jffs2 instead
for a root partition. 

But I'm in a complete dark as of how I need to partition flash rom
chip and map its partions to mtd block devices. Is there any user
space program exist that can enumerate and display existing partitions
which are already in the flash? Is there any documentation I can read
on how to partition flash?
Thanks,
 -albertr 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mtd partitions on Sharp Zaurus
  2002-04-23 19:08 mtd partitions on Sharp Zaurus Albert Rybalkin
@ 2002-04-23 22:23 ` David Woodhouse
  2002-04-23 23:17 ` Tim Riker
  1 sibling, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2002-04-23 22:23 UTC (permalink / raw)
  To: Albert Rybalkin; +Cc: linux-mtd

albertr@forbes.net said:
>  But I'm in a complete dark as of how I need to partition flash rom
> chip and map its partions to mtd block devices. Is there any user
> space program exist that can enumerate and display existing partitions
> which are already in the flash? Is there any documentation I can read
> on how to partition flash?

Not really - only the source code. The current flash partitioning code is 
very primitive - we simple register multiple devices, each with methods 
which just add an offset and call into the 'real' device's methods.

I don't know how the partitions on the Zaurus work - they haven't get got 
round to sending me one :)

--
dwmw2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mtd partitions on Sharp Zaurus
  2002-04-23 19:08 mtd partitions on Sharp Zaurus Albert Rybalkin
  2002-04-23 22:23 ` David Woodhouse
@ 2002-04-23 23:17 ` Tim Riker
  2002-04-24  5:59   ` Albert Rybalkin
  1 sibling, 1 reply; 4+ messages in thread
From: Tim Riker @ 2002-04-23 23:17 UTC (permalink / raw)
  To: Albert Rybalkin; +Cc: linux-mtd

The base Zaurus uses a readonly mtd driver called mtdrom. It also
partitions ram into a normal area and a mtdram area which is used for
/home. /home is remounted on soft boot allowing data to be preserved.

The latest kernel releases include proper read/write mtd flash drivers
but incomplete partition information imho. jffs2 will work with an
alternate kernel. The OpenZaurus project is configured to use jffs2
instead of cramfs.

http://OpenZaurus.SourceForge.net/

I suggest you start with the kernel they are useing which you can build
from the buildroot system in CVS:

http://sourceforge.net/cvs/?group_id=43045

The bootloader used on the Zaurus is a modified version of Angel. It
uses multiple partitions as described on:

http://www.btinternet.com/~p.flinders/sl-5000d/romimage-layout.html

128k - angel
128k - cf updater
512k - diagnostics
1M - kernel
14M+128k - root filesystem
128k - partition info

It would be a fairly simple matter to convert that over to:

128k - blob (including CF updater, diagnostics, and partition table)
16M-128k - rootfs (including kernel and modules)

if the blob team had access to a zaurus with jtag, but sharp has not
released this information. I suspect the pins on the back of a zaurus
next to the battery include jtag pins.

Ask your Sharp reps for this feature if you are interested in fitting
more data in the internal flash.

Albert Rybalkin wrote:
> 
> Hi,
> 
> I'm new to linux and mtd, sorry if my post is misdirected...
> 
> I have a Sharp Zaurus PDA with 16MB sharp flash rom. There's a linux
> mtd chip driver `coolie_sharp.c` written by Sharp/Lineo for this
> flash chip (there's two 8MB chips actually for total of 16MB in there).
> This PDA comes with linux 2.4.6 kernel and initrd
> that has root partition mounted as cramfs. Both zImage and initrd can
> be flashed into the rom separately. Apparently, rom has some kind
> of partitioning already. There's a boot loader in the flash rom, no
> separate program to perform flashing.
> 
> I have source code for most of the kernel (save for couple of
> closed-source drivers for which I have binary KLMs). But I don't
> have source code or any documentation on sharp boot loader/flash
> program.
> 
> With the sharp stock kernel I have a couple of mtd devices, i.e.:
> 
> # cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 01000000 00020000 "mtdrom"
> mtd1: 02200000 00000400 "mtdram"
> #
> 
> Also, I have /dev/collie-fl that I think is a flash chip device.
> 
> I've recompiled the kernel to remove cramfs and use jffs2 instead
> for a root partition.
> 
> But I'm in a complete dark as of how I need to partition flash rom
> chip and map its partions to mtd block devices. Is there any user
> space program exist that can enumerate and display existing partitions
> which are already in the flash? Is there any documentation I can read
> on how to partition flash?
> Thanks,
>  -albertr
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

-- 
Tim Riker - http://rikers.org/ - short SIGs! <g>
All I need to know I could have learned in Kindergarten
... if I'd just been paying attention.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mtd partitions on Sharp Zaurus
  2002-04-23 23:17 ` Tim Riker
@ 2002-04-24  5:59   ` Albert Rybalkin
  0 siblings, 0 replies; 4+ messages in thread
From: Albert Rybalkin @ 2002-04-24  5:59 UTC (permalink / raw)
  To: Tim Riker; +Cc: Albert Rybalkin, linux-mtd

Thanks alot to all who replied and answered my questions, I really
appreciate your help. 

> 
> The latest kernel releases include proper read/write mtd flash drivers
> but incomplete partition information imho. jffs2 will work with an
> alternate kernel. The OpenZaurus project is configured to use jffs2
> instead of cramfs. 
> 

Doh. Don't know how I missed OpenZaurus, sorry... Just downloaded their
initrd and it's jffs2, indeed!
About missing partition information... Since the zaurus partition
info ("name",size, offset) is known, do you think it could be possible
to add it to some map driver? I saw your patch dated January 2002 at 
http://opensource.lineo.com/~timr/zaurus
but linux/drivers/mtd/maps/sa1100-flash.c v 1.7 does not seem to have any
mentioning of coolio partitions. Was it removed from kernel source or
moved along to other place? 

> The bootloader used on the Zaurus is a modified version of Angel. It
> uses multiple partitions as described on: 
> 
> http://www.btinternet.com/~p.flinders/sl-5000d/romimage-layout.html 
> 
> 128k - angel
> 128k - cf updater
> 512k - diagnostics
> 1M - kernel
> 14M+128k - root filesystem
> 128k - partition info 
> 
> It would be a fairly simple matter to convert that over to: 
> 
> 128k - blob (including CF updater, diagnostics, and partition table)
> 16M-128k - rootfs (including kernel and modules) 
> 

Ok, so /dev/mtdblock0 is "Angel" and /dev/mtdblock4 is initrd?
If I'll make my own jffs2 version of initrd and flash it in place
of Sharp's cramfs, does it mean that it could be mounted on
/dev/mtdblock4 ? Or am I missing the point? 

> 
> Ask your Sharp reps for this feature if you are interested in fitting
> more data in the internal flash. 
> 

It sure would be nice to get rid of small partitions and save some space.
I'll ask somebody from Sharp when I get a chance. Can you please give
me more details (email is ok) on what you need from sharp to
make it happen?
Thanks,
 -albertr

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-24  5:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-23 19:08 mtd partitions on Sharp Zaurus Albert Rybalkin
2002-04-23 22:23 ` David Woodhouse
2002-04-23 23:17 ` Tim Riker
2002-04-24  5:59   ` Albert Rybalkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox