public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 7/9] Allow command code to compile to nothing
Date: Mon, 29 Feb 2016 16:40:59 -0700	[thread overview]
Message-ID: <56D4D70B.3020909@wwwdotorg.org> (raw)
In-Reply-To: <1456459256-32643-8-git-send-email-sjg@chromium.org>

On 02/25/2016 09:00 PM, Simon Glass wrote:
> When CONFIG_CMDLINE is disabled we need to remove all the command-line
> code. Most can be removed by dropping the appropriate linker lists from the
> images, but sub-commands must be dealt with specially.
>
> A simple mechanism is used to avoid 'unused static function' errors.

> diff --git a/include/command.h b/include/command.h

> +/**
> + * board_run_command() - Fallback function to execute a command
> + *
> + * When no command line features are enabled in U-Boot, this function is
> + * called to execute a command. Typically the function can look at the
> + * command and perform a few very specific tasks, such as booting the
> + * system in a particular way.
> + *
> + * This function is only used when CONFIG_CMDLINE is not enabled.
> + *
> + * In normal situations this function should not return, since U-Boot will
> + * simply hang.
> + *
> + * @cmdline:	Command line string to execute
> + * @return 0 if OK, 1 for error
> + */
> +int board_run_command(const char *cmdline);

Doesn't this need to be part of patch 5/9 too, since the function is 
first called there?

  parent reply	other threads:[~2016-02-29 23:40 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26  4:00 [U-Boot] [PATCH 0/9] Add CONFIG_CMDLINE to allow removal of all commands Simon Glass
2016-02-26  4:00 ` [U-Boot] [PATCH 1/9] cbfs: Update a function to be static Simon Glass
2016-02-26 17:16   ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 2/9] Add an option to enable the command line Simon Glass
2016-02-26 17:16   ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 3/9] arm: x86: Drop command-line code when CONFIG_CMDLINE is disabled Simon Glass
2016-02-26 17:16   ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 4/9] sandbox: Avoid calling commands when not available Simon Glass
2016-02-26 17:16   ` Tom Rini
2016-02-29 23:39   ` Stephen Warren
2016-03-03  0:25     ` Simon Glass
2016-03-03 16:58       ` Stephen Warren
2016-02-26  4:00 ` [U-Boot] [PATCH 5/9] Drop command-processing code when CONFIG_CMDLINE is disabled Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 6/9] Hang when no command line processing can be performed Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-26 17:31     ` Simon Glass
2016-02-26 17:45       ` Tom Rini
2016-02-26  4:00 ` [U-Boot] [PATCH 7/9] Allow command code to compile to nothing Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-29 23:40   ` Stephen Warren [this message]
2016-03-03  0:25     ` Simon Glass
2016-02-26  4:00 ` [U-Boot] [PATCH 8/9] Allow command-line files to be dropped Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-26 17:31     ` Simon Glass
2016-02-26  4:00 ` [U-Boot] [PATCH 9/9] Drop various features when the command line is not available Simon Glass
2016-02-26 17:17   ` Tom Rini
2016-02-29 23:47   ` Stephen Warren
2016-02-29 23:56     ` Tom Rini
2016-03-03  0:25       ` Simon Glass
2016-03-03  0:58         ` Tom Rini

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=56D4D70B.3020909@wwwdotorg.org \
    --to=swarren@wwwdotorg.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