<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/cmd/ubi.c, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/cmd/ubi.c?h=main</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/cmd/ubi.c?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-07-08T09:34:44Z</updated>
<entry>
<title>cmd: ubi: allow creating volume with all free spaces in ubi_create_vol</title>
<updated>2026-07-08T09:34:44Z</updated>
<author>
<name>Weijie Gao</name>
<email>weijie.gao@mediatek.com</email>
</author>
<published>2026-05-20T08:27:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c719d2627ae67903199045c6072a3370b395b7ef'/>
<id>urn:sha1:c719d2627ae67903199045c6072a3370b395b7ef</id>
<content type='text'>
Although the ubi command itself supports creating volume with all
free spaces, the api ubi_create_vol() does not.

Since negative size is invalid, this patch replaces negative size
with all free space size in ubi_create_vol().

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
</content>
</entry>
<entry>
<title>cmd: ubi: export more APIs to public</title>
<updated>2026-07-08T09:34:12Z</updated>
<author>
<name>Weijie Gao</name>
<email>weijie.gao@mediatek.com</email>
</author>
<published>2026-05-20T08:27:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=14fe02ac5e5260a0dad58804cc6c922827bf9d7e'/>
<id>urn:sha1:14fe02ac5e5260a0dad58804cc6c922827bf9d7e</id>
<content type='text'>
Export the following functions to public:

- ubi_detach(): this is paired with ubi_part(). One may call this function
  to completely clean up the ubi subsystem after using ubi_part().

- ubi_{create,find,remove}_vol: this is a set of functions for volume
  management.

The original ubi_remove_vol is renamed to __ubi_remove_vol to allow the new
ubi_remove_vol() being used as a wrapper for __ubi_remove_vol() with volume
name.

Also, comments are added for all exported functions.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
</content>
</entry>
<entry>
<title>cmd: ubi: reorganize command messages</title>
<updated>2026-07-08T09:33:09Z</updated>
<author>
<name>Weijie Gao</name>
<email>weijie.gao@mediatek.com</email>
</author>
<published>2026-05-20T08:27:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=75d8b453ab2fd9f736844a25c3e6628668d9562f'/>
<id>urn:sha1:75d8b453ab2fd9f736844a25c3e6628668d9562f</id>
<content type='text'>
This patch moves normal subcommand messages into the main command function.
This will allow current and potential api functions being called with clean
output on success.

A new function ubi_require_volume() is added for finding and printing error
message if volume not found. The original ubi_find_volume() will be silent
for being an api function.

To avoid ubi_require_volume() being called twice for volume read/remove,
some changes are required:
- The parameter of ubi_remove_vol() is changed to accept
'struct ubi_volume *' directly.
- The original ubi_volume_read() is renamed to __ubi_volume_read, with its
  first parameter changed to accept also 'struct ubi_volume *' directly.
- A new ubi_volume_read() is added to wrap __ubi_volume_read() to accept
  volume name as its first parameter.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
</content>
</entry>
<entry>
<title>cmd: ubi: change all positive error return value to negative</title>
<updated>2026-07-08T09:30:53Z</updated>
<author>
<name>Weijie Gao</name>
<email>weijie.gao@mediatek.com</email>
</author>
<published>2026-05-20T08:27:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b452246c8d378f8b38ee0a6ed49402b62fe94f7a'/>
<id>urn:sha1:b452246c8d378f8b38ee0a6ed49402b62fe94f7a</id>
<content type='text'>
Change all return value using errno codes to negative. This makes it
consistent with the linux ubi layer.

Also, to follow the standard definition of U-Boot command, in the do_ubi()
command handler, the return value is converted to CMD_RET_FAILURE for error
returning, and CMD_RET_USAGE for incorrect usage.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
</content>
</entry>
<entry>
<title>cmd: ubi: change the type of parameter dynamic to bool</title>
<updated>2026-07-08T09:30:37Z</updated>
<author>
<name>Weijie Gao</name>
<email>weijie.gao@mediatek.com</email>
</author>
<published>2026-05-20T08:27:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2818e678214f69d7c1185a493a6ca03379b3927e'/>
<id>urn:sha1:2818e678214f69d7c1185a493a6ca03379b3927e</id>
<content type='text'>
This patch changes the type of the 'dynamic' parameter of ubi_create_vol()
to bool as it's used as a boolean.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
</content>
</entry>
<entry>
<title>cmd: ubi: use void * for buf parameter in ubi_volume_read</title>
<updated>2026-07-08T09:29:55Z</updated>
<author>
<name>Weijie Gao</name>
<email>weijie.gao@mediatek.com</email>
</author>
<published>2026-05-20T08:27:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b63af5e2c20cc9d2d510c5ff38d48114582d410d'/>
<id>urn:sha1:b63af5e2c20cc9d2d510c5ff38d48114582d410d</id>
<content type='text'>
Use void * to avoid explicit type casting as what ubi_volume_write has done
already.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
</content>
</entry>
<entry>
<title>cmd: ubi: mark read-only function parameters with const</title>
<updated>2026-07-08T09:29:28Z</updated>
<author>
<name>Weijie Gao</name>
<email>weijie.gao@mediatek.com</email>
</author>
<published>2026-05-20T08:27:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=065b0ba3b14fd6795626b89d5e8e3daede02475a'/>
<id>urn:sha1:065b0ba3b14fd6795626b89d5e8e3daede02475a</id>
<content type='text'>
Parameters like part/volume name and buffer for writing are not being
modified by the callee functions and should be marked const.

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
</content>
</entry>
<entry>
<title>ubi: extend support for LED activity</title>
<updated>2025-10-08T09:34:54Z</updated>
<author>
<name>Yegor Yefremov</name>
<email>yegorslists@googlemail.com</email>
</author>
<published>2025-10-02T11:35:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2bc0837ce19c64af44ccb912fc9c9e3a52269dec'/>
<id>urn:sha1:2bc0837ce19c64af44ccb912fc9c9e3a52269dec</id>
<content type='text'>
Add LED activity for ubi_dev_scan() and ubi_volume_read() routines.

Signed-off-by: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ubi: implement support for LED activity</title>
<updated>2024-10-10T22:02:20Z</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2024-10-01T12:24:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=990f726ce797c040adda6d1e1bc6a21bd2b28657'/>
<id>urn:sha1:990f726ce797c040adda6d1e1bc6a21bd2b28657</id>
<content type='text'>
Implement support for LED activity. If the feature is enabled,
make the defined ACTIVITY LED to signal ubi write operation.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>ubi: allow to write to volume with offset</title>
<updated>2024-08-08T07:27:58Z</updated>
<author>
<name>Alexey Romanov</name>
<email>avromanov@salutedevices.com</email>
</author>
<published>2024-07-18T05:45:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=25ee9c2005958e6f06609eef5c9d9915c77ece97'/>
<id>urn:sha1:25ee9c2005958e6f06609eef5c9d9915c77ece97</id>
<content type='text'>
Introduce ubi_volume_offset_write() helper, which
allow to write to ubi volume with specified offset.

Signed-off-by: Alexey Romanov &lt;avromanov@salutedevices.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
</content>
</entry>
</feed>
