[OE-core] [PATCH 04/10] initramfs-framework: add separate init_verbose log level parameter

Patrick Ohly patrick.ohly at intel.com
Thu Sep 3 06:36:58 UTC 2015


On Wed, 2015-09-02 at 13:16 -0300, Otavio Salvador wrote:
> On Wed, Sep 2, 2015 at 12:48 PM, Patrick Ohly <patrick.ohly at intel.com> wrote:
> > Using the general purpose "debug" and "verbose" kernel parameters to
> > increase logging in the init script has the disadvantage that it
> > also increases logging in other components, making the output hard
> > to read (in particular with "debug").
> >
> > The new init_verbose parameter only affects the init script:
> >   init_verbose, init_verbose=1, init_verbose=true: enable just some info messages
> >   init_verbose=2: debug messages
> >
> > Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
> > ---
> >  meta/recipes-core/initrdscripts/initramfs-framework/init | 16 ++++++++++++++--
> >  1 file changed, 14 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init
> > index e8f4713..cd55ee2 100755
> > --- a/meta/recipes-core/initrdscripts/initramfs-framework/init
> > +++ b/meta/recipes-core/initrdscripts/initramfs-framework/init
> > @@ -14,6 +14,13 @@
> >  # 'foo=value' as 'bootparam_foo=value'
> >  # 'foo' as 'bootparam_foo=true'
> >  # 'foo.bar[=value] as 'foo_bar=[value|true]'
> > +#
> > +# Special boot parameters always recognized by initramfs-framework (see modules
> > +# like "debug" for additional ones):
> > +# debug: enable debug logging (beware, also enables debug output in other system components)
> > +# verbose: similar do debug, just less output
> > +# init_verbose[=true|1|2]: same output as for verbose when no value or true/1 are given,
> > +#                          same as debug for 2 - only affects logging in initramfs-framework
> 
> I personally don't see much benefit on this. The debug module is the
> one used to debug the initramfs-framework script. If we ought to add
> support for something like this, this should be done there.

So you are saying that the msg/info/debug/fatal functions should be in
the "debug" module? Or should they be present, but changing the logging
level should be done by the "debug" module? How would logging work
before the "debug" module is loaded or when it is not installed at all
(as in a production image)?

I guess one could have empty stubs in the main "init" and only do
logging after loading the debug module - that should work, at the loss
of early log output.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.






More information about the Openembedded-core mailing list