16 Oct, 2017

1 commit


23 May, 2016

1 commit

  • Coverity has recently added a check that will find when we don't check
    the return code from fstat(2). Copy/paste the checking logic that
    print_deps() has with an appropriate re-wording of the perror() message.

    [ Linux commit : 46fe94ad18aa7ce6b3dad8c035fb538942020f2b ]

    Signed-off-by: Tom Rini
    Signed-off-by: Michal Marek

    Tom Rini
     

06 Feb, 2016

1 commit

  • Correct spelling of "U-Boot" shall be used in all written text
    (documentation, comments in source files etc.).

    Signed-off-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Reviewed-by: Simon Glass
    Reviewed-by: Minkyu Kang

    Bin Meng
     

10 Nov, 2015

1 commit

  • After consulting with some of the SPDX team, the conclusion is that
    Makefiles are worth adding SPDX-License-Identifier tags too, and most of
    ours have one. This adds tags to ones that lack them and converts a few
    that had full (or in one case, very partial) license blobs into the
    equivalent tag.

    Cc: Kate Stewart
    Signed-off-by: Tom Rini

    Tom Rini
     

16 Sep, 2015

1 commit


19 Aug, 2015

2 commits

  • The previous commit introduced a useful macro used in makefiles,
    in order to reference to different variables (CONFIG_... or
    CONFIG_SPL_...) depending on the build context.

    Per-image config option control is a PITA in C sources, too.
    Here are some macros useful in C/CPP expressions.

    CONFIG_IS_ENABLED(FOO) can be used as a shorthand for

    (!defined(CONFIG_SPL_BUILD) && defined(CONFIG_FOO)) || \
    (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_FOO))

    For example, it is useful to describe C code as follows,

    #if CONFIG_IS_ENABLED(OF_CONTROL)
    (device tree code)
    #else
    (board file code)
    #endif

    The ifdef conditional above is switched by CONFIG_OF_CONTROL during
    the U-Boot proper building (CONFIG_SPL_BUILD is not defined), and by
    CONFIG_SPL_OF_CONTROL during SPL building (CONFIG_SPL_BUILD is
    defined).

    The macro can be used in C context as well, so you can also write the
    equivalent code as follows:

    if (CONFIG_IS_ENABLED(OF_CONTROL)) {
    (device tree code)
    } else {
    (board file code)
    }

    Another useful macro is CONFIG_VALUE().
    CONFIG_VALUE(FOO) is expanded into CONFIG_FOO if CONFIG_SPL_BUILD is
    undefined, and into CONFIG_SPL_FOO if CONFIG_SPL_BUILD is defined.

    You can write as follows:

    text_base = CONFIG_VALUE(TEXT_BASE);

    instead of:

    #ifdef CONFIG_SPL_BUILD
    text_base = CONFIG_SPL_TEXT_BASE;
    #else
    text_base = CONFIG_TEXT_BASE;
    #endif

    This commit also adds slight hacking on fixdep so that it can
    output a correct list of fixed dependencies.

    If the fixdep finds CONFIG_IS_ENABLED(FOO) in a source file,
    we want
    $(wildcard include/config/foo.h)
    in the U-boot proper building context, while we want
    $(wildcard include/config/spl/foo.h)
    in the SPL build context.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass

    Masahiro Yamada
     
  • If the target string matches "CONFIG_", move the pointer p
    forward. This saves several 7-chars adjustments.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

06 Mar, 2015

1 commit

  • Since commit e02ee2548afe (kconfig: switch to single .config
    configuration), the ".*.cmd" files are not correctly created
    for SPL/TPL. The U-Boot extension code in fixdep, which was
    introduced to support the multiple .config, must be removed.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

30 Jul, 2014

1 commit

  • This commit enables Kconfig.
    Going forward, we use Kconfig for the board configuration.
    mkconfig will never be used. Nor will include/config.mk be generated.

    Kconfig must be adjusted for U-Boot because our situation is
    a little more complicated than Linux Kernel.
    We have to generate multiple boot images (Normal, SPL, TPL)
    from one source tree.
    Each image needs its own configuration input.

    Usage:

    Run "make _defconfig" to do the board configuration.

    It will create the .config file and additionally spl/.config, tpl/.config
    if SPL, TPL is enabled, respectively.

    You can use "make config", "make menuconfig" etc. to create
    a new .config or modify the existing one.

    Use "make spl/config", "make spl/menuconfig" etc. for spl/.config
    and do likewise for tpl/.config file.

    The generic syntax of configuration targets for SPL, TPL is:

    /

    Here, is either 'spl' or 'tpl'
    is 'config', 'menuconfig', 'xconfig', etc.

    When the configuration is done, run "make".
    (Or "make _defconfig all" will do the configuration and build
    in one time.)

    For futher information of how Kconfig works in U-Boot,
    please read the comment block of scripts/multiconfig.py.

    By the way, there is another item worth remarking here:
    coexistence of Kconfig and board herder files.

    Prior to Kconfig, we used C headers to define a set of configs.

    We expect a very long term to migrate from C headers to Kconfig.
    Two different infractructure must coexist in the interim.

    In our former configuration scheme, include/autoconf.mk was generated
    for use in makefiles.
    It is still generated under include/, spl/include/, tpl/include/ directory
    for the Normal, SPL, TPL image, respectively.

    Signed-off-by: Masahiro Yamada
    Acked-by: Simon Glass

    Masahiro Yamada
     

20 Jun, 2014

1 commit


20 Feb, 2014

1 commit