Skip to content
Snippets Groups Projects
  1. Jul 14, 2021
    • Joel Stanley's avatar
      Makefile: Conditionally add defaultenv_h to envtools target · 2a2896b1
      Joel Stanley authored and Tom Rini's avatar Tom Rini committed
      
      When building the envtools target with CONFIG_USE_DEFAULT_ENV_FILE=y,
      the tools require generated/defaultenv_autogenerated.h.
      
       In file included from tools/env/fw_env.c:126:
       include/env_default.h:115:10: fatal error: generated/defaultenv_autogenerated.h: No such file or directory
         115 | #include "generated/defaultenv_autogenerated.h"
             |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      2a2896b1
    • Tom Rini's avatar
      kconfig / kbuild: Re-sync with Linux 4.20 · 473fc279
      Tom Rini authored
      
      Align Kconfig and Kbuild logic to Linux 4.20 release with minimal impact
      on files outside of this scope.
      
      Our previous Kconfig sync was done by commit 587e4a42 ("kconfig /
      kbuild: Re-sync with Linux 4.19").
      
      As part of this re-sync, a few related changes from previous Linux
      releases were found to have been missed and merged in, and are not in
      the following list.
      
      The imported Linux commits are:
      
      [From prior to v4.19]
      b1e0d8b70fa3 kbuild: Fix gcc -x syntax
      a4353898980c kconfig: add CC_IS_GCC and GCC_VERSION
      469cb7376c06 kconfig: add CC_IS_CLANG and CLANG_VERSION
      
      [From v4.19 to v4.20]
      487c7c7702ab kbuild: prefix Makefile.dtbinst path with $(srctree) unconditionally
      0d91bf584fe5 kbuild: remove old check for CFLAGS use
      25815cf5ffec kbuild: hide most of targets when running config or mixed targets
      00d78ab2ba75 kbuild: remove dead code in cmd_files calculation in top Makefile
      23066c3f4e21 Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8)
      37c8a5fafa3b kbuild: consolidate Devicetree dtb build rules
      80463f1b7bf9 kbuild: add --include-dir flag only for out-of-tree build
      77ec0c20c7e0 kbuild: remove VERSION and PATCHLEVEL from $(objtree)/Makefile
      74bc0c09b2da kbuild: remove user ID check in scripts/mkmakefile
      4fd61277f662 kbuild: do not pass $(objtree) to scripts/mkmakefile
      80d0dda3a4e5 kbuild: simplify command line creation in scripts/mkmakefile
      fb073a4b473e kbuild: add -Wno-pointer-sign flag unconditionally
      9df3e7a7d7d6 kbuild: add -Wno-unused-but-set-variable flag unconditionally
      69ea912fda74 kbuild: remove unneeded link_multi_deps
      7d0ea2524202 kbuild: use 'else ifeq' for checksrc to improve readability
      04c459d20448 kconfig: remove oldnoconfig target
      0085b4191f3e kconfig: remove silentoldconfig target
      3f80babd9ca4 kbuild: remove unused cc-fullversion variable
      2cd3faf87d2d merge_config.sh: Allow to define config prefix
      076f421da5d4 kbuild: replace cc-name test with CONFIG_CC_IS_CLANG
      6bbe4385d035 kconfig: merge_config: avoid false positive matches from comment lines
      
      [From post v4.20]
      885480b08469 Makefile: Move -Wno-unused-but-set-variable out of GCC only block
      
      There are a number of changes related to additional warnings as well as
      being able to drop cc-name entirely that have been omitted for now as
      additional work is required first.
      
      Cc: Masahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      473fc279
  2. Jul 08, 2021
  3. Jul 07, 2021
  4. Jul 05, 2021
  5. Jun 30, 2021
  6. Jun 28, 2021
  7. Jun 22, 2021
  8. Jun 07, 2021
  9. May 25, 2021
  10. May 24, 2021
    • Marek Behún's avatar
      build: link with --build-id=none · da48bd9e
      Marek Behún authored and Tom Rini's avatar Tom Rini committed
      
      Some toolchains are compiled so that they pass a --build-id=something
      parameter to the linker implicitly.
      
      This causes U-Boot LTO linking to fail with something like:
        ld: section .note.gnu.build-id LMA ... overlaps section .text LMA ...
      because U-Boot's link scripts do not currently handle .note.gnu.build-id
      section.
      
      Fix this by explicitly disabling build-id.
      
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      da48bd9e
    • Marek Behún's avatar
      build: support building with Link Time Optimizations · c1094987
      Marek Behún authored and Tom Rini's avatar Tom Rini committed
      
      Add plumbing for building U-Boot with Link Time Optimizations.
      
      When building with LTO, $(PLATFORM_LIBS) has to be in --whole-archive /
      --no-whole-archive group, otherwise some functions declared in assembly
      may not be resolved and linking may fail.
      
      Note: clang may throw away linker list symbols it thinks are unused when
      compiling with LTO. To force these symbols to be included, we refer to
      them via the __ADDRESSABLE macro in a C file generated from compiled
      built-in.o files before linking.
      
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      c1094987
    • Marek Behún's avatar
      build: use thin archives instead of incremental linking · 958f2e57
      Marek Behún authored and Tom Rini's avatar Tom Rini committed
      
      Currently we use incremental linking (ld -r) to link several object
      files from one directory into one built-in.o object file containing the
      linked code from that directory (and its subdirectories).
      
      Linux has, some time ago, moved to thin archives instead.
      
      Thin archives are archives (.a) that do not really contain the object
      files, only references to them.
      
      Using thin archives instead of incremental linking
      - saves disk space
      - apparently works better with dead code elimination
      - makes things easier for LTO
      
      The third point is the important one for us. With incremental linking
      there are several options how to do LTO, and that would unnecessarily
      complicate things.
      
      We have to use the --whole-archive/--no-whole-archive linking option
      instead of --start-group/--end-group, otherwise linking may fail because
      of unresolved symbols, or the resulting binary will be unusable.
      
      We also need to use the P flag for ar, otherwise final linking may fail.
      
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      958f2e57
    • Marek Behún's avatar
      Makefile, Makefile.spl: cosmetic change · 1445836c
      Marek Behún authored and Tom Rini's avatar Tom Rini committed
      
      Indent the linking commands so that they look cosmetically better.
      
      Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      1445836c
  11. May 19, 2021
  12. May 17, 2021
    • Simon Glass's avatar
      Makefile: Handle building in a very old build directory · a7d03d53
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Versions of U-Boot before 2014.01 created a symlink from include/asm to
      the architecture-specific header directory.
      
      If an ARM board is build with that old version, then sandbox is built on
      a more recent version (both with in-tree builds), the include/asm symlink
      confuses the build system. It picks up the ARM headers when it should be
      using the sandbox ones.
      
      Since 2014 U-Boot has only created a symlink inside the include/asm/
      directory and only for out-of-tree builds. So for in-tree builds it does
      not expect to see an include/asm symlink. It is not removed by
      'make mrproper'. It does show up with 'git status' but is easy enough to
      miss.
      
      Add include/asm to the files to remove with 'make mkproper'. For recent
      U-Boot builds this has no effect, since include/asm is a directory, not a
      file. If the include/asm symlink is there, it will be removed.
      
      Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a7d03d53
    • Andrey Zhizhikin's avatar
      Makefile: allow to override python3 · f68ed0bc
      Andrey Zhizhikin authored and Tom Rini's avatar Tom Rini committed
      
      Python3 taken from the PATH causes build issues when pylibfdt bindings are
      generated with Yocto SDK.
      
      Python3 provided as a part of SDK is not compatible with host Python3,
      therefore binding build breaks with following errors:
      
      scripts/dtc/pylibfdt/libfdt_wrap.c:154:11: fatal error: Python.h: No such file or directory
        154 | # include <Python.h>
            |           ^~~~~~~~~~
      
      Do not enforce the python3 from the PATH and make it conditionally-assigned
      so it can be overridden from outside of build system. Keep the default
      assignment to point to version that is taken from the PATH.
      
      Similar fix has been introduced in b48bfc74 ("tools: allow to override
      python"), where conditional assignment is used for python executable to
      address similar build errors.
      
      Signed-off-by: default avatarAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
      Cc: Simon Glass <sjg@chromium.org>
      Fixes: e91610da ("kconfig: re-sync with Linux 4.17-rc4")
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      f68ed0bc
  13. May 11, 2021
  14. May 10, 2021
  15. May 02, 2021
  16. Apr 28, 2021
  17. Apr 27, 2021
  18. Apr 20, 2021
  19. Apr 10, 2021
  20. Apr 05, 2021
  21. Apr 01, 2021
  22. Mar 29, 2021
  23. Mar 28, 2021
    • Jessica Clarke's avatar
      Support building on macOS/arm64 · 3b142045
      Jessica Clarke authored and Tom Rini's avatar Tom Rini committed
      
      On Arm-based Macs, -no_pie is ignored and gives a linker warning.
      Moreover, the build falls over with:
      
        ld: Absolute addressing not allowed in arm64 code but used in '_image_type_ptr_aisimage' referencing '_image_type_aisimage'
      
      for dumpimage and mkimage, since we put data structs in text sections
      not data sections and so cannot have dynamic relocations. Instead, move
      the sections to __DATA and drop disabling PIE.
      
      Signed-off-by: default avatarJessica Clarke <jrtc27@jrtc27.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      3b142045
  24. Mar 27, 2021
    • Simon Glass's avatar
      dm: i2c: Add a migration method for I2C · 65c8cdc7
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This probably should have been done a while back since it is a core
      system. Add a migration deadline of later this year, to catch the
      stragglers.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      65c8cdc7
    • Simon Glass's avatar
      Makefile: Drop the old SPI flash migration message · 782dac5b
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This message does not seem to make sense. It may be out of date. Drop it.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      782dac5b
    • Simon Glass's avatar
      Makefile: Use common code for DM_ETH deprecation warning · 8cd1874f
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Update the CONFIG_DM_ETH check to use the 'deprecated' function.
      
      Tested with snow
      
      Old message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_ETH (Driver Model
      for Ethernet drivers). Please update the board to use
      CONFIG_DM_ETH before the v2020.07 release. Failure to
      update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ====================================================
      
      New message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_ETH (Driver Model
      for Ethernet drivers). Please update the board to use
      CONFIG_DM_ETH before the v2020.07 release. Failure to
      update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ====================================================
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      8cd1874f
    • Simon Glass's avatar
      Makefile: Use common code for WDT deprecation warning · 78b4a564
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Update the CONFIG_WDT check to use the 'deprecated' function.
      
      Tested with kmcent2
      
      Old message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_WDT (DM watchdog support).
      Please update the board to use CONFIG_WDT before the
      v2019.10 release.
      Failure to update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ====================================================
      
      New message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_WDT (Driver Model
      for DM watchdog). Please update the board to use
      CONFIG_WDT before the v2019.10 release. Failure to
      update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ====================================================
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      78b4a564
    • Simon Glass's avatar
      Makefile: Use common code for SPI_FLASH deprecation warning · ec384f9f
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Update the CONFIG_DM_SPI_FLASH check to use the 'deprecated' function.
      
      Tested with vinco
      
      Old message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_SPI_FLASH. Please update
      the board to use CONFIG_SPI_FLASH before the v2019.07 release.
      Failure to update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ====================================================
      
      New message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_SPI_FLASH (Driver Model
      for SPI flash). Please update the board to use
      CONFIG_DM_SPI_FLASH before the v2019.07 release. Failure to
      update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ====================================================
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      ec384f9f
    • Simon Glass's avatar
      Makefile: Use common code for DM_VIDEO deprecation warning · d13aee07
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Update the CONFIG_DM_VIDEO check to use the 'deprecated' function.
      
      Tested with pxm2
      
      Old message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_VIDEO Please update
      the board to use CONFIG_DM_VIDEO before the v2019.07 release.
      Failure to update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ====================================================
      
      New message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_VIDEO (Driver Model
      for video). Please update the board to use
      CONFIG_DM_VIDEO before the v2019.07 release. Failure to
      update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ==================================================
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      d13aee07
    • Simon Glass's avatar
      Makefile: Use common code for PCI deprecation warning · 39e526a8
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Update the CONFIG_DM_PCI check to use the 'deprecated' function.
      
      Tested with MPC8349ITX
      
      Old message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_PCI Please update
      the board to use CONFIG_DM_PCI before the v2019.07 release.
      Failure to update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ====================================================
      
      New message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_PCI (Driver Model
      for PCI). Please update the board to use
      CONFIG_DM_PCI before the v2019.07 release. Failure to
      update by the deadline may result in board removal.
      See doc/driver-model/migration.rst for more info.
      ====================================================
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      39e526a8
Loading