1. 01 11月, 2021 1 次提交
    • A
      x86: Fix linking u-boot with ld.lld · 58772283
      Alistair Delva 提交于
      When linking the final u-boot binary with LLD, the following link errors
      are seen:
      
      ld.lld: error: can't create dynamic relocation R_386_32 against local
                     symbol in readonly segment; recompile object files with
                     -fPIC or pass '-Wl,-z,notext' to allow text relocations
                     in the output
      >>> defined in arch/x86/cpu/start.o
      >>> referenced by arch/x86/cpu/start.o:(.text.start+0x32)
      [...]
      >>> defined in arch/x86/cpu/start16.o
      >>> referenced by arch/x86/cpu/start16.o:(.start16+0x1C)
      
      According to Nick Desaulniers:
      
      "This is a known difference between GNU and LLVM linkers; the GNU
       linkers permit relocations in readonly segments (making them not read
       only), LLVM does not (by default)."
      
      Since U-Boot apparently seems to use relocations in readonly segments,
      change the global linker flags to permit them when linking with LLD by
      specifying '-z notext'.
      Signed-off-by: NAlistair Delva <adelva@google.com>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Bin Meng <bmeng.cn@gmail.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      58772283
  2. 28 10月, 2021 1 次提交
    • I
      sandbox: Remove OF_HOSTFILE · e7fb7896
      Ilias Apalodimas 提交于
      OF_HOSTFILE is used on sandbox configs only.  Although it's pretty
      unique and not causing any confusions,  we are better of having simpler
      config options for the DTB.
      
      So let's replace that with the existing OF_BOARD.  U-Boot would then
      have only three config options for the DTB origin.
      - OF_SEPARATE, build separately from U-Boot
      - OF_BOARD, board specific way of providing the DTB
      - OF_EMBED embedded in the u-boot binary(should not be used in production
      Signed-off-by: NIlias Apalodimas <ilias.apalodimas@linaro.org>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      e7fb7896
  3. 19 10月, 2021 2 次提交
    • T
      tools: Stop re-defining -std= when building tools · 4f03a4c7
      Tom Rini 提交于
      While we intentionally set -std=gnu11 for building host tools, and have
      for quite some time, we never dropped -std=gnu99 from tools/Makefile.
      This resulted in passing -std=gnu11 ... -std=gnu99 when building, and
      gnu99 would win.  This in turn would result now in warnings such as:
      tools/mkeficapsule.c:25:15: warning: redefinition of typedef 'u32' is a C11 feature [-Wtypedef-redefinition]
      typedef __u32 u32;
                    ^
      Signed-off-by: NTom Rini <trini@konsulko.com>
      4f03a4c7
    • S
      Makefile: Only build dtc if needed · 93b19653
      Simon Glass 提交于
      At present U-Boot always builds dtc if CONFIG_OF_CONTROL is defined, even
      when DTC is provided. The built dtc is not actually used, so this is a
      waste of time.
      
      Update the Makefile logic to build dtc only if one is not provided to the
      build with the DTC variable. Add documentation to explain this.
      
      This saves about 3.5 seconds of elapsed time on a clean build of
      sandbox_spl for me.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      93b19653
  4. 07 10月, 2021 1 次提交
  5. 06 10月, 2021 1 次提交
    • P
      acpi: Use U-Boot version for OEM_REVISION · a3423b3f
      Pali Rohár 提交于
      OEM_REVISION is 32-bit unsigned number. It should be increased only when
      changing software version. Therefore it should not depend on build time.
      
      Change calculation to use U-Boot version numbers and set this revision
      to date number.
      
      Prior this change OEM_REVISION was calculated from build date and stored in
      the same format.
      
      After this change macro U_BOOT_BUILD_DATE is not used in other files so
      remove it from global autogenerated files and also from Makefile.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      a3423b3f
  6. 04 10月, 2021 1 次提交
  7. 30 9月, 2021 2 次提交
  8. 28 9月, 2021 1 次提交
  9. 27 9月, 2021 1 次提交
  10. 25 9月, 2021 1 次提交
  11. 15 9月, 2021 1 次提交
  12. 05 9月, 2021 6 次提交
    • S
      net: Move network rules to drivers/net · 9f664920
      Simon Glass 提交于
      The code under drivers/net is related to ethernet networking drivers, in
      some fashion or another.  Drop these from the top-level Makefile and
      also move the phy rule into drivers/net/Makefile which is where it
      belongs.  Make the new rule for drivers/net check for the build-stage
      relevant ETH symbol.
      
      Fix up some Kconfig dependencies while we're here to mirror how the
      Makefile logic now works.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      [trini: Introduce ETH, Kconfig dependency changes, am43xx fix]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      9f664920
    • S
      power: Refactor Makefile rules · a4faf1f5
      Simon Glass 提交于
      Move the power/ rules into drivers/power to avoid clutter in the Makefile
      and drivers/Makefile files.
      
      We must select SPL_POWER if SPL_POWER_DOMAIN is used, since the two are
      currently independent and boards do not necessarily enable SPL_POWER.
      
      Add a TPL_POWER as well, as that is used by one board.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com>
      a4faf1f5
    • S
      gpio: Add a GPIO config · b2f9bac0
      Simon Glass 提交于
      At present we have SPL_GPIO and TPL_GPIO but not piain GPIO. This
      works because there is a special build rule in Makefile that always
      includes the drivers/gpio directory.
      
      It is better to have all driver directories included by drivers/Makefile
      and there is already a rule in there for this purpose. It just needs a
      Kconfig for U-Boot proper, so add one.
      
      Enable the option always for now, since this mimics current behaviour.
      This can be updated once DM_GPIO is used everywhere.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      b2f9bac0
    • S
      Makefile: Move drivers/dma/ into drivers/Makefile · 39f09140
      Simon Glass 提交于
      This rule should not be in the top-level Makefile. Move it, making use
      of the new LEGACY_DMA Kconfig.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      39f09140
    • S
      spi: Rename SPI_SUPPORT to SPI · ea2ca7e1
      Simon Glass 提交于
      Rename these options so that CONFIG_IS_ENABLED can be used with them.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      ea2ca7e1
    • S
      serial: Add a SERIAL config · 52510486
      Simon Glass 提交于
      At present we have SPL_SERIAL and TPL_SERIAL but not piain SERIAL. This
      works because there is a special build rule in Makefile that always
      includes the drivers/serial directory.
      
      It is better to have all driver directories included by drivers/Makefile
      and there is already a rule in there for this purpose. It just needs a
      Kconfig for U-Boot proper, so add one.
      
      It is always enabled, for now, since that mimics the current behaviour.
      It should be possible to drop the strange 'SERIAL_PRESENT' option at some
      point and use SERIAL instead.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      52510486
  13. 31 8月, 2021 1 次提交
  14. 26 8月, 2021 1 次提交
  15. 17 8月, 2021 1 次提交
  16. 31 7月, 2021 2 次提交
  17. 29 7月, 2021 5 次提交
    • P
      build: remove the variable NM in gen_ll_addressable_symbols.sh · ff7852d5
      Patrick Delaunay 提交于
      With LTO activated, the buildman tools failed with an error on my
      configuration (Ubuntu 20.04, stm32mp15_trusted_defconfig) with the error:
      
      ../arm-linux-gnueabi/bin/nm:
      	scripts/gen_ll_addressable_symbols.sh: file format not recognized
      
      It seems the shell variable initialization NM=$(NM) is not correctly
      interpreted when shell is started in the Makefile, but I have not this
      issue when I compile the same target without buildman.
      
      I don't found the root reason of the problem but I solve it by
      providing $(NM) as script parameter instead using a shell variable.
      
      The command executed is identical:
      
      cmd_keep-syms-lto.c := NM=arm-none-linux-gnueabihf-gcc-nm \
      u-boot/scripts/gen_ll_addressable_symbols.sh arch/arm/cpu/built-in.o \
      .... net/built-in.o >keep-syms-lto.c
      
      cmd_keep-syms-lto.c := u-boot/scripts/gen_ll_addressable_symbols.sh \
      arm-none-linux-gnueabihf-gcc-nm arch/arm/cpu/built-in.o \
      ... net/built-in.o > keep-syms-lto.c
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Signed-off-by: NPatrick Delaunay <patrick.delaunay@foss.st.com>
      ff7852d5
    • S
      Makefile: Move drivers/i2c/ into drivers/Makefile · 53789206
      Simon Glass 提交于
      This rule should not be in the top-level Makefile. Now that we have a
      consistent set of I2C Kconfigs for U-Boot proper, SPL and TPL, we can move
      it.
      
      Make use of the existing SPL/TPL rule in drivers/Makefile instead.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      53789206
    • S
      i2c: Fix the migration warning · 19c969ba
      Simon Glass 提交于
      While there is a CONFIG_I2C it does not really mean anything and is
      defined by only a few dozen boards. This should key off
      CONFIG_SYS_I2C_LEGACY instead.
      
      Fix it.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      19c969ba
    • S
      Makefile: Sort the subdirectories · 5f57b00c
      Simon Glass 提交于
      Adjust the subdirectories included in this file so that they are in
      alphabetical order. This makes it easier to follow.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      5f57b00c
    • S
      Makefile: Drop include/asm directory as well as symlink · c72c7d9d
      Simon Glass 提交于
      At present when using 'make mrproper' on an out-of-tree build, a warning
      is shown about include/asm being a directory. With old versions of U-Boot
      it is a file, but more recently it has become a directory.
      
      Remove this directory first, since that covers both cases.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      c72c7d9d
  18. 27 7月, 2021 1 次提交
  19. 24 7月, 2021 1 次提交
    • P
      smbios: Fix calculating BIOS Release Date · 11275e4f
      Pali Rohár 提交于
      BIOS Release Date must be in format mm/dd/yyyy and must be release date.
      U-Boot currently sets BIOS Release Date from U_BOOT_DMI_DATE macro which is
      generated from current build timestamp.
      
      Fix this issue by setting U_BOOT_DMI_DATE macro to U-Boot version which is
      better approximation of U-Boot release date than current build timestamp.
      Current U-Boot versioning is in format yyyy.mm so as a day choose 01.
      
      Some operating systems are using BIOS Release Date for detecting when was
      SMBIOS table filled or if it could support some feature (e.g. BIOS from
      1990 cannot support features invented in 2000). So this change also ensures
      that recompiling U-Boot from same sources but in different year does not
      change behavior of some operating systems.
      
      Macro U_BOOT_DMI_DATE is not used in other file than lib/smbios.c
      so remove it from global autogenerated files and also from Makefile.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      11275e4f
  20. 19 7月, 2021 3 次提交
    • T
      Makefile: Remove DM_VIDEO and DM_SPI_FLASH checks · b7b5cbe2
      Tom Rini 提交于
      As we have now completed the DM_VIDEO and DM_SPI_FLASH migrations we can
      remove the checks.
      Signed-off-by: NTom Rini <trini@konsulko.com>
      b7b5cbe2
    • T
      pci: Require DM_PCI · ac9fa570
      Tom Rini 提交于
      As the migration deadline has passed, require that DM_PCI be used.
      Signed-off-by: NTom Rini <trini@konsulko.com>
      ac9fa570
    • T
      usb: Enforce DM_USB migration for USB_HOST devices. · be5c0608
      Tom Rini 提交于
      As the deadline for migration to DM_USB, when using a USB host
      controller has now gone two years past the deadline, enforce migration.
      This is done by:
      
      - Ensuring that all host controller options (other than the very legacy
        old MUSB ones) now select USB_HOST.  USB_HOST now enforces DM_USB and
        OF_CONTROL.
        - Remove other parts of Kconfig logic that had platforms pick DM_USB.
        - To keep Kconfig happy, have some select statements test for USB_HOST
          as well.
      - Re-order some Kconfig entries and menus so that we can cleanly pick
        host or gadget roles.  For the various HCD options that have platform
        glue options, group them together and update dependencies in some
        cases.
      - As SPL_DM_USB is not required, on platforms that had not yet enabled
        it, disable it.
      
      Cc: Marek Vasut <marex@denx.de>
      Cc: Icenowy Zheng <icenowy@aosc.io>
      Cc: Samuel Holland <samuel@sholland.org>
      Cc: FUKAUMI Naoki <naobsd@gmail.com>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Jagan Teki <jagan@amarulasolutions.com>
      Signed-off-by: NTom Rini <trini@konsulko.com>
      be5c0608
  21. 15 7月, 2021 2 次提交
    • J
      Makefile: Conditionally add defaultenv_h to envtools target · 2a2896b1
      Joel Stanley 提交于
      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: NJoel Stanley <joel@jms.id.au>
      2a2896b1
    • T
      kconfig / kbuild: Re-sync with Linux 4.20 · 473fc279
      Tom Rini 提交于
      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: NTom Rini <trini@konsulko.com>
      473fc279
  22. 08 7月, 2021 1 次提交
  23. 07 7月, 2021 1 次提交
  24. 05 7月, 2021 1 次提交
  25. 01 7月, 2021 1 次提交