Specifications
CONFIG_XIP_PHYS_ADDR = FLASH-base-address + offset-in-FLASH
CONFIG_XIP_VIRT_ADDR = 0xc0000000 + DRAM-size + offset-in-FLASH
The default configuration parameters shown above are for a system with 16MB of DRAM and the XIP kernel
image located at the physical address 0x40100000 in flash memory.
Note that the FLASH and MTD driver must be disabled.
You can then build the "uImage", copy it to CONFIG_XIP_PHYS_ADDR in flash memory and boot it from
CONFIG_XIP_PHYS_ADDR as usual.
14.3.26.2. Cramfs Filesystem
The cramfs filesystem enhancements:
They allow cramfs optional direct access to a cramfs image in memory (ram, rom, flash). It eliminates
the unnecessary step of passing data through an intermediate buffer, as compared to accessing the
same image through a memory block device like mtdblock.
•
They allow optional cramfs linear root support. This eliminates the requirement of having to provide a
block device to use a linear cramfs image as the root filesystem.
•
They provide optional XIP. It extends mkcramfs to store files marked "+t" uncompressed and
page-aligned. Linux can then mmap those files and execute them in-place without copying them
entirely to ram first.
•
Note: the current implementation can only be used together with a XIP kernel, which provides the appropriate
XIP memory (FLASH) mapping.
To configure a root file system on linear cramfs with XIP select:
$ cd <xip-linux-root>
$ make menuconfig
...
File systems --->"
...
<*> Compressed ROM file system support
[*] Use linear addressing for cramfs
(40400000) Physical address of linear cramfs
[*] Support XIP on linear cramfs
[*] Root file system on linear cramfs
This defines a cramfs filesystem located at the physical address 0x40400000 in FLASH memory.
After building the kernel image "pImage" as usual, you will want to build a filesystem using the mkcramfs
executable (it's located in /scripts/cramfs). If you do not already have a reasonable sized disk directory tree
you will need to make one. The ramdisk directory of SELF (the Simple Embedded Linux Framework from
DENX at ftp.denx.de) is a good starting point. Before you build your cramfs image you must mark the binary
files to be executed in place later on with the "t" permission:
$ mkcramfs -r ramdisk cramfs.img
and copy it to the defined place in FLASH memory.
You can then boot the XIP kernel with the cramfs root filesystem using the boot argument:
$ setenv bootargs root=/dev/cramfs ...
14.3.26.1. XIP Kernel 192