All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v3, 5/9] Drop command-processing code when CONFIG_CMDLINE is disabled
Date: Mon, 4 Apr 2016 16:29:50 +0200	[thread overview]
Message-ID: <57027A5E.8030501@denx.de> (raw)
In-Reply-To: <CAPnjgZ20hRdmPjLsZMy15_376t6NXSfjfQv8+m4nxNxURXRHRg@mail.gmail.com>

Hi Simon,

On 04.04.2016 16:05, Simon Glass wrote:
> On 5 April 2016 at 01:38, Stefan Roese <sr@denx.de> wrote:
>>
>> Hi Simon,
>>
>> On 04.04.2016 15:18, Simon Glass wrote:
>>>
>>> On Apr 4, 2016 03:16, "Stefan Roese" <sr at denx.de <mailto:sr@denx.de>> wrote:
>>>   >
>>>   > Hi Simon, Hi Tom!
>>>   >
>>>   >
>>>   > On 02.04.2016 03:55, Tom Rini wrote:
>>>   >>
>>>   >> On Sat, Mar 19, 2016 at 02:18:38AM -0600, Simon Glass wrote:
>>>   >>
>>>   >>> Command parsing and processing code is not needed when the command
>>> line is
>>>   >>> disabled. Remove this code in that case.
>>>   >>>
>>>   >>> Signed-off-by: Simon Glass <sjg at chromium.org <mailto:sjg@chromium.org>>
>>>   >>> Reviewed-by: Tom Rini <trini at konsulko.com <mailto:trini@konsulko.com>>
>>>   >>
>>>   >>
>>>   >> Applied to u-boot/master, thanks!
>>>   >
>>>   >
>>>   > I just noticed that this patch breaks U-Boot on some boards. All that
>>>   > don't have CONFIG_SYS_HUSH_PARSER or CONFIG_CMDLINE enabled (e.g.
>>>   > some MVEBU board, like the "db-mv784mp-gp".
>>>   >
>>>   > How should this be solved? Should we enable CONFIG_CMDLINE per
>>>   > default (via config_defaults.h ?)? Or should we enable CONFIG_CMDLINE
>>>   > in all board config headers that are currently missing it?
>>>
>>> All boards should have CONFIG_CMDLINE enables by default.
>>
>>
>> That's currently not the case. At least some MVEBU (Armada XP / 38x)
>> boards don't have it enabled. Here a short (most likely incomplete)
>> list:
>>
>> clearfog
>
> $ crosfw -b clearfog -w
> $ grep CMDLINE b/clearfog/.config
> CONFIG_CMDLINE=y
>
> Also see cmd/Kconfig, where is defaults to y.

I didn't notice this.

>> db-88f6820-gp
>> db-mv784mp-gp_defconfig
>> ds414
>> maxbcm
>>
>> And probably some (most?) Orion & Kirkwood based board as well. I
>> assume that most boards that include "mv-common.h" have it not
>> enabled (I didn't check all of them).
>>
>> Some board, like theadorable have HUSH support enabled but
>> CMDLINE not. These boards are not broken.
>>
>>> Is the problem
>>> with the build or at run-time?
>>
>>
>> Run-time.
>
> OK so I wonder if the problem is not the option itself but something
> in the command line code for the non-hush parser? If you enable hush
> does it work? What exactly is the failure?

Its a reboot after this message:

## U-Boot command line is disabled. Please enable CONFIG_CMDLINE

And I've just found the problem. Its a typo:

#ifdef CONFIG_SYS_HUSH_PARSER
	parse_file_outer();
	/* This point is never reached */
	for (;;);
#elif defined(CONFIG_CMDINE)

                      CMDLINE

Notice the missing "L" above.

I'll send a patch in a minute. Stay tuned...

Thanks,
Stefan

      reply	other threads:[~2016-04-04 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-19  8:18 [U-Boot] [PATCH v3 5/9] Drop command-processing code when CONFIG_CMDLINE is disabled Simon Glass
2016-04-02  1:55 ` [U-Boot] [U-Boot, v3, " Tom Rini
2016-04-04 10:16   ` Stefan Roese
2016-04-04 13:18     ` Simon Glass
2016-04-04 13:38       ` Stefan Roese
2016-04-04 14:05         ` Simon Glass
2016-04-04 14:29           ` Stefan Roese [this message]

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=57027A5E.8030501@denx.de \
    --to=sr@denx.de \
    --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 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.