<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/cmd/bcb.c, branch next</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>global: Avoid indirect inclusion of &lt;env.h&gt; from &lt;command.h&gt;</title>
<updated>2025-05-29T14:29:16+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2025-05-14T22:46:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dcb7d927d181b5798c6fd4a1b1650cd821e3b6ed'/>
<id>dcb7d927d181b5798c6fd4a1b1650cd821e3b6ed</id>
<content type='text'>
The include file &lt;command.h&gt; does not need anything from &lt;env.h&gt;.
Furthermore, include/env.h itself includes other headers which can lead
to longer indirect inclusion paths. To prepare to remove &lt;env.h&gt; from
&lt;command.h&gt; fix all of the places which had relied on this indirect
inclusion to instead include &lt;env.h&gt; directly.

Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@kernel.org&gt; # android, bcb
Reviewed-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt; # spawn
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The include file &lt;command.h&gt; does not need anything from &lt;env.h&gt;.
Furthermore, include/env.h itself includes other headers which can lead
to longer indirect inclusion paths. To prepare to remove &lt;env.h&gt; from
&lt;command.h&gt; fix all of the places which had relied on this indirect
inclusion to instead include &lt;env.h&gt; directly.

Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@kernel.org&gt; # android, bcb
Reviewed-by: Jerome Forissier &lt;jerome.forissier@linaro.org&gt; # spawn
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: bcb: introduce 'ab_dump' command to print BCB block content</title>
<updated>2024-10-24T07:45:55+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@salutedevices.com</email>
</author>
<published>2024-10-17T14:12:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a995084beb6682748002878ccb4b8c4de9fc0136'/>
<id>a995084beb6682748002878ccb4b8c4de9fc0136</id>
<content type='text'>
It's really helpful to have the ability to dump BCB block for debugging
A/B logic on the board supported this partition schema.

Command 'bcb ab_dump' prints all fields of bootloader_control struct
including slot_metadata for all presented slots.

Output example:
=====
&gt; board# bcb ab_dump ubi 0#misc
&gt; Read 512 bytes from volume misc to 000000000bf07580
&gt; Read 512 bytes from volume misc to 000000000bf42f40
&gt; Bootloader Control:       [misc]
&gt; Active Slot:              _a
&gt; Magic Number:             0x42414342
&gt; Version:                  1
&gt; Number of Slots:          2
&gt; Recovery Tries Remaining: 0
&gt; CRC:                      0x2c8b50bc (Valid)
&gt;
&gt; Slot[0] Metadata:
&gt; 	- Priority:         15
&gt; 	- Tries Remaining:  0
&gt; 	- Successful Boot:  1
&gt; 	- Verity Corrupted: 0
&gt;
&gt; Slot[1] Metadata:
&gt; 	- Priority:         14
&gt; 	- Tries Remaining:  7
&gt; 	- Successful Boot:  0
&gt; 	- Verity Corrupted: 0
====

The ab_dump command allows you to display ABC data directly on the
U-Boot console. During an A/B test execution, this test verifies the
accuracy of each field within the ABC data.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-5-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's really helpful to have the ability to dump BCB block for debugging
A/B logic on the board supported this partition schema.

Command 'bcb ab_dump' prints all fields of bootloader_control struct
including slot_metadata for all presented slots.

Output example:
=====
&gt; board# bcb ab_dump ubi 0#misc
&gt; Read 512 bytes from volume misc to 000000000bf07580
&gt; Read 512 bytes from volume misc to 000000000bf42f40
&gt; Bootloader Control:       [misc]
&gt; Active Slot:              _a
&gt; Magic Number:             0x42414342
&gt; Version:                  1
&gt; Number of Slots:          2
&gt; Recovery Tries Remaining: 0
&gt; CRC:                      0x2c8b50bc (Valid)
&gt;
&gt; Slot[0] Metadata:
&gt; 	- Priority:         15
&gt; 	- Tries Remaining:  0
&gt; 	- Successful Boot:  1
&gt; 	- Verity Corrupted: 0
&gt;
&gt; Slot[1] Metadata:
&gt; 	- Priority:         14
&gt; 	- Tries Remaining:  7
&gt; 	- Successful Boot:  0
&gt; 	- Verity Corrupted: 0
====

