1 U-Boot supports access of both ext2 and ext4 filesystems, either in read-only
2 mode or in read-write mode.
4 First, to enable support for both ext4 (and, automatically, ext2 as well),
5 but without selecting the corresponding commands, enable one of the following:
7 CONFIG_FS_EXT4 (for read-only)
8 CONFIG_EXT4_WRITE (for read-write)
10 Next, to select the ext2-related commands:
15 or ext4-related commands:
26 Selecting either of the above automatically selects CONFIG_FS_EXT4 if it
27 wasn't enabled already.
29 In addition, to get the write access command "ext4write", enable:
33 which automatically selects CONFIG_EXT4_WRITE if it wasn't defined
36 Also relevant are the generic filesystem commands, selected by:
40 This does not automatically enable EXT4 support for you, you still need
43 Some sample commands to test ext4 support:
45 1. Check that the commands can be seen in the output of U-Boot help:
49 ext4load- load binary file from a Ext4 file system
50 ext4ls - list files in a directory (default /)
51 ext4size - determine a file's size
52 ext4write- create a file in ext4 formatted partition
55 2. To list the files in an ext4-formatted partition, run:
57 ext4ls <interface> <dev[:part]> [directory]
60 UBOOT #ext4ls mmc 0:5 /usr/lib
62 3. To read and load a file from an ext4-formatted partition to RAM, run:
64 ext4load <interface> <dev[:part]> [addr] [filename] [bytes]
67 UBOOT #ext4load mmc 2:2 0x30007fc0 uImage
69 4. To write a file to an ext4-formatted partition.
71 a) First load a file to RAM at a particular address for example 0x30007fc0.
72 Now execute ext4write command:
73 ext4write <interface> <dev[:part]> [filename] [Address] [sizebytes]
76 UBOOT #ext4write mmc 2:2 /boot/uImage 0x30007fc0 6183120
77 (here 6183120 is the size of the file to be written)
78 Note: Absolute path is required for the file to be written
81 -- ext4 implementation in Linux Kernel
82 -- Uboot existing ext2 load and ls implementation
83 -- Journaling block device JBD2 implementation in linux Kernel