All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 06/13] log: Add an implemention of logging
Date: Thu, 28 Sep 2017 01:19:26 +0900	[thread overview]
Message-ID: <CAK7LNAQnp1odhiiQcRctirWbetJyLJnmMWe9pnLJiStFzZL9hQ@mail.gmail.com> (raw)
In-Reply-To: <26FA5DC9-9257-47F9-B15B-5ABC21EBCFAC@theobroma-systems.com>

Hi Philipp,


2017-09-21 2:51 GMT+09:00 Dr. Philipp Tomsich
<philipp.tomsich@theobroma-systems.com>:
> Masahiro,
>
>> On 20 Sep 2017, at 19:34, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>>
>> 2017-09-20 23:37 GMT+09:00 Dr. Philipp Tomsich
>> <philipp.tomsich@theobroma-systems.com>:
>>> Masahiro & Simon,
>>>
>>>> On 20 Sep 2017, at 15:49, Simon Glass <sjg@chromium.org> wrote:
>>>>
>>>> Hi Masahiro,
>>>>
>>>> On 19 September 2017 at 20:51, Masahiro Yamada
>>>> <yamada.masahiro@socionext.com> wrote:
>>>>> Hi Simon,
>>>>>
>>>>>
>>>>> 2017-09-17 6:23 GMT+09:00 Simon Glass <sjg@chromium.org>:
>>>>>
>>>>>>
>>>>>> +menu "Logging"
>>>>>> +
>>>>>> +config LOG
>>>>>> +       bool "Enable logging support"
>>>>>> +       help
>>>>>> +         This enables support for logging of status and debug messages. These
>>>>>> +         can be displayed on the console, recorded in a memory buffer, or
>>>>>> +         discarded if not needed. Logging supports various categories and
>>>>>> +         levels of severity.
>>>>>> +
>>>>>> +config SPL_LOG
>>>>>> +       bool "Enable logging support in SPL"
>>>>>> +       help
>>>>>> +         This enables support for logging of status and debug messages. These
>>>>>> +         can be displayed on the console, recorded in a memory buffer, or
>>>>>> +         discarded if not needed. Logging supports various categories and
>>>>>> +         levels of severity.
>>>>>
>>>>>
>>>>> Please note CONFIG_IS_ENABLED(LOG) is never enabled for TPL_BUILD.
>>>>>
>>>>> Since commit f1c6e1922eb57f4a212c09709801a1cc7920ffa9,
>>>>> CONFIG_IS_ENABLED(LOG) is expanded to CONFIG_TPL_LOG
>>>>> when building for TPL.
>>>>>
>>>>> Since that commit, if you add SPL_ prefixed option,
>>>>> you need to add a TPL_ one as well.
>>>>>
>>>>> I cannot believe why such a commit was accepted.
>>>>
>>>> Well either way is strange. it is strange that SPL is enabled for TPL
>>>> when really they are separate.
>>>>
>>>> We could revert that commit. But how do you think all of this SPL/TPL
>>>> control should actually work? What is intended?
>>>>
>>>> But I'm OK with not having logging in TPL until we need it.
>>>
>>> If we don’t differentiate between TPL_ and SPL_, we’ll eventually run into
>>> size issues for TPL and the $(SPL_TPL_) mechanism will not match the
>>> CONFIG_IS_ENABLED() mechanism.
>>>
>>> I don’t think that anyone will miss this much in TPL and that this can be
>>> safely left off for TPL (if space was not at a premium in TPL, then why
>>> have a TPL at all…)
>>
>>
>> The motivation of TPL is
>> the image size is really limited
>> for the secondary boot loader in some cases.
>>
>>
>> Instead of:
>>  SPL -> TPL -> U-Boot full
>
> Note that this was retro-actively defined to be
>         TPL -> SPL -> U-Boot full
> by Tom at some point and reiterated in
>         https://lists.denx.de/pipermail/u-boot/2017-July/299266.html



Thanks.  I did not know that this flip had already happened.


In fact, I am probably the first man who suggested it.


Here is the history.


