Skip to content
Snippets Groups Projects
  1. Jan 16, 2021
    • Florian Klink's avatar
      dts: Log name of expected .dtb file · 1d55eb15
      Florian Klink authored and Tom Rini's avatar Tom Rini committed
      
      Make it more obvious what .dts file was expected by the build system.
      
      When adding support for a new board, I kept getting this error message,
      assuming I passed a wrong DEVICE_TREE parameter.
      
      However, what was really the mistake was that the entry in
      `arch/arm/dts/Makefile` was missing, and u-boot didn't like not being
      able to find the .dtb file that should have been produced.
      
      Simply logging the expected .dtb file name should make it easier to spot
      such mistakes.
      
      Signed-off-by: default avatarFlorian Klink <flokli@flokli.de>
      1d55eb15
  2. Jan 05, 2021
    • Simon Glass's avatar
      dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO() · 20e442ab
      Simon Glass authored
      
      The current macro is a misnomer since it does not declare a device
      directly. Instead, it declares driver_info record which U-Boot uses at
      runtime to create a device.
      
      The distinction seems somewhat minor most of the time, but is becomes
      quite confusing when we actually want to declare a device, with
      of-platdata. We are left trying to distinguish between a device which
      isn't actually device, and a device that is (perhaps an 'instance'?)
      
      It seems better to rename this macro to describe what it actually is. The
      macros is not widely used, since boards should use devicetree to declare
      devices.
      
      Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is
      declaring a new driver_info record, not a device.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      20e442ab
    • Simon Glass's avatar
      Makefile: Tidy up SPL dtb production · c7674fcb
      Simon Glass authored
      
      Use the SPL_NAME variable to simplify the rules. Drop the SPL targets
      clean-files since the SPL and TPL dts/ directories are removed by
      existing rules. Move the SPL rules into a new spl_dtbs to avoid the
      complicated $(if) construct.
      
      Also drop unused pieces from the 'targets' variable.
      
      With this, SPL and TPL have separate dtbs which respect the various
      u-boot,dm-spl / u-boot,dm-tpl tags.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      c7674fcb
    • Simon Glass's avatar
      Makefile: Build SPL dtbs in the spl/ directory · de3e372a
      Simon Glass authored
      
      Rather than putting these in the top-level dts/ directory (which is
      intended for U-Boot proper), put them in the correct subdirectory for
      SPL (either spl/ or tpl/). This is where other SPL targets are kept,
      so this is more consistent.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      de3e372a
    • Simon Glass's avatar
      Makefile: Build a separate .dtb for TPL · 53db2eec
      Simon Glass authored
      
      At present both SPL and TPL use the same devicetree binary. While there
      is logic to run fdtgrep separately on each one, it does not actually
      happen.
      
      Add a new TPL rule and use that instead. Make this rule conditional on
      there actually being a TPL. Do the same for SPL for consistency.
      
      Note that the SPL and TPL dtbs are build by a Makefule rule used for
      U-Boot proper. This is the 'dtbs' target in dts/Makefile. So the check
      for CONFIG_TPL_BUILD in cmd_fdtgrep never actually works at present.
      
      We don't support CONFIG_OF_EMBED for TPL at present.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      53db2eec
  3. Oct 29, 2020
    • Simon Glass's avatar
      dm: Support parent devices with of-platdata · e41651ff
      Simon Glass authored
      
      At present of-platdata does not provide parent information. But this is
      useful for I2C devices, for example, since it allows them to determine
      which bus they are on.
      
      Add support for setting the parent correctly, by storing the parent
      driver_info index in dtoc and reading this in lists_bind_drivers(). This
      needs multiple passes since we must process children after their parents
      already have been bound.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      e41651ff
  4. Oct 09, 2020
    • Simon Glass's avatar
      Kconfig: Create a new tools menu · 1fa057be
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present MKIMAGE_DTC_PATH is in the devicetree menu but not within
      'devicetree control' since it does not relate to that. As a result it
      shows up in the top menu.
      
      It actually relates to the mkimage tool, so create a new tools menu for it
      and move it there.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1fa057be
  5. Jan 28, 2020
  6. Jan 16, 2020
  7. Jan 07, 2020
  8. Oct 31, 2019
  9. Oct 30, 2019
  10. Apr 12, 2019
  11. Apr 09, 2019
  12. Mar 22, 2019
    • Masahiro Yamada's avatar
      Revert "Ensure device tree DTS is compiled" · a3444bd0
      Masahiro Yamada authored and Tom Rini's avatar Tom Rini committed
      
      This reverts commit 27cb7300.
      
      I am not sure if I correctly understood the log of commit 27cb7300
      ("Ensure device tree DTS is compiled"), but the code-diff looks like
      it was trying to solve the missed re-compilation when .dts was modified.
      
      Recently, commit 2737dfe0 ("kbuild: make arch-dtbs target PHONY")
      fixed the issue in a more correct and more complete way.
      
      Anyway, since the former commit, we see a clumsy log like this:
      
        make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date
      
      Another problem is, it created multiple paths to descend into
      arch/*/dts/, causing a race in parallel building.
      
      So, let's revert it.
      
      Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      a3444bd0
  13. Feb 28, 2019
  14. Feb 09, 2019
  15. Jan 15, 2019
    • Masahiro Yamada's avatar
      kbuild: add .SECONDARY special target to scripts/Kbuild.include · c16b137e
      Masahiro Yamada authored and Tom Rini's avatar Tom Rini committed
      
      Based on the following Linux commits:
      
       - 54a702f70589 ("kbuild: mark $(targets) as .SECONDARY and remove
         .PRECIOUS markers")
      
       - 8e9b61b293d9 ("kbuild: move .SECONDARY special target to
         Kbuild.include")
      
      GNU Make automatically deletes intermediate files that are updated
      in a chain of pattern rules.
      
      Example 1) %.dtb.o <- %.dtb.S <- %.dtb <- %.dts
      Example 2) %.o <- %.c <- %.c_shipped
      
      A couple of makefiles mark such targets as .PRECIOUS to prevent Make
      from deleting them, but the correct way is to use .SECONDARY.
      
        .SECONDARY
          Prerequisites of this special target are treated as intermediate
          files but are never automatically deleted.
      
        .PRECIOUS
          When make is interrupted during execution, it may delete the target
          file it is updating if the file was modified since make started.
          If you mark the file as precious, make will never delete the file
          if interrupted.
      
      Both can avoid deletion of intermediate files, but the difference is
      the behavior when Make is interrupted; .SECONDARY deletes the target,
      but .PRECIOUS does not.
      
      The use of .PRECIOUS is relatively rare since we do not want to keep
      partially constructed (possibly corrupted) targets.
      
      .SECONDARY with no prerequisites causes all targets to be treated as
      secondary. This agrees the policy of Kbuild.
      
      scripts/Kbuild.include seems a suitable place to add it because it is
      included from almost all sub-makes.
      
      Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      c16b137e
  16. Nov 26, 2018
  17. Sep 27, 2018
  18. Aug 17, 2018
  19. Jul 30, 2018
  20. Jul 10, 2018
  21. Jun 18, 2018
  22. May 07, 2018
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      83d290c5
  23. Feb 14, 2018
  24. Nov 30, 2017
  25. Nov 17, 2017
    • Masahiro Yamada's avatar
      pylibfdt: compile pylibfdt only when dtoc/binman is necessary · d6a0c78a
      Masahiro Yamada authored and Tom Rini's avatar Tom Rini committed
      
      Currently, pylibfdt is always compiled if swig is installed on your
      machine.  It is really annoying because most of targets (excepts
      x86, sunxi, rockchip) do not use dtoc or binman.
      
      "checkbinman" and "checkdtoc" are wrong.  It is odd that the final
      build stage checks if we have built necessary tools.  If your platform
      depends on dtoc/binman, you must be able to build pylibfdt.  If swig
      is not installed, it should fail immediately.
      
      I added PYLIBFDT, DTOC, BINMAN entries to Kconfig.  They should be
      property select:ed by platforms that need them.  Kbuild will descend
      into scripts/dtc/pylibfdt/ only when CONFIG_PYLIBFDT is enabled.
      
      Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      d6a0c78a
  26. Oct 06, 2017
  27. Sep 24, 2017
  28. Aug 13, 2017
  29. Jul 10, 2017
  30. Jun 01, 2017
  31. May 10, 2017
    • Alex Deymo's avatar
      Allow boards to initialize the DT at runtime. · 82f766d1
      Alex Deymo authored and Tom Rini's avatar Tom Rini committed
      
      In some boards like the Raspberry Pi the initial bootloader will pass
      a DT to the kernel. When using U-Boot as such kernel, the board code in
      U-Boot should be able to provide U-Boot with this, already assembled
      device tree blob.
      
      This patch introduces a new config option CONFIG_OF_BOARD to use instead
      of CONFIG_OF_EMBED or CONFIG_OF_SEPARATE which will initialize the DT
      from a board-specific funtion instead of bundling one with U-Boot or as
      a separated file. This allows boards like the Raspberry Pi to reuse the
      device tree passed from the bootcode.bin and start.elf firmware
      files, including the run-time selected device tree overlays.
      
      Signed-off-by: default avatarAlex Deymo <deymo@google.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      82f766d1
  32. Apr 05, 2017
  33. Mar 29, 2017
    • Mario Six's avatar
      dm: Add callback to modify the device tree · 0db4cd25
      Mario Six authored and Stefan Roese's avatar Stefan Roese committed
      
      Certain boards come in different variations by way of utilizing daughter
      boards, for example. These boards might contain additional chips, which
      are added to the main board's busses, e.g. I2C.
      
      The device tree support for such boards would either, quite naturally,
      employ the overlay mechanism to add such chips to the tree, or would use
      one large default device tree, and delete the devices that are actually
      not present.
      
      Regardless of approach, even on the U-Boot level, a modification of the
      device tree is a prerequisite to have such modular families of boards
      supported properly.
      
      Therefore, we add an option to make the U-Boot device tree (the actual
      copy later used by the driver model) writeable, and add a callback
      method that allows boards to modify the device tree at an early stage,
      at which, hopefully, also the application of device tree overlays will
      be possible.
      
      Signed-off-by: Mario Six's avatarMario Six <mario.six@gdsys.cc>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      0db4cd25
  34. Mar 26, 2017
  35. Mar 23, 2017
    • Mario Six's avatar
      dm: Add callback to modify the device tree · 2a792753
      Mario Six authored and Stefan Roese's avatar Stefan Roese committed
      
      Certain boards come in different variations by way of utilizing daughter
      boards, for example. These boards might contain additional chips, which
      are added to the main board's busses, e.g. I2C.
      
      The device tree support for such boards would either, quite naturally,
      employ the overlay mechanism to add such chips to the tree, or would use
      one large default device tree, and delete the devices that are actually
      not present.
      
      Regardless of approach, even on the U-Boot level, a modification of the
      device tree is a prerequisite to have such modular families of boards
      supported properly.
      
      Therefore, we add an option to make the U-Boot device tree (the actual
      copy later used by the driver model) writeable, and add a callback
      method that allows boards to modify the device tree at an early stage,
      at which, hopefully, also the application of device tree overlays will
      be possible.
      
      Signed-off-by: Mario Six's avatarMario Six <mario.six@gdsys.cc>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      2a792753
Loading