|
|
 |
Getting Started
Boot from ROM
Dynamic FLASH partitioning
|
|
The Linux kernel manages the on board FLASH through the standard
MTD (Memory Technology Device) subsystem.
Regardless the board type, by default, MTD
divides the Flash into three partitions:
| Device |
Size (KB) |
Generally dedicated to... |
| /dev/mtd0 |
256 Kb |
Linux IPL program |
| /dev/mtd1 |
1024 Kb |
Compressed kernel image |
| /dev/mtd2 |
remaining |
Root File System |
However, this layout can be customized. This can be useful, for example,
on multi processor platforms like the Espresso to dedicate a FLASH region
for the ST20 application (see the STi5528 Dual Boot chapter for more infos).
Customized FLASH partitioning can be achieved in two ways:
-
temporary, at the kernel boot time using the argument
mtdparts in the command line.
The following example:
...mtdparts=Onboard_Flash:256k@0k,1024k@256k,2816k@1280k,-...
will result in the following FLASH layout (see also the RAM layout
example in the STi5528 Dual Boot
page)
| Device |
Size (KB) |
Generally dedicate to... |
| /dev/mtd0 |
256 Kb |
Linux IPL program |
| /dev/mtd1 |
1024 Kb |
Compressed kernel image |
| /dev/mtd2 |
2816 Kb |
Root File System |
| /dev/mtd3 |
remaining |
...ST20 CPU... |
Onboard_Flash is a keyword used by the MTD device driver to
distinguish between Flash on the main board and any other Flash on
an optional STEM card.
So it must be entered as exactly Onboard_Flash.
Note - this method is simple but has few implications: when
the kernel is launched from FLASH the IPL program must provide a
a consistent command line, moreover when configuring the kernel,
do not forget to enable the "Command line partition table parsing"
in the "Memory Technology Device" section.
-
permanent, modifying the default FLASH partition defined
by the structure "onboard_partitions" in the source file:
.../drivers/mtd/maps/stboards.c
This method doesn't impacts the IPL (unless the kernel start region
is modified).
Device nodes to cover up to 16 FLASH slices are provided under
/dev
|