1. Scott Wood introduced TPL to support some freescale chip,
   which had only 4KB memory footprint for the second loader
   https://www.denx.de/wiki/pub/U-Boot/MiniSummitELCE2013/tpl-presentation.pdf

   At this point, the boot order was:  SPL -> TPL -> U-Boot
   And TPL means "Tertiary Program Loader".


2.  I imported Kbuild and Kconfig to U-Boot.


3.  During the migration of Kconfig, I noticed
    switching the order of SPL / TPL has advantages.

    The "Tiny Program Loader" was mentioned first in this mail:
    https://lists.denx.de/pipermail/u-boot/2015-August/222900.html


4.  When Simon started to move CONFIG_TPL,
    I suggested it once again
    http://patchwork.ozlabs.org/patch/662396/



So, I'd like to make "TPL -> SPL" legitimate.


More ideally, I hope this is done outside of luxury frameworks.
No DM, no OF_CONTROL, then CONFIG_TPL_* are all gone.






-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2017-09-27 16:19 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-16 21:23 [U-Boot] [PATCH 00/13] log: Add a new logging feature Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 01/13] Revert "sandbox: remove os_putc() and os_puts()" Simon Glass
2017-09-17 12:48   ` Bin Meng
2017-09-17 17:55     ` Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 02/13] Revert "sandbox: Drop special case console code for sandbox" Simon Glass
2017-09-17 12:50   ` Bin Meng
2017-09-17 17:55     ` Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 03/13] Move debug and logging support to a separate header Simon Glass
2017-09-17 12:52   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 04/13] mtdparts: Correct use of debug() Simon Glass
2017-09-17 12:54   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 05/13] Drop the log buffer Simon Glass
2017-09-17 12:58   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 06/13] log: Add an implemention of logging Simon Glass
2017-09-18  3:45   ` Bin Meng
2017-09-20 13:50     ` Simon Glass
2017-09-20 14:41       ` Bin Meng
2017-09-20 14:51         ` Dr. Philipp Tomsich
2017-09-21  4:58         ` Simon Glass
2017-09-22 13:37           ` Bin Meng
2017-09-25  2:14             ` Simon Glass
2017-09-20  2:51   ` Masahiro Yamada
2017-09-20 13:49     ` Simon Glass
2017-09-20 14:37       ` Dr. Philipp Tomsich
2017-09-20 17:34         ` Masahiro Yamada
2017-09-20 17:51           ` Dr. Philipp Tomsich
2017-09-27 16:19             ` Masahiro Yamada [this message]
2017-09-20 17:19       ` Masahiro Yamada
2017-09-26 19:10         ` Simon Glass
2017-09-27 17:11           ` Masahiro Yamada
2017-09-28 12:39             ` Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 07/13] log: Add a console driver Simon Glass
2017-09-18  3:45   ` Bin Meng
2017-09-26 19:10     ` Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 08/13] log: Add a 'log level' command Simon Glass
2017-09-18  3:46   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 09/13] log: Add a test command Simon Glass
2017-09-18  3:47   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 10/13] log: Plumb logging into the init sequence Simon Glass
2017-09-18  3:47   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 11/13] log: sandbox: Enable logging Simon Glass
2017-09-18  3:47   ` Bin Meng
2017-09-16 21:23 ` [U-Boot] [PATCH 12/13] log: test: Add a pytest for logging Simon Glass
2017-09-16 21:23 ` [U-Boot] [PATCH 13/13] log: Add documentation Simon Glass
2017-09-18  3:47   ` Bin Meng
2017-09-20  3:04   ` Masahiro Yamada
2017-09-20 13:49     ` Simon Glass
2017-09-20  2:32 ` [U-Boot] [PATCH 00/13] log: Add a new logging feature Masahiro Yamada
2017-09-20 20:20   ` Heinrich Schuchardt
2017-09-21  4:58     ` Simon Glass
2017-09-20 19:55 ` Wolfgang Denk
2017-09-21  4:58   ` 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=CAK7LNAQnp1odhiiQcRctirWbetJyLJnmMWe9pnLJiStFzZL9hQ@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --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.