From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
Dmitrii Merkurev <dimorinny@google.com>,
Heiko Schocher <hs@denx.de>,
Mattijs Korpershoek <mkorpershoek@baylibre.com>,
Patrick Delaunay <patrick.delaunay@foss.st.com>,
Samuel Holland <samuel@sholland.org>,
Sean Anderson <sean.anderson@seco.com>
Subject: Re: [PATCH 08/25] fastboot: Avoid depending on CMDLINE
Date: Sun, 24 Sep 2023 18:59:37 -0400 [thread overview]
Message-ID: <20230924225937.GL305624@bill-the-cat> (raw)
In-Reply-To: <20230924203953.1829820-9-sjg@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 2029 bytes --]
On Sun, Sep 24, 2023 at 02:39:26PM -0600, Simon Glass wrote:
> When CMDLINE is not enabled, this code fails to build. Correct this by
> adding conditions.
>
> Note that this should not happen in normal use, since the use of
> 'select CMDLINE' will cause a visible warning. But it is needed for the
> sandbox build to pass without CMDLINE.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> drivers/fastboot/fb_command.c | 3 ++-
> drivers/fastboot/fb_common.c | 15 +++++++++++++--
> 2 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c
> index 71cfaec6e9dc..4e52e6f0f8bf 100644
> --- a/drivers/fastboot/fb_command.c
> +++ b/drivers/fastboot/fb_command.c
> @@ -346,7 +346,8 @@ static char g_a_cmd_buff[64];
>
> void fastboot_acmd_complete(void)
> {
> - run_command(g_a_cmd_buff, 0);
> + if (IS_ENABLED(CONFIG_CMDLINE))
> + run_command(g_a_cmd_buff, 0);
> }
>
> /**
> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
> index 4e9d9b719c6f..35b7aafe5af3 100644
> --- a/drivers/fastboot/fb_common.c
> +++ b/drivers/fastboot/fb_common.c
> @@ -132,6 +132,13 @@ void fastboot_boot(void)
> {
> char *s;
>
> + /*
> + * Avoid a build error; this will always have generated a Kconfig
> + * warning about CMDLINE not being enabled
> + */
> + if (!IS_ENABLED(CONFIG_CMDLINE))
> + return;
> +
> s = env_get("fastboot_bootcmd");
> if (s) {
> run_command(s, CMD_FLAG_ENV);
> @@ -170,8 +177,12 @@ void fastboot_handle_boot(int command, bool success)
>
> switch (command) {
> case FASTBOOT_COMMAND_BOOT:
> - fastboot_boot();
> - net_set_state(NETLOOP_SUCCESS);
> + if (IS_ENABLED(CONFIG_CMDLINE)) {
> + fastboot_boot();
> + net_set_state(NETLOOP_SUCCESS);
> + } else {
> + net_set_state(NETLOOP_FAIL);
> + }
> break;
>
> case FASTBOOT_COMMAND_CONTINUE:
All of this just means it now fails to work, yes?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2023-09-24 22:59 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-24 20:39 [PATCH 00/25] Tidy up use of CONFIG_CMDLINE Simon Glass
2023-09-24 20:39 ` [PATCH 01/25] buildman: Use oldconfig when adjusting the config Simon Glass
2023-09-24 20:39 ` [PATCH 02/25] bootstd: Correct dependencies on CMDLINE Simon Glass
2023-09-24 20:39 ` [PATCH 03/25] autoboot: " Simon Glass
2023-09-25 0:39 ` Tom Rini
2023-10-04 2:11 ` Simon Glass
2023-10-05 14:49 ` Tom Rini
2023-09-24 20:39 ` [PATCH 04/25] cmd: Add a few more " Simon Glass
2023-09-24 20:39 ` [PATCH 05/25] treewide: Correct use of long help Simon Glass
2023-09-24 23:26 ` Tom Rini
2023-10-05 1:23 ` Simon Glass
2023-10-05 14:53 ` Tom Rini
2023-10-06 1:41 ` Simon Glass
2023-10-06 2:16 ` Tom Rini
2023-10-06 13:03 ` Simon Glass
2023-10-06 16:55 ` Tom Rini
2023-10-06 22:42 ` Simon Glass
2023-10-07 1:00 ` Tom Rini
2023-10-07 15:37 ` Simon Glass
2023-10-07 17:25 ` Tom Rini
2023-10-07 20:18 ` Simon Glass
2023-09-24 20:39 ` [PATCH 06/25] test: Make UNIT_TEST depend on CMDLINE Simon Glass
2023-09-24 20:39 ` [PATCH 07/25] tegra: Change #ifdef for nop Simon Glass
2023-09-25 0:43 ` Tom Rini
2023-10-07 23:10 ` Simon Glass
2023-10-07 23:21 ` Sean Anderson
2023-10-09 15:32 ` Simon Glass
2023-10-09 23:40 ` Sean Anderson
2023-10-10 14:42 ` Simon Glass
2023-10-11 0:03 ` Sean Anderson
2023-09-24 20:39 ` [PATCH 08/25] fastboot: Avoid depending on CMDLINE Simon Glass
2023-09-24 22:59 ` Tom Rini [this message]
2023-10-07 23:10 ` Simon Glass
2023-09-24 20:39 ` [PATCH 09/25] cli: Always build cli_getch Simon Glass
2023-09-24 20:39 ` [PATCH 10/25] cmd: Use an #ifdef around run_commandf() Simon Glass
2023-09-24 20:39 ` [PATCH 11/25] Move bootmenu_conv_key() into its own file Simon Glass
2023-09-24 20:39 ` [PATCH 12/25] armffa: Correct command help condition Simon Glass
2023-09-24 20:39 ` [PATCH 13/25] pxe: Depend on CMDLINE Simon Glass
2023-09-24 20:39 ` [PATCH 14/25] env: Split out non-command code into a new file Simon Glass
2023-09-24 20:39 ` [PATCH 15/25] console: Move SYS_PBSIZE into common/ Simon Glass
2023-09-24 20:39 ` [PATCH 16/25] bootm: Allow building when cleanup functions are missing Simon Glass
2023-09-24 20:39 ` [PATCH 17/25] fdt: Move working_fdt into fdt_support Simon Glass
2023-09-24 20:39 ` [PATCH 18/25] net: Depend on CONFIG_CMDLINE Simon Glass
2023-10-06 20:44 ` Ramon Fried
2023-09-24 20:39 ` [PATCH 19/25] log: Allow use without CONFIG_CMDLINE Simon Glass
2023-09-24 20:39 ` [PATCH 20/25] video: " Simon Glass
2023-09-24 20:39 ` [PATCH 21/25] video: Dont require the font command Simon Glass
2023-09-24 20:39 ` [PATCH 22/25] efi: Depend on CMDLINE for efi_loader Simon Glass
2023-09-24 20:39 ` [PATCH 23/25] cmd: Make all commands depend on CMDLINE Simon Glass
2023-09-24 20:39 ` [PATCH 24/25] sandbox: Avoid requiring cmdline Simon Glass
2023-09-24 20:39 ` [PATCH 25/25] sandbox: Add a test for disabling CONFIG_CMDLINE Simon Glass
2023-09-25 0:37 ` [PATCH 00/25] Tidy up use of CONFIG_CMDLINE Tom Rini
2023-10-10 14:57 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230924225937.GL305624@bill-the-cat \
--to=trini@konsulko.com \
--cc=dimorinny@google.com \
--cc=hs@denx.de \
--cc=mkorpershoek@baylibre.com \
--cc=patrick.delaunay@foss.st.com \
--cc=samuel@sholland.org \
--cc=sean.anderson@seco.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox