All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make the sandbox board_run_command the default
@ 2019-12-18  2:17 Sean Anderson
  2020-01-10  9:04 ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Sean Anderson @ 2019-12-18  2:17 UTC (permalink / raw)
  To: u-boot

If CONFIG_CMDLINE=n, common/cli.c calls board_run_command. This fails to
link on most architectures. However, the sandbox architecture has an
implementation which we can use.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---
 arch/sandbox/cpu/start.c | 7 -------
 common/cli.c             | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index fff9cbdd79..5b7d54869d 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -319,13 +319,6 @@ static int sandbox_cmdline_cb_show_of_platdata(struct
sandbox_state *state,
 }
 SANDBOX_CMDLINE_OPT(show_of_platdata, 0, "Show of-platdata in SPL");

-int board_run_command(const char *cmdline)
-{
-	printf("## Commands are disabled. Please enable CONFIG_CMDLINE.\n");
-
-	return 1;
-}
-
 static void setup_ram_buf(struct sandbox_state *state)
 {
 	/* Zero the RAM buffer if we didn't read it, to keep valgrind happy */
diff --git a/common/cli.c b/common/cli.c
index 67ceb635a6..59551ef40b 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -70,6 +70,13 @@ int run_command_repeatable(const char *cmd, int flag)
 	return 0;
 #endif
 }
+#else
+__weak int board_run_command(const char *cmdline)
+{
+	printf("## Commands are disabled. Please enable CONFIG_CMDLINE.\n");
+
+	return 1;
+}
 #endif /* CONFIG_CMDLINE */

 int run_command_list(const char *cmd, int len, int flag)
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] Make the sandbox board_run_command the default
  2019-12-18  2:17 [PATCH] Make the sandbox board_run_command the default Sean Anderson
@ 2020-01-10  9:04 ` Simon Glass
  2020-01-10 17:30   ` Sean Anderson
  2020-01-10 17:32   ` [PATCH v2] cli: " Sean Anderson
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Glass @ 2020-01-10  9:04 UTC (permalink / raw)
  To: u-boot

Hi Sean,

On Thu, 19 Dec 2019 at 01:08, Sean Anderson <seanga2@gmail.com> wrote:
>
> If CONFIG_CMDLINE=n, common/cli.c calls board_run_command. This fails to
> link on most architectures. However, the sandbox architecture has an
> implementation which we can use.
>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
>  arch/sandbox/cpu/start.c | 7 -------
>  common/cli.c             | 7 +++++++
>  2 files changed, 7 insertions(+), 7 deletions(-)

Somehow this patch is showing as corrupted. Did you create it with patman?

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Make the sandbox board_run_command the default
  2020-01-10  9:04 ` Simon Glass
@ 2020-01-10 17:30   ` Sean Anderson
  2020-01-10 17:32   ` [PATCH v2] cli: " Sean Anderson
  1 sibling, 0 replies; 6+ messages in thread
From: Sean Anderson @ 2020-01-10 17:30 UTC (permalink / raw)
  To: u-boot

> Somehow this patch is showing as corrupted. Did you create it with patman?

I created it with git format-patch. Perhaps it got mangled by my email client.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] cli: Make the sandbox board_run_command the default
  2020-01-10  9:04 ` Simon Glass
  2020-01-10 17:30   ` Sean Anderson
@ 2020-01-10 17:32   ` Sean Anderson
  2020-02-04 10:40     ` Bin Meng
  2020-02-05 17:57     ` sjg at google.com
  1 sibling, 2 replies; 6+ messages in thread
From: Sean Anderson @ 2020-01-10 17:32 UTC (permalink / raw)
  To: u-boot

If CONFIG_CMDLINE=n, common/cli.c calls board_run_command. This fails to
link on most architectures. However, the sandbox architecture has an
implementation which we can use.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---
Changes for v2:
 - Sent without any word wrap afaik
 - Rebased onto v2020.01

 arch/sandbox/cpu/start.c | 7 -------
 common/cli.c             | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index fff9cbdd79..5b7d54869d 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -319,13 +319,6 @@ static int sandbox_cmdline_cb_show_of_platdata(struct sandbox_state *state,
 }
 SANDBOX_CMDLINE_OPT(show_of_platdata, 0, "Show of-platdata in SPL");
 
-int board_run_command(const char *cmdline)
-{
-	printf("## Commands are disabled. Please enable CONFIG_CMDLINE.\n");
-
-	return 1;
-}
-
 static void setup_ram_buf(struct sandbox_state *state)
 {
 	/* Zero the RAM buffer if we didn't read it, to keep valgrind happy */
diff --git a/common/cli.c b/common/cli.c
index 67ceb635a6..59551ef40b 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -70,6 +70,13 @@ int run_command_repeatable(const char *cmd, int flag)
 	return 0;
 #endif
 }
+#else
+__weak int board_run_command(const char *cmdline)
+{
+	printf("## Commands are disabled. Please enable CONFIG_CMDLINE.\n");
+
+	return 1;
+}
 #endif /* CONFIG_CMDLINE */
 
 int run_command_list(const char *cmd, int len, int flag)
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] cli: Make the sandbox board_run_command the default
  2020-01-10 17:32   ` [PATCH v2] cli: " Sean Anderson
@ 2020-02-04 10:40     ` Bin Meng
  2020-02-05 17:57     ` sjg at google.com
  1 sibling, 0 replies; 6+ messages in thread
From: Bin Meng @ 2020-02-04 10:40 UTC (permalink / raw)
  To: u-boot

On Sat, Jan 11, 2020 at 1:32 AM Sean Anderson <seanga2@gmail.com> wrote:
>
> If CONFIG_CMDLINE=n, common/cli.c calls board_run_command. This fails to
> link on most architectures. However, the sandbox architecture has an
> implementation which we can use.
>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> Changes for v2:
>  - Sent without any word wrap afaik
>  - Rebased onto v2020.01
>
>  arch/sandbox/cpu/start.c | 7 -------
>  common/cli.c             | 7 +++++++
>  2 files changed, 7 insertions(+), 7 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] cli: Make the sandbox board_run_command the default
  2020-01-10 17:32   ` [PATCH v2] cli: " Sean Anderson
  2020-02-04 10:40     ` Bin Meng
@ 2020-02-05 17:57     ` sjg at google.com
  1 sibling, 0 replies; 6+ messages in thread
From: sjg at google.com @ 2020-02-05 17:57 UTC (permalink / raw)
  To: u-boot

On Sat, Jan 11, 2020 at 1:32 AM Sean Anderson <seanga2@gmail.com> wrote:
>
> If CONFIG_CMDLINE=n, common/cli.c calls board_run_command. This fails to
> link on most architectures. However, the sandbox architecture has an
> implementation which we can use.
>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
> Changes for v2:
>  - Sent without any word wrap afaik
>  - Rebased onto v2020.01
>
>  arch/sandbox/cpu/start.c | 7 -------
>  common/cli.c             | 7 +++++++
>  2 files changed, 7 insertions(+), 7 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot-dm, thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-05 17:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18  2:17 [PATCH] Make the sandbox board_run_command the default Sean Anderson
2020-01-10  9:04 ` Simon Glass
2020-01-10 17:30   ` Sean Anderson
2020-01-10 17:32   ` [PATCH v2] cli: " Sean Anderson
2020-02-04 10:40     ` Bin Meng
2020-02-05 17:57     ` sjg at google.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.