* [PATCH] Zaurus: Fix PROM partition table for spitz
@ 2009-10-22 20:58 Stanislav Brabec
2009-10-22 21:05 ` Eric Miao
0 siblings, 1 reply; 6+ messages in thread
From: Stanislav Brabec @ 2009-10-22 20:58 UTC (permalink / raw)
To: linux-arm-kernel
Attached patch fixes partition table of the Zaurus PROM. It works on
terrier, but I guess it is common for all Zaurus models.
The partition marked ??"Boot PROM Filesystem" is a fact a database file
for EN-JP dictionary. Designers decided to put the English-Japanese
translation dictionary to the remaining part of the PROM.
Changes:
Newly mapped the bootloader system as "Boot PROM System".
Already mapped EN-JP dictionary changes its name from ?"Boot PROM
Filesystem" to "EN-JP Data File".
How to verify the layout on other models:
?root at zaurus:~# modprobe physmap
root at zaurus:~# file -s /dev/mtd4
/dev/mtd4: DBase 3 data file (1031668283 records)
Signed-off-by: Stanislav Brabec <utx@penguin.cz>
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index ee8d603..c382d14 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -658,7 +696,11 @@ static struct platform_device sharpsl_nand_device = {
static struct mtd_partition sharpsl_rom_parts[] = {
{
- .name ="Boot PROM Filesystem",
+ .name ="Boot PROM System",
+ .offset = 0x00100000,
+ },
+ {
+ .name ="EN-JP Data File",
.offset = 0x00140000,
.size = MTDPART_SIZ_FULL,
},
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] Zaurus: Fix PROM partition table for spitz
2009-10-22 20:58 [PATCH] Zaurus: Fix PROM partition table for spitz Stanislav Brabec
@ 2009-10-22 21:05 ` Eric Miao
2009-10-22 21:13 ` Stanislav Brabec
0 siblings, 1 reply; 6+ messages in thread
From: Eric Miao @ 2009-10-22 21:05 UTC (permalink / raw)
To: linux-arm-kernel
I'm a bit upset that some things else may depend on the original
layout (though that's incorrect), and this possibly breaks the
sequence numbering of /dev/mtd?.
On Fri, Oct 23, 2009 at 4:58 AM, Stanislav Brabec <utx@penguin.cz> wrote:
> Attached patch fixes partition table of the Zaurus PROM. It works on
> terrier, but I guess it is common for all Zaurus models.
>
> The partition marked ??"Boot PROM Filesystem" is a fact a database file
> for EN-JP dictionary. Designers decided to put the English-Japanese
> translation dictionary to the remaining part of the PROM.
>
> Changes:
>
> Newly mapped the bootloader system as "Boot PROM System".
>
> Already mapped EN-JP dictionary changes its name from ?"Boot PROM
> Filesystem" to "EN-JP Data File".
>
> How to verify the layout on other models:
> ?root at zaurus:~# modprobe physmap
> root at zaurus:~# file -s /dev/mtd4
> /dev/mtd4: DBase 3 data file (1031668283 records)
>
> Signed-off-by: Stanislav Brabec <utx@penguin.cz>
>
> diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
> index ee8d603..c382d14 100644
> --- a/arch/arm/mach-pxa/spitz.c
> +++ b/arch/arm/mach-pxa/spitz.c
> @@ -658,7 +696,11 @@ static struct platform_device sharpsl_nand_device = {
>
> ?static struct mtd_partition sharpsl_rom_parts[] = {
> ? ? ? ?{
> - ? ? ? ? ? ? ? .name ? ="Boot PROM Filesystem",
> + ? ? ? ? ? ? ? .name ? ="Boot PROM System",
> + ? ? ? ? ? ? ? .offset = 0x00100000,
> + ? ? ? },
> + ? ? ? {
> + ? ? ? ? ? ? ? .name ? ="EN-JP Data File",
> ? ? ? ? ? ? ? ?.offset = 0x00140000,
> ? ? ? ? ? ? ? ?.size ? = MTDPART_SIZ_FULL,
> ? ? ? ?},
>
>
>
> ________________________________________________________________________
> Stanislav Brabec
> http://www.penguin.cz/~utx/zaurus
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] Zaurus: Fix PROM partition table for spitz
2009-10-22 21:05 ` Eric Miao
@ 2009-10-22 21:13 ` Stanislav Brabec
2009-10-22 21:33 ` Eric Miao
0 siblings, 1 reply; 6+ messages in thread
From: Stanislav Brabec @ 2009-10-22 21:13 UTC (permalink / raw)
To: linux-arm-kernel
Eric Miao wrote:
> I'm a bit upset that some things else may depend on the original
> layout (though that's incorrect), and this possibly breaks the
> sequence numbering of /dev/mtd?.
It can break in many ways, e. g. by compiling one as module and another
into kernel, and depends on order of modules load.
That is why software should search partitions by name.
AFAIK, nothing uses the EN-JP or initial bootloader data in the 2.6.x
distros, so it should be just safe housekeeping.
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Zaurus: Fix PROM partition table for spitz
2009-10-22 21:13 ` Stanislav Brabec
@ 2009-10-22 21:33 ` Eric Miao
2009-10-22 21:45 ` Pavel Machek
0 siblings, 1 reply; 6+ messages in thread
From: Eric Miao @ 2009-10-22 21:33 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Oct 23, 2009 at 5:13 AM, Stanislav Brabec <utx@penguin.cz> wrote:
> Eric Miao wrote:
>> I'm a bit upset that some things else may depend on the original
>> layout (though that's incorrect), and this possibly breaks the
>> sequence numbering of /dev/mtd?.
>
> It can break in many ways, e. g. by compiling one as module and another
> into kernel, and depends on order of modules load.
>
> That is why software should search partitions by name.
>
But there might be software that doesn't. I'd be a little bit
conservative about this.
> AFAIK, nothing uses the EN-JP or initial bootloader data in the 2.6.x
> distros, so it should be just safe housekeeping.
>
This, on the other hand, says it's also safe not to inserting
some additional partition in between :-)
(I won't refuse some comments to make this more clear in the code
though).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Zaurus: Fix PROM partition table for spitz
2009-10-22 21:33 ` Eric Miao
@ 2009-10-22 21:45 ` Pavel Machek
2009-10-22 22:09 ` Stanislav Brabec
0 siblings, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2009-10-22 21:45 UTC (permalink / raw)
To: linux-arm-kernel
On Fri 2009-10-23 05:33:27, Eric Miao wrote:
> On Fri, Oct 23, 2009 at 5:13 AM, Stanislav Brabec <utx@penguin.cz> wrote:
> > Eric Miao wrote:
> >> I'm a bit upset that some things else may depend on the original
> >> layout (though that's incorrect), and this possibly breaks the
> >> sequence numbering of /dev/mtd?.
> >
> > It can break in many ways, e. g. by compiling one as module and another
> > into kernel, and depends on order of modules load.
> >
> > That is why software should search partitions by name.
> >
>
> But there might be software that doesn't. I'd be a little bit
> conservative about this.
>
> > AFAIK, nothing uses the EN-JP or initial bootloader data in the 2.6.x
> > distros, so it should be just safe housekeeping.
> >
>
> This, on the other hand, says it's also safe not to inserting
> some additional partition in between :-)
>
> (I won't refuse some comments to make this more clear in the code
> though).
I don't know. If the table is wrong, we should fix it. Yes, it may
break someone, but it probably will not.
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Zaurus: Fix PROM partition table for spitz
2009-10-22 21:45 ` Pavel Machek
@ 2009-10-22 22:09 ` Stanislav Brabec
0 siblings, 0 replies; 6+ messages in thread
From: Stanislav Brabec @ 2009-10-22 22:09 UTC (permalink / raw)
To: linux-arm-kernel
On 2009-10-29 23:45:11 Pavel Machek wrote:
> On Fri 2009-10-23 05:33:27, Eric Miao wrote:
> > (I won't refuse some comments to make this more clear in the code
> > though).
>
> I don't know. If the table is wrong, we should fix it. Yes, it may
> break someone, but it probably will not.
This change is not worse than change in .config, as there is no
guarantee of order of loading NAND and PROM maps.
I just looked at original 2.4 kernel. There were:
PROM EN-JP as "Filesystem", bootloader not mapped
NAND partitions as "smf", "root", "home"
This is an output of cat /proc/mtd on vendor's 2.4.20.
dev: size erasesize name
mtd0: 006b0000 00020000 "Filesystem"
mtd1: 00700000 00020000 "smf"
mtd2: 02b00000 00020000 "root"
mtd3: 04e00000 00020000 "home"
We never were compatible:
Guessing from "file" output, EN-JP partition is just a file, not a
filesystem. I am OK with keeping of name "Boot PROM Filesystem" and
calling the new partition as "PROM Bootloader", but EN-JP in the name
cleanly describes the surprising contents. Adding bootloader data
partition has probably a single use case: Being easily able to grab
the PROM contents for the emulator.
--
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-10-22 22:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22 20:58 [PATCH] Zaurus: Fix PROM partition table for spitz Stanislav Brabec
2009-10-22 21:05 ` Eric Miao
2009-10-22 21:13 ` Stanislav Brabec
2009-10-22 21:33 ` Eric Miao
2009-10-22 21:45 ` Pavel Machek
2009-10-22 22:09 ` Stanislav Brabec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).