All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] how does one "extend" the list of POST tests?
@ 2016-03-29 11:14 Robert P. J. Day
  2016-03-29 12:05 ` Robert P. J. Day
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2016-03-29 11:14 UTC (permalink / raw)
  To: u-boot


  one more question, i think, on the framework of u-boot POST tests.
the README.POST file states:

   o) Extensibility

      The framework shall allow adding/removing/replacing POST tests.
      Also, standalone POST tests shall be supported.

how many different ways are there to extend the list of POST tests?

  given that post/tests.c defines the list of tests statically, you
clearly can't *dynamically* add tests. i do see that that list of
tests includes the generic tests:

#if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
        CONFIG_POST_BSPEC1,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC2
        CONFIG_POST_BSPEC2,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC3
        CONFIG_POST_BSPEC3,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC4
        CONFIG_POST_BSPEC4,
#endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC5
        CONFIG_POST_BSPEC5,
#endif

so, sure, one can take advantage of any of those five available test
slots, but that's not really a general solution.

  so other than editing post/tests.c and manually adding more tests,
is there any other mechanism for adding POST tests?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

* [U-Boot] how does one "extend" the list of POST tests?
  2016-03-29 11:14 [U-Boot] how does one "extend" the list of POST tests? Robert P. J. Day
@ 2016-03-29 12:05 ` Robert P. J. Day
  0 siblings, 0 replies; 2+ messages in thread
From: Robert P. J. Day @ 2016-03-29 12:05 UTC (permalink / raw)
  To: u-boot

On Tue, 29 Mar 2016, Robert P. J. Day wrote:

>   one more question, i think, on the framework of u-boot POST tests.
> the README.POST file states:
>
>    o) Extensibility
>
>       The framework shall allow adding/removing/replacing POST tests.
>       Also, standalone POST tests shall be supported.
>
> how many different ways are there to extend the list of POST tests?
>
>   given that post/tests.c defines the list of tests statically, you
> clearly can't *dynamically* add tests. i do see that that list of
> tests includes the generic tests:
>
> #if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
>         CONFIG_POST_BSPEC1,
> #endif
> #if CONFIG_POST & CONFIG_SYS_POST_BSPEC2
>         CONFIG_POST_BSPEC2,
> #endif
> #if CONFIG_POST & CONFIG_SYS_POST_BSPEC3
>         CONFIG_POST_BSPEC3,
> #endif
> #if CONFIG_POST & CONFIG_SYS_POST_BSPEC4
>         CONFIG_POST_BSPEC4,
> #endif
> #if CONFIG_POST & CONFIG_SYS_POST_BSPEC5
>         CONFIG_POST_BSPEC5,
> #endif
>
> so, sure, one can take advantage of any of those five available test
> slots, but that's not really a general solution.
>
>   so other than editing post/tests.c and manually adding more tests,
> is there any other mechanism for adding POST tests?

  whoops, i just noticed the ability to add tests through the
environment in post/post.c:

#ifndef CONFIG_POST_SKIP_ENV_FLAGS
static void post_get_env_flags(int *test_flags)
{
        int  flag[] = {  POST_POWERON,   POST_NORMAL,   POST_SLOWTEST,
                         POST_CRITICAL };
        char *var[] = { "post_poweron", "post_normal", "post_slowtest",
                        "post_critical" };

as i read it, that still limits one to selecting tests already
implemented, but it's still an increase in flexibility. will keep
reading ...

rday

p.s.  once i nail all this down, i plan on submitting a few more
patches, and writing this up for public consumption on my wiki.

p.p.s. if anyone has a board-specific implementation of some POST
tests they want to share, i can use all the examples i can get.

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

end of thread, other threads:[~2016-03-29 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 11:14 [U-Boot] how does one "extend" the list of POST tests? Robert P. J. Day
2016-03-29 12:05 ` Robert P. J. Day

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.