<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/cmd/bootd.c, branch next</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/cmd/bootd.c?h=next</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/cmd/bootd.c?h=next'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-08-22T00:01:01Z</updated>
<entry>
<title>cmd: allow bootd without bootm</title>
<updated>2026-08-22T00:01:01Z</updated>
<author>
<name>Mehmet Fide</name>
<email>mehmet.fide@screeningeagle.com</email>
</author>
<published>2026-08-14T21:30:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=505a24d95c887a037ec7dcf40afa374fc002788f'/>
<id>urn:sha1:505a24d95c887a037ec7dcf40afa374fc002788f</id>
<content type='text'>
do_bootd() runs the "bootcmd" environment variable through run_command()
and does nothing else. It uses no bootm functionality, and neither does
the "bootd" recursion guard in cmd_process(). doc/usage/cmd/bootd.rst
documents it that way, with an example that sets bootcmd to
"echo Hello World".

Commit 1fd04cf46baf ("cmd: Correct dependencies for CMD_BOOTD") made
CMD_BOOTD depend on CMD_BOOTM because the build fails otherwise:
common/command.c is compiled unconditionally and references do_bootd(),
whose definition sits in cmd/bootm.c, which is only compiled when
CMD_BOOTM=y. The dependency therefore describes where the code lives
rather than what it needs, and the boards that disable CMD_BOOTM
(colibri_vf, iot_devkit, mx6memcal and r8a78000_ironhide_cm33) cannot
offer "boot" or "bootd" at all, although the implementation would work
there.

Move do_bootd() and its two command registrations into cmd/bootd.c,
compiled from CMD_BOOTD, and drop the artificial dependency. To leave
every board in tree unchanged, CMD_BOOTD now defaults to y only when
CMD_BOOTM is enabled, which is precisely the set of boards that have it
today. Boards without bootm can enable it deliberately.

Tested on sandbox: bootd, the "boot" alias, the return value taken from
a failing bootcmd and the recursion guard all behave as before. Also
tested on a Colibri VF50 (vf610) board built with CMD_BOOTM=n and
CMD_BOOTD=y, a combination that could not be selected before: "boot" and
"bootd" run bootcmd and bring up the OS, and a bootcmd of "false"
returns 1. A colibri_vf_defconfig build with CMD_BOOTD left off is byte
identical to the previous one apart from the version string; enabling
CMD_BOOTD costs 272 bytes.

Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Mehmet Fide &lt;mehmet.fide@screeningeagle.com&gt;
</content>
</entry>
</feed>
