5 Flash Partitioning
Linux Software Developers Kit (SDK) User Guide
40
Let's assume you want an image consisting of the kernel followed by a JFFS2 root partition that
uses all available flash space. Perform the following steps:
1. Download and flash the kernel image
dBUG> dnfl linux.bin
Address: 0x4001FF80
Downloading Image 'linux.bin' from 172.19.39.1
TFTP transfer completed
Read 1396736 bytes (2729 blocks)
Must erase complete sectors (0x00040000 to 0x0019FFFF)
Continue (yes | no)? yes
......................
Flash Erase complete. 0x160000 bytes erased
Program successfully flashed...
2. Determine the address where the jffs2 image will go to.
Since the dnfl command output from step 1 shows that the kernel was written to
0x001CFFFF, we will have to write the jffs2 image past this address. Note that the address
must be at the start of a flash erase block. Flash erase blocks are 64KB (128KB on XPort
Pro). In this example, the minimum address we can use would be 0x00200000, though in
many cases it is a good idea to leave extra room for future upgrades of the kernel. For now
we'll just use 0x00200000.
3. The default size for the JFFS2 file system is 4MB. It is hard-coded in <install-
dir>/linux/vendors/Lantronix/<platform>/config.arch. Since we have 6MB available, we want
to make use of it. Look for the lines:
JFFS2_SIZE = 0x400000
in Config.arch and adjust the JFFS2_SIZE to 0x600000.
You need to rebuild rootfs.img to honor the last change. This can be achieved by just typing
make under linux/
4. Download and flash the jffs2 root image. The starting address used here is 0x00200000, but
it will vary depending on the feature set enabled in the kernel. The size of the jffs2 image
used here is 6MB.
dBUG> dn rootfs.img
Address: 0x4001FF80
Downloading Image 'rootfs.img' from 172.19.39.1
TFTP transfer completed
Read 6291456 bytes (12289 blocks)
For all platforms
dBUG> fl w 0x00200000 0x4001FF80 0x600000
................................................................
Flash Write complete. 0x600000 bytes written