From: Markus Niebel <list-09_u-boot@tqsc.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] bootz: fix silent console
Date: Tue, 25 Nov 2014 09:31:43 +0100 [thread overview]
Message-ID: <54743E6F.40801@tqsc.de> (raw)
In-Reply-To: <CAPnjgZ1Ya5VUR-7jd7xLhibxKAppgS+NrkgzcYpLSEpxbh0oKw@mail.gmail.com>
Hello Simon,
Am 20.11.2014 um 20:15 schrieb Simon Glass:
> Hi Markus,
>
> On 18 November 2014 12:52, Markus Niebel <list-09_u-boot@tqsc.de> wrote:
>> From: Markus Niebel <Markus.Niebel@tq-group.com>
>>
>> fixup was lost during split between command code and logic.
>>
>> Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
>> ---
>> common/bootm.c | 2 +-
>> common/cmd_bootm.c | 6 ++++++
>> include/bootm.h | 2 ++
>> 3 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/bootm.c b/common/bootm.c
>> index 6b3ea8c..94b9503 100644
>> --- a/common/bootm.c
>> +++ b/common/bootm.c
>> @@ -467,7 +467,7 @@ ulong bootm_disable_interrupts(void)
>> #define CONSOLE_ARG "console="
>> #define CONSOLE_ARG_LEN (sizeof(CONSOLE_ARG) - 1)
>>
>> -static void fixup_silent_linux(void)
>> +void fixup_silent_linux(void)
>> {
>> char *buf;
>> const char *env_val;
>> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
>> index 6723360..d3e410a 100644
>> --- a/common/cmd_bootm.c
>> +++ b/common/cmd_bootm.c
>> @@ -596,6 +596,12 @@ int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>> * disable interrupts ourselves
>> */
>> bootm_disable_interrupts();
>> +#if defined(CONFIG_SILENT_CONSOLE) && !defined(CONFIG_SILENT_U_BOOT_ONLY)
>> + /*
>> + * same goes for fixup_silent_linux
>> + */
>> + fixup_silent_linux();
>> +#endif
>>
>> images.os.os = IH_OS_LINUX;
>> ret = do_bootm_states(cmdtp, flag, argc, argv,
>> diff --git a/include/bootm.h b/include/bootm.h
>> index b3d1a62..8e094b3 100644
>> --- a/include/bootm.h
>> +++ b/include/bootm.h
>> @@ -50,6 +50,8 @@ ulong bootm_disable_interrupts(void);
>>
>> /* This is a special function used by booti/bootz */
>> int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[]);
>> +/* This function is used also used by bootz */
>> +void fixup_silent_linux(void);
>>
>> int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
>> int states, bootm_headers_t *images, int boot_progress);
>
> Quite a bit of effort was expended trying to join this code back
> together rather than having two separate code paths for bootm and
> bootz.
I Understand
>
> Since this is cmdline-related, I suggest something like this:
>
> - Enable BOOTM_STATE_OS_CMDLINE for all archs in do_bootm()
> - Call fixup_silent_linux() in do_bootm_states() when processing
> BOOTM_STATE_OS_CMDLINE
> - Add BOOTM_STATE_OS_CMDLINE to the do_bootm_states() call in do_bootz()
>
I read through the code to find out, what the implications of your
suggestions were. Since I'm not very familiar with this piece of code,
please correct me, If i'm wrong:
- rename the arch specific do_bootm_linux to arch_bootm_linux
- implement a generic version of do_bootm_linux inside bootm_os.c
- call arch_bootm_linux from generic do_bootm_linux
- move the call to fixup_silent_linux to new do_bootm_linux for the
BOOTM_STATE_OS_CMDLINE case
- mask BOOTM_STATE_OS_CMDLINE before calling arch_bootm_linux for all but
MIPS and PPC
because this seems a bit intrusive I'm not sure. But if this is the wy to go, I
will prepare a patch.
> Or similar...that way we keep bootm and bootz in sync. The separate
> call to bootm_disable_interrupts() is unfortunate but is a problem for
> another day.
>
> Regards,
> Simon
>
Regards,
Markus
next prev parent reply other threads:[~2014-11-25 8:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 12:52 [U-Boot] [PATCH] bootz: fix silent console Markus Niebel
2014-11-20 19:15 ` Simon Glass
2014-11-25 8:31 ` Markus Niebel [this message]
2014-11-25 14:03 ` 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=54743E6F.40801@tqsc.de \
--to=list-09_u-boot@tqsc.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.