uClinux porting HOWTO
Support for peripherals on the board (or builtin to the processor):
uclinux/linux-2.4.x/drivers/block/blkmem.c
The blkmem driver provides access to DRAM upon which the rom filesystem exists. The romfs data is present in the uClinux binary image at the location romfs_data, specified in the file uclinux/linux-2.4.x/arch/armnommu/vmlinux-armv.lds.in. An entry in the arena[] array is added to specify this.
...
...
#ifdef CONFIG_ARCH_ACME
extern char romfs_data[];
extern char romfs_data_end[];
#endif
...
...
...
struct arena_t {
int rw;
/* Address of memory arena */
unsigned long address;
/* Length of memory arena. If -1, try to get size from
* romfs header */
unsigned long length;
/* Function to program in one go */
program_func_t program_func;
/* Function to transfer data to main memory, or zero if
* none needed */
xfer_func_t read_func;
/* Function to transfer data from main memory, zero if
* none needed */
xfer_func_t write_func;
/* Function to erase a block of memory to zeros, or 0
* if N/A */
erase_func_t erase_func;
/* Size of block that can be erased at one time, or 0
* if N/A */
unsigned long blksize;
unsigned long unitsize;
/* Contents of sectors when erased */
unsigned char erasevalue;
/*unsigned int auto_erase_bits;
unsigned int did_erase_bits;*/
} arena[] = {
#ifdef CONFIG_ARCH_ACME
{0, romfs_data, -1},
#endif
};
...
...
...