Skip to content
Snippets Groups Projects
  1. Jun 07, 2021
  2. May 25, 2021
  3. 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
  4. May 19, 2021
  5. 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
  6. May 11, 2021
  7. May 10, 2021
  8. May 02, 2021
  9. Apr 28, 2021
  10. Apr 27, 2021
  11. Apr 20, 2021
  12. Apr 10, 2021
  13. Apr 05, 2021
  14. Apr 01, 2021
  15. Mar 29, 2021
  16. 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
  17. 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
    • Simon Glass's avatar
      Makefile: Use common code for LIBATA deprecation warning · 099288bf
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Update the CONFIG_LIBATA check to use the 'deprecated' function.
      
      Tested with MPC8349ITX
      
      Old message:
      
      ===================== WARNING ======================
      This board does use CONFIG_LIBATA but has CONFIG_AHCI not
      enabled. Please update the storage controller driver to use
      CONFIG_AHCI 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_AHCI (Driver Model
      for AHCI). Please update the board to use
      CONFIG_AHCI 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>
      099288bf
    • Simon Glass's avatar
      Makefile: Use common code for MVSATA_IDE deprecation warning · a8834352
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Update the CONFIG_MVSATA_IDE check to use the 'deprecated' function.
      
      Tested with nas220
      
      Old message:
      
      ===================== WARNING ======================
      This board does use CONFIG_MVSATA_IDE which is not
      ported to driver-model (DM) yet. Please update the storage
      controller driver to use CONFIG_AHCI 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_AHCI (Driver Model
      for AHCI instead of CONFIG_MVSATA_IDE). Please update the board to use
      CONFIG_AHCI 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>
      a8834352
    • Simon Glass's avatar
      Makefile: Use common code for USB deprecation warning · 9e035b8e
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Update the USB check to use the 'deprecated' function.
      
      Tested with xpress
      
      Old message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_USB. Please update
      the board to use CONFIG_DM_USB 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_USB (Driver Model
      for  USB). Please update the board to use
      CONFIG_DM_USB 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>
      9e035b8e
    • Simon Glass's avatar
      Makefile: Use common code for MMC deprecation warning · 77dc55ea
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Update the MMC check to use the 'deprecated' function.
      
      Tested with zc5202
      
      Old message:
      
      ===================== WARNING ======================
      This board does not use CONFIG_DM_MMC. Please update
      the board to use CONFIG_DM_MMC before the v2019.04 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_MMC (Driver Model
      for MMC). Please update the board to use
      CONFIG_DM_MMC before the v2019.04 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>
      77dc55ea
    • Simon Glass's avatar
      Makefile: Add common code to report deprecation · 13732528
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a function which can be called to report a migration problem. This
      will make it easier to add new migration checks, since the logic and
      strings are not spread out over 8 lines of code.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      13732528
    • Simon Glass's avatar
      Makefile: Move non-DM migration messages to the top · 06467e46
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present the driver model migration messages are mixed with the others.
      Collect them together before starting to refactor them.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      06467e46
  18. Mar 26, 2021
  19. Mar 22, 2021
  20. Mar 20, 2021
Loading