The physical and virtual address of the flash memory used for XIP
must be defined statically with the macros CONFIG_XIP_PHYS_ADDR and
CONFIG_XIP_VIRT_ADDR. The virtual address usually points to the end
of the kernel virtual address of the system memory. The physical and
virtual address must be aligned relative to an 8 MB boundary:

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.

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: