12 Oct, 2016

1 commit


07 Oct, 2016

9 commits

  • Our build system still parses ad-hoc CONFIG options in header files
    and generates include/autoconf.mk so that Makefiles can reference
    them. This gimmick was introduced in the pre-Kconfig days and will
    be kept until Kconfig migration is completed.

    The include/autoconf.mk is generated like follows:

    [1] Preprocess include/common.h with -DDO_DEPS_ONLY and
    retrieve macros into include/autoconf.mk.tmp
    [2] Reformat include/autoconf.mk.dep into include/autoconf.mk
    with tools/scripts/define2mk.sed script
    [3] Remove include/autoconf.mk.tmp

    Here, include/autoconf.mk.tmp is similar to u-boot.cfg, which is
    also generated by preprocessing include/config.h with -DDO_DEPS_ONLY.
    In other words, there is much overlap among include/autoconf.mk and
    u-boot.cfg build rules.

    So, the idea is to split the build rule of include/autoconf.mk
    into two stages. The first preprocesses headers into u-boot.cfg.
    The second parses the u-boot.cfg into include/autoconf.mk. The
    build rules of u-boot.cfg in Makefile and spl/Makefile will be gone.

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

    Masahiro Yamada
     
  • I do not remember why I wrote the code like this, but let's make it
    a bit more readable.

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

    Masahiro Yamada
     
  • The command suggested in this comment block is wrong; it would not
    rip off CONFIG options that had already been converted to Kconfig.

    Instead, we should use the scripts/build-whitelist.sh tool.

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

    Masahiro Yamada
     
  • These are not CONFIG options (detected by my eyes).

    CONFIG_SPL_BUILD and CONFIG_TPL_BUILD are build options defined only
    for building SPL and TPL, respectively.

    The others are just mentioned in comment blocks.

    Now, scripts/build-whitelist.sh never picks up new options. Once
    we kill these false ones, they will never revive.

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

    Masahiro Yamada
     
  • It is a good practice to drop an option from the whitelist when we
    convert it to Kconfig, but we may sometimes forget to do that.

    So, it might be a good idea to sync the whitelist from time to time.

    This commit was generated by:
    scripts/build-whitelist.sh

    Looks like we had a bit progress...

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

    Masahiro Yamada
     
  • If somebody adds references to new CONFIG options in source files,
    they will be added in the whitelist when we sync it. (For example,
    if we run scripts/build-whitelist.sh against commit 42f75050667b,
    new options CONFIG_SPL_DFU_SUPPORT and CONFIG_USB_XHCI_UNIPHIER will
    appear in the list.)

    In order to make steady progress of Kconfig migration, we want to
    only decrease whitelist options, but never increase.

    So, when we update the whitelist, we should create a temporary list,
    then take the intersection of the temporary one and the current one.

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

    Masahiro Yamada
     
  • This script looks for env_common.o object file and extracts from it default
    u-boot environment, which is afterwards printed on standard output.

    Usage example:
    get_default_envs.sh > u-boot-env-default.txt

    The generated text file can be used as input for mkenvimage.

    Signed-off-by: Lukasz Majewski
    Reviewed-by: Simon Glass

    Lukasz Majewski
     
  • Fix various misspellings of:

    * deprecated
    * partition
    * preceding,preceded
    * preparation
    * its versus it's
    * export
    * existing
    * scenario
    * redundant
    * remaining
    * value
    * architecture

    Signed-off-by: Robert P. J. Day
    Reviewed-by: Jagan Teki
    Reviewed-by: Stefan Roese

    Robert P. J. Day
     
  • Move these options to Kconfig and create a sub-menu to avoid name
    conflict with other architectures.

    Signed-off-by: York Sun
    Reviewed-by: Simon Glass

    York Sun
     

28 Sep, 2016

1 commit

  • Traditionally the DFU support is available only
    as part 2nd stage boot loader(u-boot) and DFU
    is not supported in SPL.

    The SPL-DFU feature is useful for boards which
    does not have MMC/SD, ethernet boot mechanism
    to boot the board and only has USB inteface.

    This patch add DFU support in SPL with RAM
    memory device support to load and execute u-boot.
    And then leverage full functionality DFU in
    u-boot to flash boot inital binary images to
    factory or bare-metal boards to memory devices
    like SPI, eMMC, MMC/SD card using USB interface.

    This SPL-DFU support can be enabled through
    Menuconfig->Boot Images->Enable SPL-DFU support

    Signed-off-by: Ravi Babu
    Reviewed-by: Tom Rini

    B, Ravi
     

27 Sep, 2016

1 commit


22 Sep, 2016

2 commits

  • Prior to the previous patch, a freshly created .u-boot.cfg.cmd may not
    correctly represent all dependencies for u-boot.cfg. The previous change
    only solved this issue for fresh builds; when performing an incremental
    build, the deficient .u-boot.cfg.cmd is already present, so u-boot.cfg
    is not rebuilt, and hence .u-boot.cfg.cmd is not rebuilt with the correct
    content.

    Solve this by explicitly detecting when the dependency file .u-boot.cfg.d
    has not been integrated into .u-boot.cfg.cmd, and force u-boot.cfg to be
    rebuilt in this case by deleting it first. This is possible since
    if_changed_dep will always delete .u-boot.cfg.d when it executes
    successfully, so its presence means either that the previous build was
    made by a source tree that contained a Makefile that didn't include the
    previous patch, or that the build failed part way through executing
    if_changed_dep for u-boot.cfg. Forcing a rebuild of u-boot.cfg is required
    in the former case, and will cause no additional work in the latter case,
    since the file would be rebuilt anyway for the same reason it was being
    rebuilt by the previous build.

    Signed-off-by: Stephen Warren

    Stephen Warren
     
  • cmd_cpp_cfg generates a dependency output, but because it's invoked using
    if_changed rather than if_changed_dep, that dependency file is ignored.
    This results in Kbuild not knowing about which files u-boot.cfg depends
    on, so it may not be rebuilt when required.

    A practical result of this is that u-boot.cfg may continue to reference
    CONFIG_ options that no longer exist in the source tree, and this can
    cause the adhoc config options check to fail.

    This change modifies Makefile to use if_changed_dep, which in turn causes
    all dependencies to be known to the next make invocation.

    Signed-off-by: Stephen Warren

    Stephen Warren
     

20 Sep, 2016

2 commits


17 Sep, 2016

3 commits

  • New CONFIG options should be added via Kconfig. To help prevent new ad-hoc
    CONFIGs from being added, give a build error when these are detected.

    Signed-off-by: Simon Glass
    Acked-by: Stephen Warren
    Tested-by: Stephen Warren

    Simon Glass
     
  • Add a list of ad-hoc CONFIG options that don't use Kconfig. This can be used
    to check that new ones are not being added.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present TPL uses the same options as SPL support. In a few cases the board
    config enables or disables the SPL options depending on whether
    CONFIG_TPL_BUILD is defined.

    With the move to Kconfig, options are determined for the whole build and
    (without a hack like an #undef in a header file) cannot be controlled in this
    way.

    Create new TPL options for these and update users. This will allow Kconfig
    conversion to proceed for these boards.

    Signed-off-by: Simon Glass

    Simon Glass
     

20 Aug, 2016

1 commit

  • Having dashes as a separator in the DTB name is a quite common practice.

    However, the current code to generate objects from DTBs assumes the
    separator is an underscore, leading to a compilation error when building a
    device tree with dashes.

    Replace all the dashes in the DTB name to generate the symbols name, which
    should solve this issue.

    Acked-by: Simon Glass
    Acked-by: Pantelis Antoniou
    Signed-off-by: Maxime Ripard

    Maxime Ripard
     

16 Aug, 2016

1 commit


15 Jul, 2016

4 commits


06 Jun, 2016

1 commit


30 May, 2016

1 commit

  • ASL files may include various U-Boot header files, but IASL compiler
    does not understand any C language embedded in these header files.
    To reuse those header files for ASL compiling, use __ASSEMBLY__ in
    the header files to exclude everything that is not liked by IASL.

    Signed-off-by: Bin Meng
    Reviewed-by: Simon Glass

    Bin Meng
     

24 May, 2016

3 commits


23 May, 2016

6 commits

  • 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
     
  • IASL compiler does not provide a command line option to turn off
    its non-warning message. To quieten the output when 'make -s',
    redirect its output to /dev/null.

    Signed-off-by: Bin Meng
    Reviewed-by: Simon Glass

    Bin Meng
     
  • Remove -va option when invoking IASL compiler so that we can see
    errors/warnings/remarks in the build log.

    Signed-off-by: Bin Meng
    Reviewed-by: Stefan Roese
    Tested-by: Stefan Roese
    Reviewed-by: Simon Glass

    Bin Meng
     
  • It will be much easier if we split the whole dsdt.asl file into
    multiple smaller ASL parts and have access to U-Boot include files.

    Signed-off-by: Bin Meng
    Reviewed-by: Stefan Roese
    Tested-by: Stefan Roese
    Reviewed-by: Simon Glass

    Bin Meng
     
  • Currently the make rule for dsdt.c uses a wildcard, as below:

    $(obj)/%.c: $(src)/%.asl

    To avoid any side effect, explicitly mention dsdt.c as this is
    the file we intend to use for ACPI DSDT AML generation.

    Signed-off-by: Bin Meng
    Reviewed-by: Stefan Roese
    Tested-by: Stefan Roese
    Reviewed-by: Simon Glass

    Bin Meng
     
  • Currently when compiling U-Boot with ASL file, the build log says:

    ASL board/intel/bayleybay/dsdt.c

    This looks odd as ASL compiler's input is ASL file, not C file.
    Change the make rule to use $< instead.

    Signed-off-by: Bin Meng
    Reviewed-by: Stefan Roese
    Tested-by: Stefan Roese
    Reviewed-by: Simon Glass

    Bin Meng
     

03 May, 2016

1 commit

  • dtb is already included in binary that's why there is no need to replace
    u-boot-spl.bin with u-boot-spl-dtb.bin. This is only needed for
    OF_SEPARATE is enabled. Only copy -nodtb.bin version which is straight
    output from objcopy -O binary.

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

    Michal Simek
     

17 Mar, 2016

1 commit


08 Feb, 2016

2 commits

  • The build command of u-boot-spl.dtb is not constant, but dependent
    on CONFIG_OF_SPL_REMOVE_PROPS. Use $(call if_changed,...) so that
    the change of CONFIG_OF_SPL_REMOVE_PROPS is detected.

    Also, add tools/fdtgrep to the dependency to make sure u-boot-spl.dtb
    is generated by the up-to-date fdtgrep in case the tool is modified.

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

    Masahiro Yamada
     
  • FORCE is needed for $(call if_changed,...) to be evaluated every time.
    Otherwise, the command is not executed when the command line has
    changed but any prerequisite has not been updated.

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

    Masahiro Yamada