Lines Matching full:ubi
2 UBI usage in U-Boot
5 UBI support in U-Boot is broken down into five separate commands.
6 The first is the ubi command, which has six subcommands:
8 => help ubi
9 ubi - ubi commands
12 ubi part [part] [offset]
14 ubi info [l[ayout]] - Display volume and ubi layout information
15 ubi create[vol] volume [size] [type] - create volume name with size
16 ubi write[vol] address volume size - Write volume from address with size
17 ubi write.part address volume size [fullsize]
19 ubi read[vol] address volume [size] - Read volume to address with size
20 ubi remove[vol] volume - Remove volume
27 The first command that is needed to be issues is "ubi part" to connect
28 one mtd partition to the UBI subsystem. This command will either create
29 a new UBI device on the requested MTD partition. Or it will attach a
30 previously created UBI device. The other UBI commands will only work
31 when such a UBI device is attached (via "ubi part"). Here an example:
50 => ubi part root
53 UBI: attaching mtd1 to ubi0
54 UBI: physical eraseblock size: 262144 bytes (256 KiB)
55 UBI: logical eraseblock size: 262016 bytes
56 UBI: smallest flash I/O unit: 1
57 UBI: VID header offset: 64 (aligned 64)
58 UBI: data offset: 128
59 UBI: attached mtd1 to ubi0
60 UBI: MTD device name: "mtd=2"
61 UBI: MTD device size: 2 MiB
62 UBI: number of good PEBs: 8
63 UBI: number of bad PEBs: 0
64 UBI: max. allowed volumes: 128
65 UBI: wear-leveling threshold: 4096
66 UBI: number of internal volumes: 1
67 UBI: number of user volumes: 1
68 UBI: available PEBs: 0
69 UBI: total number of reserved PEBs: 8
70 UBI: number of PEBs reserved for bad PEB handling: 0
71 UBI: max/mean erase counter: 2/1
74 Now that the UBI device is attached, this device can be modified
77 ubi info Display volume and ubi layout information
78 ubi createvol Create UBI volume on UBI device
79 ubi removevol Remove UBI volume from UBI device
80 ubi read Read data from UBI volume to memory
81 ubi write Write data from memory to UBI volume
82 ubi write.part Write data from memory to UBI volume, in parts
87 => ubi create testvol
90 => ubi info l
91 UBI: volume information dump:
92 UBI: vol_id 0
93 UBI: reserved_pebs 4
94 UBI: alignment 1
95 UBI: data_pad 0
96 UBI: vol_type 3
97 UBI: name_len 7
98 UBI: usable_leb_size 262016
99 UBI: used_ebs 4
100 UBI: used_bytes 1048064
101 UBI: last_eb_bytes 262016
102 UBI: corrupted 0
103 UBI: upd_marker 0
104 UBI: name testvol
106 UBI: volume information dump:
107 UBI: vol_id 2147479551
108 UBI: reserved_pebs 2
109 UBI: alignment 1
110 UBI: data_pad 0
111 UBI: vol_type 3
112 UBI: name_len 13
113 UBI: usable_leb_size 262016
114 UBI: used_ebs 2
115 UBI: used_bytes 524032
116 UBI: last_eb_bytes 2
117 UBI: corrupted 0
118 UBI: upd_marker 0
119 UBI: name layout volume
121 => ubi info
122 UBI: MTD device name: "mtd=2"
123 UBI: MTD device size: 2 MiB
124 UBI: physical eraseblock size: 262144 bytes (256 KiB)
125 UBI: logical eraseblock size: 262016 bytes
126 UBI: number of good PEBs: 8
127 UBI: number of bad PEBs: 0
128 UBI: smallest flash I/O unit: 1
129 UBI: VID header offset: 64 (aligned 64)
130 UBI: data offset: 128
131 UBI: max. allowed volumes: 128
132 UBI: wear-leveling threshold: 4096
133 UBI: number of internal volumes: 1
134 UBI: number of user volumes: 1
135 UBI: available PEBs: 0
136 UBI: total number of reserved PEBs: 8
137 UBI: number of PEBs reserved for bad PEB handling: 0
138 UBI: max/mean erase counter: 4/1
140 => ubi write 800000 testvol 80000
143 => ubi read 900000 testvol 80000
152 UBI partition which has been attached with the ubi part command:
164 UBIFS: mounted UBI device 0, volume 0, name "recovery"
172 Note that unlike Linux, U-Boot can only have one active UBI partition
177 Once a UBI filesystem has been mounted, the ubifsls command allows you
195 And the ubifsload command allows you to load a file from a UBI
213 Finally, you can unmount the UBI filesystem with the ubifsumount