5 Flash Partitioning
Linux Software Developers Kit (SDK) User Guide
34
Default Flash Memory Map for XPort Pro
The following figure shows the flash layout as it is hard-coded in the Linux kernel.
Figure 5-2. Flash Layout – XPort Pro
/dev/mtd0 (128K)
Lantronix BootLoader
/dev/mtd1 (128K)
Factory Unit Configuration
/dev/mtd5 (4 MB)
JFFS2 User Space
/dev/mtd4 (3.5 MB)
dBUG Image Header (128 Bytes)
Linux
(Optional) ROMFS
/dev/mtd8 (128K)
dBUG Configuration Backup
/dev/mtd3 (128K)
dBUG Configuration
/dev/mtd7 (384 KB)
User Extra Space
/dev/mtd2 (128K)
dBUG (Secondary Bootloader)
/dev/mtd5 (7.5 MB)
User Extra Space
Flash Layout – XPort Pro
Single Bank
Dual Bank – Bank 1
Dual Bank – Bank 2
/dev/mtd4 (3.5 MB)
dBUG Image Header (128 Bytes)
Linux
(Optional) ROMFS
0x00000000
0x00080000
0x00060000
0x00040000
0x00020000
0x00400000
0x00800000
0x00880000
Reserved (Dual Bank Use)
0x01000000
/dev/mtd0 (128K)
Lantronix BootLoader
/dev/mtd1 (128K)
Factory Unit Configuration
/dev/mtd2 (128K
dBUG (Secondary Bootloader)
/dev/mtd3 (128K)
dBUG Configuration
/dev/mtd8 (128K)
dBUG Configuration Backup
/dev/mtd7 (384 KB)
User Extra Space
/dev/mtd0 (128K)
Lantronix BootLoader
/dev/mtd1 (128K)
Factory Unit Configuration
/dev/mtd2 (128K)
dBUG (Secondary Bootloader)
/dev/mtd3 (128K)
dBUG Configuration
Reserved (Dual Bank Use)
0x00C00000
0x00860000
0x00800000
/dev/mtd4 (3.5 MB)
dBUG Image Header (128 Bytes)
Linux
(Optional) ROMFS
/dev/mtd5 (4 MB)
JFFS2 User Space
(384 KB)
Unused Space
0x00860000
0x00880000
/dev/mtd5 (4 MB)
JFFS2 User Space
/dev/mtd8 (128K)
dBUG Configuration Backup
You can easily make adjustments to better fit your needs. Partition sizes and locations that
should not be altered are the first 4 flash areas. They are essential to be able to boot and
configure the Linux kernel. Additional partitions can be added, and existing ones can be
increased or shrunk (e.g. to adjust the space reserved for the kernel and ROMFS).
Please keep in mind, that some of the utilities like dbug-config and firmware update depend on
the partition names and won’t work anymore if you rename the partitions without adjusting those
utilities.
The partition definitions can be found in
linux-2.6.x/drivers/mtd/maps/m520x.c:
static struct mtd_partition m520x_partitions_including_kernel[] = {
{
.name
= "LTRXbloader",
.size
= 0x10000,
.offset = 0x0,
.mask_flags
= MTD_WRITEABLE
/* force read-only */