The ab_dump command allows you to display ABC data directly on the
U-Boot console. During an A/B test execution, this test verifies the
accuracy of each field within the ABC data.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-5-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: bcb: change strcmp() usage style in the do_bcb_ab_select()</title>
<updated>2024-10-24T07:45:55+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@salutedevices.com</email>
</author>
<published>2024-10-17T14:12:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b1bc9a2fc93da8ed25dfc4078e76220ac26eb6b0'/>
<id>b1bc9a2fc93da8ed25dfc4078e76220ac26eb6b0</id>
<content type='text'>
In the entire cmd/bcb.c file, the return value of strcmp() is not
directly compared to 0. Therefore, it would be better to maintain this
style in the new do_bcb_ab_select() function as well.

Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Guillaume La Roque &lt;glaroque@baylibre.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-4-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the entire cmd/bcb.c file, the return value of strcmp() is not
directly compared to 0. Therefore, it would be better to maintain this
style in the new do_bcb_ab_select() function as well.

Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Guillaume La Roque &lt;glaroque@baylibre.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-4-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: bcb: move ab_select command to bcb subcommands</title>
<updated>2024-10-24T07:45:55+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@salutedevices.com</email>
</author>
<published>2024-10-17T14:12:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b523b4d2c32f07ca0793bb0f926b02ecb0556cc6'/>
<id>b523b4d2c32f07ca0793bb0f926b02ecb0556cc6</id>
<content type='text'>
To enhance code organization, it is beneficial to consolidate all A/B
BCB management routines into a single super-command.
The 'bcb' command is an excellent candidate for this purpose.

This patch integrates the separate 'ab_select' command into the 'bcb'
group as the 'ab_select' subcommand, maintaining the same parameter list
for consistency.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-3-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To enhance code organization, it is beneficial to consolidate all A/B
BCB management routines into a single super-command.
The 'bcb' command is an excellent candidate for this purpose.

This patch integrates the separate 'ab_select' command into the 'bcb'
group as the 'ab_select' subcommand, maintaining the same parameter list
for consistency.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-3-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: bcb: rework the command to U_BOOT_LONGHELP approach</title>
<updated>2024-10-24T07:45:55+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@salutedevices.com</email>
</author>
<published>2024-10-17T14:12:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a8ca7d46ea744381185c0bf70cbdf4db7dc734b7'/>
<id>a8ca7d46ea744381185c0bf70cbdf4db7dc734b7</id>
<content type='text'>
U_BOOT_LONGHELP and U_BOOT_CMD_WITH_SUBCMDS offer numerous advantages,
including:
- common argument restrictions checking
- automatic subcommand matching
- improved usage and help handling

By utilizing the U_BOOT_LONGHELP approach, we can reduce the amount of
command management code and describe commands more succinctly.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-2-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
U_BOOT_LONGHELP and U_BOOT_CMD_WITH_SUBCMDS offer numerous advantages,
including:
- common argument restrictions checking
- automatic subcommand matching
- improved usage and help handling

By utilizing the U_BOOT_LONGHELP approach, we can reduce the amount of
command management code and describe commands more succinctly.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # vim3_android
Link: https://lore.kernel.org/r/20241017-android_ab_master-v5-2-43bfcc096d95@salutedevices.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: bcb: Fix segfault on invalid block device</title>
<updated>2024-08-22T07:23:33+00:00</updated>
<author>
<name>Mattijs Korpershoek</name>
<email>mkorpershoek@baylibre.com</email>
</author>
<published>2024-07-24T09:51:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=61faa6dd21f661cab95aa00a6660441a5f04f8db'/>
<id>61faa6dd21f661cab95aa00a6660441a5f04f8db</id>
<content type='text'>
When blk_get_dev() fails, block NULL and gets de-referenced in
the error path by a printf(), resulting in a crash.

This can be reproduced on sandbox with:

$ ./u-boot --command "bcb load mmc 0 0"

Fix the message by using the functions arguments (iface, devnum)
instead.

Note: partition (being a global static initialized) can be used safely.

This issue has been reported by coverity [1]

[1] https://lore.kernel.org/all/20240723141844.GF989285@bill-the-cat/

