Skip to main content.
Navigation:
DENX
>
DULG
>
FlashFilesystemsMTD
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
%SECTION0{name=FlashFilesystemsMtd}% Memory Technology Devices All currently available flash filesystems are based on the Memory Technology Devices *MTD* layer, so you must enable (at least) the following configuration options to get flash filesystem support in your system: <pre> CONFIG_MTD=y CONFIG_MTD_PARTITIONS=y CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y CONFIG_MTD_CFI=y CONFIG_MTD_GEN_PROBE=y CONFIG_MTD_CFI_AMDSTD=y CONFIG_MTD_ROM=y CONFIG_MTD_%BOARD%=y </pre> %X% Note: this configuration uses *CFI* conformant AMD flash chips; you may need to adjust these settings on other boards. %IF{ "%HAVE_FDT%" eq "true" }% The partition layout of the flash devices is contained in the flat device tree for the system (see %REF{type=Section,topic=Appendix,name=FlatDeviceTree}%). %ELSE% The layout of your flash devices ("partitioning") in 2.4 Linux kernels was defined by the mapping routines for your board in the Linux MTD sources (see _drivers/mtd/maps/_). The configuration for the %BOARDNAME% looks like this: %INCLUDE{DULGData_%BOARD%.LinuxMtdMap}% <!-- now we need a matching explanation, so please provide one! --> %INCLUDE{DULGData_%BOARD%.LinuxMtdLayout}% %ENDIF% Informational messages of the =MTD= subsystem can be found in the Linux bootlog, i.e. see section %REF{type=Section,topic=LinuxNfsRoot,name=LinuxBootlog}%. One can discover this information in a running system using the =proc= filesystem: %INCLUDE{DULGData_%BOARD%.LinuxProcMtd}% Now we can run some basic tests to verify that the flash driver routines and the partitioning works as expected: %INCLUDE{DULGData_%BOARD%.LinuxMtdDump}% In the hex-dumps of the MTD devices you can identify some strings that verify that we indeed see an U-Boot environment, a Linux kernel, a ramdisk image and an empty partition to play wih. The last output shows the partition to be empty. We can try write some data into it: %INCLUDE{DULGData_%BOARD%.LinuxMtdWrite}% As you can see it worked the first time. When we tried to write the (new date) again, we got an error. The reason is that the date has changed (probably at least the seconds) and flash memory cannot be simply overwritten - it has to be erased first. You can use the =eraseall= Linux commands to erase a whole MTD partition: %INCLUDE{DULGData_%BOARD%.LinuxMtdErase}% We have now sufficient proof that the MTD layer is working as expected, so we can try creating a flash filesystem.
9.1. Flash Filesystems
1. Abstract
9.1.2. Journalling Flash File System
Prev
Home
Next