Skip to contentSkip to conversation

Linux Kernel MTD question

DISCUSSION JohnsonCheng 2 participants 3 messages Aug 21, 2005 – Aug 22, 2005

lore
Share & tools
lore
#0 lore raw

Dear All,

Just as I know, we can have many partitions for our flash if we turn on MTD in Kernel. For example:

0x00000000-0x00040000: u-boot

0x00040000-0x00100000: kernel

0x00100000-0x00200000: inirid1

0x00200000-0x00400000: initrd2

How could I distribute my RootFS into initrd1 and initrd2?

In U-Boot command, bootcmd, I set it to "bootm 40000 100000". 40000 is Kernel address, and 100000 is RootFS1 address. But where to set RootRS2 address?

Thanks,

Johnson Cheng

#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

Just as I know, we can have many partitions for our flash if we turn on MTD in Kernel. For example:

Right.

Quoted 1 line

How could I distribute my RootFS into initrd1 and initrd2?

You cannot. The *root* filesystem is always just a single file system.

You can mount additional file systems on top of the directory hierarchy provided by your root file system, but this is something completely different.

Quoted 3 lines

In U-Boot command, bootcmd, I set it to "bootm 40000 100000". 40000 is Kernel address, and 100000 is RootFS1 address. But where to set RootRS2 address?

There are several errors in this text.

First, the kernel download address 0x40000 = 256kB is much too low and can never work.

Second, the "100000" parameter is not a "RootFS1 address". It is the start address of a ramdisk image. This may or may not be your root file system, and it is usually NOT the address as seen by the kernel. And, 100000 = 1 MB is a much too low address and can never work.

And finally: all this has absolutely NOTHING to do with MTD partitions.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Documentation is like sex: when it is good, it is  very,  very  good;
and when it is bad, it is better than nothing.         - Dick Brandon
#2 lore raw

Very Thanks for your reply.
I am sorry that this data is copied from Building Embedded Linux Systems book.
Actually, the range of my flash is from 0xFF000000 to 0xFFFFFFFF. My starting address of Kernel is 0xFF000000, and the starting address of ramdisk image is FF200000, so the partitions is as following:
0xFF000000 - 0xFF1FFFFF Kernel
0xFF200000 - 0xFF9FFFFF RamDisk Image ( also my Root File System )

And I found my RootFS image is so big that waste many time while write it to flash.
I hope I can use MTD to distribute it into two parts, Simple RootFS and libraries, but I don't know how to implement it?

My CPU is MPC8241, and my kernel configure is base on Sandpoint_defconfig.

Thanks,
Johnson Cheng

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Wolfgang Denk
Sent: Monday, August 22, 2005 4:59 AM
To: JohnsonCheng
Cc: [email protected]
Subject: Re: Linux Kernel MTD question

Quoted 2 lines · In message <[email protected]> you wrote:

Just as I know, we can have many partitions for our flash if we turn on

MTD

Quoted 1 line

in Kernel. For example:

Right.

Quoted 1 line

How could I distribute my RootFS into initrd1 and initrd2?

You cannot. The *root* filesystem is always just a single file system.

You can mount additional file systems on top of the directory hierarchy provided by your root file system, but this is something completely different.

Quoted 3 lines

In U-Boot command, bootcmd, I set it to "bootm 40000 100000". 40000 is Kernel address, and 100000 is RootFS1 address. But where to set RootRS2 address?

There are several errors in this text.

First, the kernel download address 0x40000 = 256kB is much too low and can never work.

Second, the "100000" parameter is not a "RootFS1 address". It is the start address of a ramdisk image. This may or may not be your root file system, and it is usually NOT the address as seen by the kernel. And, 100000 = 1 MB is a much too low address and can never work.

And finally: all this has absolutely NOTHING to do with MTD partitions.

Best regards,

Wolfgang Denk

Signature · 8 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Documentation is like sex: when it is good, it is  very,  very  good;
and when it is bad, it is better than nothing.         - Dick Brandon
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded