Commit cc63bb05ef271b3b63d9cd2fe1b52ff766d2fc65
Committed by
Tom Rini
1 parent
e7dcecea9b
Exists in
master
and in
53 other branches
doc/README.ubi: Add description of accessing ubi filesystems
Signed-off-by: "Paul B. Henson" <henson@acm.org>
Showing 1 changed file with 79 additions and 1 deletions Side-by-side Diff
doc/README.ubi
... | ... | @@ -2,7 +2,8 @@ |
2 | 2 | UBI usage in U-Boot |
3 | 3 | ------------------- |
4 | 4 | |
5 | -Here the list of the currently implemented UBI commands: | |
5 | +UBI support in U-Boot is broken down into five separate commands. | |
6 | +The first is the ubi command, which has six subcommands: | |
6 | 7 | |
7 | 8 | => help ubi |
8 | 9 | ubi - ubi commands |
... | ... | @@ -142,4 +143,81 @@ |
142 | 143 | |
143 | 144 | => cmp.b 800000 900000 80000 |
144 | 145 | Total of 524288 bytes were the same |
146 | + | |
147 | + | |
148 | +Next, the ubifsmount command allows you to access filesystems on the | |
149 | +UBI partition which has been attached with the ubi part command: | |
150 | + | |
151 | +=> help ubifsmount | |
152 | +ubifsmount - mount UBIFS volume | |
153 | + | |
154 | +Usage: | |
155 | +ubifsmount <volume-name> | |
156 | + - mount 'volume-name' volume | |
157 | + | |
158 | +For example: | |
159 | + | |
160 | +=> ubifsmount ubi0:recovery | |
161 | +UBIFS: mounted UBI device 0, volume 0, name "recovery" | |
162 | +UBIFS: mounted read-only | |
163 | +UBIFS: file system size: 46473216 bytes (45384 KiB, 44 MiB, 366 LEBs) | |
164 | +UBIFS: journal size: 6348800 bytes (6200 KiB, 6 MiB, 50 LEBs) | |
165 | +UBIFS: media format: w4/r0 (latest is w4/r0) | |
166 | +UBIFS: default compressor: LZO | |
167 | +UBIFS: reserved for root: 0 bytes (0 KiB) | |
168 | + | |
169 | +Note that unlike Linux, U-Boot can only have one active UBI partition | |
170 | +at a time, which can be referred to as ubi0, and must be supplied along | |
171 | +with the name of the filesystem you are mounting. | |
172 | + | |
173 | + | |
174 | +Once a UBI filesystem has been mounted, the ubifsls command allows you | |
175 | +to list the contents of a directory in the filesystem: | |
176 | + | |
177 | + | |
178 | +=> help ubifsls | |
179 | +ubifsls - list files in a directory | |
180 | + | |
181 | +Usage: | |
182 | +ubifsls [directory] | |
183 | + - list files in a 'directory' (default '/') | |
184 | + | |
185 | +For example: | |
186 | + | |
187 | +=> ubifsls | |
188 | + 17442 Thu Jan 01 02:57:38 1970 imx28-evk.dtb | |
189 | + 2998146 Thu Jan 01 02:57:43 1970 zImage | |
190 | + | |
191 | + | |
192 | +And the ubifsload command allows you to load a file from a UBI | |
193 | +filesystem: | |
194 | + | |
195 | + | |
196 | +=> help ubifsload | |
197 | +ubifsload - load file from an UBIFS filesystem | |
198 | + | |
199 | +Usage: | |
200 | +ubifsload <addr> <filename> [bytes] | |
201 | + - load file 'filename' to address 'addr' | |
202 | + | |
203 | +For example: | |
204 | + | |
205 | +=> ubifsload ${loadaddr} zImage | |
206 | +Loading file 'zImage' to addr 0x42000000 with size 2998146 (0x002dbf82)... | |
207 | +Done | |
208 | + | |
209 | + | |
210 | +Finally, you can unmount the UBI filesystem with the ubifsumount | |
211 | +command: | |
212 | + | |
213 | +=> help ubifsumount | |
214 | +ubifsumount - unmount UBIFS volume | |
215 | + | |
216 | +Usage: | |
217 | +ubifsumount - unmount current volume | |
218 | + | |
219 | +For example: | |
220 | + | |
221 | +=> ubifsumount | |
222 | +Unmounting UBIFS volume recovery! |