Fixes: dfeb4f0d7935 ("cmd: bcb: extend BCB C API to allow read/write the fields")
Reviewed-by: Dmitrii Merkurev &lt;dimorinny@google.com&gt;
Link: https://lore.kernel.org/r/20240724-bcb-crash-v1-1-44caff15bce4@baylibre.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When blk_get_dev() fails, block NULL and gets de-referenced in
the error path by a printf(), resulting in a crash.

This can be reproduced on sandbox with:

$ ./u-boot --command "bcb load mmc 0 0"

Fix the message by using the functions arguments (iface, devnum)
instead.

Note: partition (being a global static initialized) can be used safely.

This issue has been reported by coverity [1]

[1] https://lore.kernel.org/all/20240723141844.GF989285@bill-the-cat/

Fixes: dfeb4f0d7935 ("cmd: bcb: extend BCB C API to allow read/write the fields")
Reviewed-by: Dmitrii Merkurev &lt;dimorinny@google.com&gt;
Link: https://lore.kernel.org/r/20240724-bcb-crash-v1-1-44caff15bce4@baylibre.com
Signed-off-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"</title>
<updated>2024-05-20T19:35:03+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-05-20T19:35:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=03de305ec48b0bb28554372abb40ccd46dbe0bf9'/>
<id>03de305ec48b0bb28554372abb40ccd46dbe0bf9</id>
<content type='text'>
As part of bringing the master branch back in to next, we need to allow
for all of these changes to exist here.

Reported-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As part of bringing the master branch back in to next, we need to allow
for all of these changes to exist here.

Reported-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""</title>
<updated>2024-05-19T14:16:36+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-05-19T02:20:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d678a59d2d719da9e807495b4b021501f2836ca5'/>
<id>d678a59d2d719da9e807495b4b021501f2836ca5</id>
<content type='text'>
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: Remove &lt;common.h&gt; and add needed includes</title>
<updated>2024-05-06T21:05:04+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2024-04-27T14:10:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=301bac6047c85e2c5e39929805ca661bb09a7481'/>
<id>301bac6047c85e2c5e39929805ca661bb09a7481</id>
<content type='text'>
Remove &lt;common.h&gt; from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove &lt;common.h&gt; from all "cmd/" files and when needed add
missing include files directly.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: bcb: extend BCB C API to allow read/write the fields</title>
<updated>2023-11-16T23:59:58+00:00</updated>
<author>
<name>Dmitrii Merkurev</name>
<email>dimorinny@google.com</email>
</author>
<published>2023-11-10T05:59:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dfeb4f0d79351dc0256b45c7a9f26c752c4e0e09'/>
<id>dfeb4f0d79351dc0256b45c7a9f26c752c4e0e09</id>
<content type='text'>
Currently BCB C API only allows to modify 'command' BCB field.
Extend it so that we can also read and modify all the available
BCB fields (command, status, recovery, stage).

Co-developed-by: Cody Schuffelen &lt;schuffelen@google.com&gt;
Signed-off-by: Cody Schuffelen &lt;schuffelen@google.com&gt;
Signed-off-by: Dmitrii Merkurev &lt;dimorinny@google.com&gt;
Cc: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Cc: Ying-Chun Liu (PaulLiu) &lt;paul.liu@linaro.org&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Cc: Sean Anderson &lt;sean.anderson@seco.com&gt;
Cc: Cody Schuffelen &lt;schuffelen@google.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # on vim3
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently BCB C API only allows to modify 'command' BCB field.
Extend it so that we can also read and modify all the available
BCB fields (command, status, recovery, stage).

Co-developed-by: Cody Schuffelen &lt;schuffelen@google.com&gt;
Signed-off-by: Cody Schuffelen &lt;schuffelen@google.com&gt;
Signed-off-by: Dmitrii Merkurev &lt;dimorinny@google.com&gt;
Cc: Eugeniu Rosca &lt;erosca@de.adit-jv.com&gt;
Cc: Ying-Chun Liu (PaulLiu) &lt;paul.liu@linaro.org&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
Cc: Sean Anderson &lt;sean.anderson@seco.com&gt;
Cc: Cody Schuffelen &lt;schuffelen@google.com&gt;
Tested-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt; # on vim3
Reviewed-by: Mattijs Korpershoek &lt;mkorpershoek@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
