Skip to content
Snippets Groups Projects
  1. Feb 04, 2021
    • Viresh Kumar's avatar
      scripts: dtc: Build fdtoverlay tool · 0da6bcd9
      Viresh Kumar authored
      
      We will start building overlays for platforms soon in the kernel and
      would need fdtoverlay going forward. Lets start building it.
      
      The fdtoverlay program applies one or more overlay dtb blobs to a base
      dtb blob. The kernel build system would later use fdtoverlay to generate
      the overlaid blobs based on platform specific configurations.
      
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Link: https://lore.kernel.org/r/4a201dea3ba11a00cab7e936dfc1140dac1a1ae3.1611904394.git.viresh.kumar@linaro.org
      0da6bcd9
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9 · 79edff12
      Rob Herring authored
      
      This adds the following commits from upstream:
      
      183df9e9c2b9 gitignore: Ignore the swp files
      0db6d09584e1 gitignore: Add cscope files
      307afa1a7be8 Update Jon Loeliger's email
      ca16a723fa9d fdtdump: Fix gcc11 warning
      64990a272e8f srcpos: increase MAX_SRCFILE_DEPTH
      163f0469bf2e dtc: Allow overlays to have .dtbo extension
      3b01518e688d Set last_comp_version correctly in new dtb and fix potential version issues in fdt_open_into
      f7e5737f26aa tests: Fix overlay_overlay_nosugar test case
      7cd5d5fe43d5 libfdt: Tweak description of assume-aligned load helpers
      a7c404099349 libfdt: Internally perform potentially unaligned loads
      bab85e48a6f4 meson: increase default timeout for tests
      f8b46098824d meson: do not assume python is installed, skip tests
      30a56bce4f0b meson: fix -Wall warning
      5e735860c478 libfdt: Check for 8-byte address alignment in fdt_ro_probe_()
      67849a327927 build-sys: add meson build
      05874d08212d pylibfdt: allow build out of tree
      3bc3a6b9fe0c dtc: Fix signedness comparisons warnings: Wrap (-1)
      e1147b159e92 dtc: Fix signedness comparisons warnings: change types
      04cf1fdc0fcf convert-dtsv0: Fix signedness comparisons warning
      b30013edb878 libfdt: Fix kernel-doc comments
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      79edff12
  2. Feb 03, 2021
  3. Oct 12, 2020
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.6.0-31-gcbca977ea121 · 6e9c9686
      Rob Herring authored
      
      This adds the following commits from upstream:
      
      cbca977ea121 checks: Allow PCI bridge child nodes without an address
      73e0f143b73d libfdt: fdt_strerror(): Fix comparison warning
      6c2be7d85315 libfdt: fdt_get_string(): Fix sequential write comparison warnings
      82525f41d59e libfdt: libfdt_wip: Fix comparison warning
      fb1f65f15832 libfdt: fdt_create_with_flags(): Fix comparison warning
      f28aa271000b libfdt: fdt_move(): Fix comparison warnings
      3d7c6f44195a libfdt: fdt_add_string_(): Fix comparison warning
      10f682788c30 libfdt: fdt_node_offset_by_phandle(): Fix comparison warning
      07158f4cf2a2 libfdt: overlay: Fix comparison warning
      ce9e1f25a7de libfdt: fdt_resize(): Fix comparison warning
      faa76fc10bc5 libfdt: fdt_splice_(): Fix comparison warning
      54dca0985316 libfdt: fdt_get_string(): Fix comparison warnings
      f8e11e61624e libfdt: fdt_grab_space_(): Fix comparison warning
      0c43d4d7bf5a libfdt: fdt_mem_rsv(): Fix comparison warnings
      442ea3dd1579 libfdt: fdt_offset_ptr(): Fix comparison warnings
      ca19c3db2bf6 Makefile: Specify cflags for libyaml
      7bb86f1c0956 libfdt: fix fdt_check_node_offset_ w/ VALID_INPUT
      3d522abc7571 dtc: Include stdlib.h in util.h
      808cdaaf524f dtc: Avoid UB when shifting
      3e3138b4a956 libfdt: fix fdt_check_full buffer overrun
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      6e9c9686
  4. Sep 29, 2020
  5. Aug 19, 2020
  6. Aug 09, 2020
    • Masahiro Yamada's avatar
      kbuild: introduce hostprogs-always-y and userprogs-always-y · faabed29
      Masahiro Yamada authored
      
      To build host programs, you need to add the program names to 'hostprogs'
      to use the necessary build rule, but it is not enough to build them
      because there is no dependency.
      
      There are two types of host programs: built as the prerequisite of
      another (e.g. gen_crc32table in lib/Makefile), or always built when
      Kbuild visits the Makefile (e.g. genksyms in scripts/genksyms/Makefile).
      
      The latter is typical in Makefiles under scripts/, which contains host
      programs globally used during the kernel build. To build them, you need
      to add them to both 'hostprogs' and 'always-y'.
      
      This commit adds hostprogs-always-y as a shorthand.
      
      The same applies to user programs. net/bpfilter/Makefile builds
      bpfilter_umh on demand, hence always-y is unneeded. In contrast,
      programs under samples/ are added to both 'userprogs' and 'always-y'
      so they are always built when Kbuild visits the Makefiles.
      
      userprogs-always-y works as a shorthand.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      faabed29
  7. Jun 30, 2020
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.6.0-11-g9d7888cbf19c · 3eb619b2
      Rob Herring authored
      
      Sync with upstream dtc primarily to pickup the I2C bus check fixes. The
      interrupt_provider check is noisy, so turn it off for now.
      
      This adds the following commits from upstream:
      
      9d7888cbf19c dtc: Consider one-character strings as strings
      8259d59f59de checks: Improve i2c reg property checking
      fdabcf2980a4 checks: Remove warning for I2C_OWN_SLAVE_ADDRESS
      2478b1652c8d libfdt: add extern "C" for C++
      f68bfc2668b2 libfdt: trivial typo fix
      7be250b4d059 libfdt: Correct condition for reordering blocks
      81e0919a3e21 checks: Add interrupt provider test
      85e5d839847a Makefile: when building libfdt only, do not add unneeded deps
      b28464a550c5 Fix some potential unaligned accesses in dtc
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      3eb619b2
  8. Jun 08, 2020
    • Masahiro Yamada's avatar
      scripts/dtc: use pkg-config to include <yaml.h> in non-standard path · f8d8b46c
      Masahiro Yamada authored
      
      Commit 067c650c ("dtc: Use pkg-config to locate libyaml") added
      'pkg-config --libs' to link libyaml installed in a non-standard
      location.
      
      yamltree.c includes <yaml.h>, but that commit did not add the search
      path for <yaml.h>. If /usr/include/yaml.h does not exist, it fails to
      build. A user can explicitly pass HOSTCFLAGS to work around it, but
      the policy is not consistent.
      
      There are two ways to deal with libraries in a non-default location.
      
      [1] Use HOSTCFLAGS and HOSTLDFLAGS for additional search paths for
          headers and libraries.
          They are documented in Documentation/kbuild/kbuild.rst
      
          $ make HOSTCFLAGS='-I <prefix>/include' HOSTLDFLAGS='-L <prefix>/lib'
      
      [2] Use pkg-config
      
          'pkg-config --cflags' for querying the header search path
          'pkg-config --libs'   for querying the lib and its path
      
      If we go with pkg-config, use [2] consistently. Do not mix up
      [1] and [2].
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      f8d8b46c
  9. Apr 17, 2020
    • Masahiro Yamada's avatar
      kbuild: check libyaml installation for 'make dt_binding_check' · 0903060f
      Masahiro Yamada authored
      
      If you run 'make dtbs_check' without installing the libyaml package,
      the error message "dtc needs libyaml ..." is shown.
      
      This should be checked also for 'make dt_binding_check' because dtc
      needs to validate *.example.dts extracted from *.yaml files.
      
      It is missing since commit 4f0e3a57 ("kbuild: Add support for DT
      binding schema checks"), but this fix-up is applicable only after commit
      e10c4321 ("kbuild: allow to run dt_binding_check and dtbs_check
      in a single command").
      
      I gave the Fixes tag to the latter in case somebody is interested in
      back-porting this.
      
      Fixes: e10c4321 ("kbuild: allow to run dt_binding_check and dtbs_check in a single command")
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      0903060f
  10. Mar 27, 2020
    • Dirk Mueller's avatar
      scripts/dtc: Remove redundant YYLOC global declaration · e33a814e
      Dirk Mueller authored
      
      gcc 10 will default to -fno-common, which causes this error at link
      time:
      
        (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
      
      This is because both dtc-lexer as well as dtc-parser define the same
      global symbol yyloc. Before with -fcommon those were merged into one
      defintion. The proper solution would be to to mark this as "extern",
      however that leads to:
      
        dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
         26 | extern YYLTYPE yylloc;
            |                ^~~~~~
      In file included from dtc-lexer.l:24:
      dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
        127 | extern YYLTYPE yylloc;
            |                ^~~~~~
      cc1: all warnings being treated as errors
      
      which means the declaration is completely redundant and can just be
      dropped.
      
      Signed-off-by: default avatarDirk Mueller <dmueller@suse.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      [robh: cherry-pick from upstream]
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      e33a814e
  11. Mar 25, 2020
  12. Mar 13, 2020
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.6.0-2-g87a656ae5ff9 · d047cd8a
      Rob Herring authored
      
      This adds the following commits from upstream:
      
      87a656ae5ff9 check: Inform about missing ranges
      73d6e9ecb417 libfdt: fix undefined behaviour in fdt_splice_()
      2525da3dba9b Bump version to v1.6.0
      62cb4ad286ff Execute tests on FreeBSD with Cirrus CI
      1f9a41750883 tests: Allow running the testsuite on already installed binary / libraries
      c5995ddf4c20 tests: Honour NO_YAML make variable
      e4ce227e89d7 tests: Properly clean up .bak file from tests
      9b75292c335c tests: Honour $(NO_PYTHON) flag from Makefile in run_tests.sh
      6c253afd07d4 Encode $(NO_PYTHON) consistently with other variables
      95ec8ef706bd tests: No need to explicitly pass $PYTHON from Make to run_tests.sh
      2b5f62d109a2 tests: Let run_tests.sh run Python tests without Makefile assistance
      76b43dcbd18a checks: Add 'dma-ranges' check
      e5c92a4780c6 libfdt: Use VALID_INPUT for FDT_ERR_BADSTATE checks
      e5cc26b68bc0 libfdt: Add support for disabling internal checks
      28fd7590aad2 libfdt: Improve comments in some of the assumptions
      fc207c32341b libfdt: Fix a few typos
      0f61c72dedc4 libfdt: Allow exclusion of fdt_check_full()
      f270f45fd5d2 libfdt: Add support for disabling ordering check/fixup
      c18bae9a4c96 libfdt: Add support for disabling version checks
      fc03c4a2e04e libfdt: Add support for disabling rollback handling
      77563ae72b7c libfdt: Add support for disabling sanity checks
      57bc6327b80b libfdt: Add support for disabling dtb checks
      464962489dcc Add a way to control the level of checks in the code
      0c5326cb2845 libfdt: De-inline fdt_header_size()
      cc6a5a071504 Revert "yamltree: Ensure consistent bracketing of properties with phandles"
      0e9225eb0dfe Remove redundant YYLOC global declaration
      cab09eedd644 Move -DNO_VALGRIND into CPPFLAGS
      0eb1cb0b531e Makefile: pass $(CFLAGS) also during dependency generation
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      d047cd8a
    • Rob Herring's avatar
      scripts/dtc: Remove unused makefile fragments · 78154212
      Rob Herring authored
      
      The Makefile.dtc and Makefile.libfdt fragments from upstream dtc aren't
      used by the kernel build, so let's remove them and stop syncing them.
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      78154212
    • Masahiro Yamada's avatar
      kbuild: allow to run dt_binding_check without kernel configuration · 9dffecc1
      Masahiro Yamada authored
      
      The dt_binding_check target is located outside of the
      'ifneq ($(dtstree),) ... endif' block.
      
      So, you can run 'make dt_binding_check' on any architecture.
      This makes a perfect sense because the dt-schema is arch-agnostic.
      
      The only one problem I see is that scripts/dtc/dtc is not always built.
      For example, ARCH=x86 defconfig does not define CONFIG_DTC. Kbuild
      descends into scripts/dtc/ with doing nothing. Then, it fails to build
      *.example.dt.yaml files.
      
      Let's build scripts/dtc/dtc forcibly when running dt_binding_check.
      
      The dt-schema does not depend on any CONFIG option either, so you
      should be able to run dt_binding_check without the .config file.
      
      Going forward, you can directly run 'make dt_binding_check' in a
      pristine source tree.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      9dffecc1
  13. Feb 03, 2020
    • Masahiro Yamada's avatar
      kbuild: rename hostprogs-y/always to hostprogs/always-y · 5f2fb52f
      Masahiro Yamada authored
      
      In old days, the "host-progs" syntax was used for specifying host
      programs. It was renamed to the current "hostprogs-y" in 2004.
      
      It is typically useful in scripts/Makefile because it allows Kbuild to
      selectively compile host programs based on the kernel configuration.
      
      This commit renames like follows:
      
        always       ->  always-y
        hostprogs-y  ->  hostprogs
      
      So, scripts/Makefile will look like this:
      
        always-$(CONFIG_BUILD_BIN2C) += ...
        always-$(CONFIG_KALLSYMS)    += ...
            ...
        hostprogs := $(always-y) $(always-m)
      
      I think this makes more sense because a host program is always a host
      program, irrespective of the kernel configuration. We want to specify
      which ones to compile by CONFIG options, so always-y will be handier.
      
      The "always", "hostprogs-y", "hostprogs-m" will be kept for backward
      compatibility for a while.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      5f2fb52f
  14. Jan 28, 2020
  15. Dec 26, 2019
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a · 0cec114e
      Rob Herring authored
      
      This adds the following commits from upstream:
      
      c40aeb60b47a travis.yml: Run tests on the non-x86 builders, too
      9f86aff444f4 Add .cirrus.yml for FreeBSD build
      34c82275bae6 Avoid gnu_printf attribute when using Clang
      743000931bc9 tests: default to 'cc' if CC not set
      adcd676491cc Add test-case for trailing zero
      d9c55f855b65 Remove trailing zero from the overlay path
      7a22132c79ec pylibfdt: Adjust for deprecated test methods
      dbe80d577ee2 tests: add extension to sed -i for GNU/BSD sed compatibility
      af57d440d887 libfdt: Correct prototype for fdt_ro_probe_()
      6ce585ac153b Use correct inttypes.h format specifier
      715028622547 support byacc in addition to bison
      fdf3f6d897ab pylibfdt: Correct the type for fdt_property_stub()
      430419c28100 tests: fix some python warnings
      588a29ff2e4e util: use gnu_printf format attribute
      bc876708ab1d fstree: replace lstat with stat
      4c3c4ccb9916 dumptrees: pass outputdir as first argument
      aa522da9fff6 tests: allow out-of-tree test run
      0d0d0fa51b1f fdtoverlay: Return non-zero exit code if overlays can't be applied
      4605eb047b38 Add .editorconfig
      18d7b2f4ee45 yamltree: Ensure consistent bracketing of properties with phandles
      67f790c1adcc libfdt.h: add explicit cast from void* to uint8_t* in fdt(32|64)_st
      b111122ea5eb pylibfdt: use python3 shebang
      60e0db3d65a1 Ignore phandle properties in /aliases
      95ce19c14064 README: update for Python 3
      5345db19f615 livetree: simplify condition in get_node_by_path
      b8d6eca78210 libfdt: Allow #size-cells of 0
      184f51099471 Makefile: Add EXTRA_CFLAGS variable
      812b1956a076 libfdt: Tweak data handling to satisfy Coverity
      5c715a44776a fdtoverlay: Ignore symbols in overlays which don't apply to the target tree
      b99353474850 fdtoverlay: Allow adding labels to __overlay__ nodes in overlays
      d6de81b81b68 pylibfdt: Add support for fdt_get_alias()
      1c17714dbb3a pylibfdt: Correct the FdtSw example
      ad57e4574a37 tests: Add a failed test case for 'fdtoverlay' with long target path
      bbe3b36f542b fdtoverlay: Rework output allocation
      6c2e61f08396 fdtoverlay: Improve error messages
      297f5abb362e fdtoverlay: Check for truncated overlay blobs
      
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: clang-built-linux@googlegroups.com
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      0cec114e
  16. Nov 04, 2019
  17. Jun 21, 2019
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.5.0-30-g702c1b6c0e73 · 12869ecd
      Rob Herring authored
      
      Pull in SPDX tag conversion from upstream dtc. This will replace the
      conversion done in the kernel tree copy in v5.2-rc2.
      
      This adds the following commits from upstream:
      
      702c1b6c0e73 README.license: Update to reflect SPDX tag usage
      4097bbffcf1d dtc: Add GPLv2 SPDX tags to files missing license text
      94f87cd5b7c5 libfdt: Add dual GPL/BSD SPDX tags to files missing license text
      c4ffc05574b1 tests: Replace license boilerplate with SPDX tags
      a5ac29baacd2 pylibfdt: Replace dual GPLv2/BSD license boilerplate with SPDX tags
      7fb0f4db2eb7 libfdt: Replace GPL/BSD boilerplate/reference with SPDX tags
      acfe84f2c47e dtc: Replace GPLv2 boilerplate/reference with SPDX tags
      
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      12869ecd
  18. Jun 19, 2019
  19. Jun 12, 2019
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.5.0-23-g87963ee20693 · 9bb9c6a1
      Rob Herring authored
      
      This adds the following commits from upstream:
      
      87963ee20693 livetree: add missing type markers in generated overlay properties
      825146d13dc0 Fix typos in various documentation and source files
      25bb080c18d1 Update the GPL2 text to the latest revision
      243176c4ce84 Fix bogus error on rebuild
      ce01b21098a4 libfdt: Add FDT_CREATE_FLAG_NO_NAME_DEDUP flag that trades size for speed
      fbb62754ce45 libfdt: Introduce fdt_create_with_flags()
      228a44cce857 libfdt: Ensure fdt_add_property frees allocated name string on failure
      8f695676227b Avoid assertion in check_interrupts_property()
      5c3513f68921 Link tools and tests against libfdt shared library
      00f9febf9c16 tests: Rename tests.sh to testutils.sh
      c5d45188f923 Clean up LDLIBS handling
      6ef8fcd05b74 Rebuild libfdt shared object if versioning linker script changes
      26ee65a16c38 Use Python3 by default
      cca6546244cb libfdt: Make fdt_get_max_phandle() an inline
      730875016a6a libfdt: Add phandle generation helper
      7dfb61ba96b1 libfdt: Use fdt_find_max_phandle()
      2bc5b66d7f6c libfdt: Add new maximum phandle lookup function
      7fcf8208b8a9 libfdt: add fdt_append_addrrange()
      ae795b2db7a4 checks: Do not omit nodes with labels if symbol generation is requested
      eac2ad495b29 Update version.lds again
      f67b47135523 Revert "libfdt: Add phandle generation helper"
      54ea41c22415 libfdt: Add phandle generation helper
      4762ad051ee0 checks: Fix spelling in check_graph_endpoint
      d37f6b20107e Bump version to v1.5.0
      a4b1a307ff3a pylibfdt:tests: Extend the way how to find a Python module
      625dd8aaf20f pylibfdt: Change how passing tests are recognized
      364631626bb7 pylibfdt: Test fdt.setprop take bytes on Python 3, add error handling
      cb0f454f73cc pylibfdt: check_err accepts only integer as a first argument.
      4b68c6b3605a pylibfdt: Proper handling of bytes/unicode strings and octal literals
      78e113e81c9d Use PRIxPTR for printing uintptr_t values
      ea7a8f6dad67 libfdt: Fix FDT_ERR_NOTFOUND typos in documentation
      5aafd7ca43e0 libfdt: Fix fdt_getprop_by_offset() parameter name in documentation
      7cbc550f903b checks: Add unit address check if node is enabled
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      9bb9c6a1
  20. Jun 05, 2019
  21. May 30, 2019
  22. May 21, 2019
  23. May 18, 2019
  24. Feb 28, 2019
  25. Dec 13, 2018
    • Rob Herring's avatar
      kbuild: Add support for DT binding schema checks · 4f0e3a57
      Rob Herring authored
      
      This adds the build infrastructure for checking DT binding schema
      documents and validating dts files using the binding schema.
      
      Check DT binding schema documents:
      make dt_binding_check
      
      Build dts files and check using DT binding schema:
      make dtbs_check
      
      Optionally, DT_SCHEMA_FILES can be passed in with a schema file(s) to
      use for validation. This makes it easier to find and fix errors
      generated by a specific schema.
      
      Currently, the validation targets are separate from a normal build to
      avoid a hard dependency on the external DT schema project and because
      there are lots of warnings generated.
      
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Michal Marek <michal.lkml@markovi.net>
      Cc: linux-doc@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Cc: linux-kbuild@vger.kernel.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      4f0e3a57
  26. Nov 29, 2018
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.4.7-57-gf267e674d145 · c2e7075c
      Rob Herring authored
      
      This adds the following commits from upstream:
      
      f267e674d145 checks: Fix crash with multiple source annotations
      3616b9a811b6 checks: Use source position information for check failures
      2bdbd07a1223 checks: Make each message output atomic
      a1eff70c02cf util: Add xa{v}sprintf_append functions
      82a52ce4573b libfdt: Add a test for fdt_getprop_by_offset()
      607b8586b383 PEP8 / Flake8 cleanups for setup.py
      f9c0a425b648 Remove broken objdir / srcdir support
      5182b5e6f28c pylibfdt: Use common PREFIX variable
      d45bf1f5f2a6 Refine make tests_clean target
      99284c4db9cb Refine pylibfdt_clean target
      a4629cfaedfb Refine libfdt_clean target
      08380fc43aa2 tests: Use modern octal literals for Python
      8113c00b99d3 pylibfdt: Allow switch to Python 3 via environment variable PYTHON
      11738cf01f15 libfdt: Don't use memcpy to handle unaligned reads on ARM
      86a288a73670 checks: Restructure check_msg to decrease indentation
      5667e7ef9a9a annotations: add the annotation functionality
      8e20ccf52f90 annotations: add positions
      ca930e20bb54 tests: Don't lose errors from make checkm
      43366bb4eeee tests: Property count valgrind errors in wrapped tests
      5062516fb8cb srcpos: Remove srcpos_empty
      a3143fafbf83 Revert "annotations: add positions"
      403cc79f06a1 checks: Update SPI bus check for 'spi-slave'
      baa1d2cf7894 annotations: add positions
      ff2ad38f6a5a Merge remote-tracking branch 'origin/pr/18'
      aa7254d9cb17 libfdt: return correct value if #size-cells property is not present
      49903aed7783 use ptrdiff_t modifier for printing pointer differences
      da2b691ccf68 treesource: Fix dts output for phandles in middle of a sequence of ints
      8f8b77a0d62d tests: Wrap check_align() calls with base_run_test()
      522d81d572f2 Fix dts output with a REF_PATH marker
      e45198c98359 Added test cases for target references
      0fcffda15e9f Merge nodes with local target label references
      1e4a0928f3b3 pylibfdt: Don't have setup.py depend on where it's invoked from
      ca399b14956f pylibfdt: Eliminate run_setup make function
      98972f1b3e33 pylibfdt: Improved version extraction
      7ba2be6cda5f pylibfdt: Don't silence setup.py when V=1
      7691f9d39301 pylibfdt: Make SETUP make variable
      855b9963def9 pylibfdt: Simpler CFLAGS handling
      47cafbeeb977 pylibfdt: Link extension module with libfdt rather than rebuilding
      dd695d6afb19 pylibfdt: Correctly set build output directory
      59327523d0d8 pylibfdt: We don't need include files from the base directory
      e84742aa7b93 checks: fix simple-bus compatible matching
      8c59a97ce096 Fix missing labels when emitting dts format
      d448f9a5fd94 Revert dts output formatting changes of spaces around brackets
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      c2e7075c
  27. Oct 02, 2018
    • Rob Herring's avatar
      kbuild: consolidate Devicetree dtb build rules · 37c8a5fa
      Rob Herring authored
      
      There is nothing arch specific about building dtb files other than their
      location under /arch/*/boot/dts/. Keeping each arch aligned is a pain.
      The dependencies and supported targets are all slightly different.
      Also, a cross-compiler for each arch is needed, but really the host
      compiler preprocessor is perfectly fine for building dtbs. Move the
      build rules to a common location and remove the arch specific ones. This
      is done in a single step to avoid warnings about overriding rules.
      
      The build dependencies had been a mixture of 'scripts' and/or 'prepare'.
      These pull in several dependencies some of which need a target compiler
      (specifically devicetable-offsets.h) and aren't needed to build dtbs.
      All that is really needed is dtc, so adjust the dependencies to only be
      dtc.
      
      This change enables support 'dtbs_install' on some arches which were
      missing the target.
      
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      Acked-by: default avatarPaul Burton <paul.burton@mips.com>
      Acked-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
      Acked-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Michal Marek <michal.lkml@markovi.net>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: James Hogan <jhogan@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: linux-kbuild@vger.kernel.org
      Cc: linux-snps-arc@lists.infradead.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: uclinux-h8-devel@lists.sourceforge.jp
      Cc: linux-mips@linux-mips.org
      Cc: nios2-dev@lists.rocketboards.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-xtensa@linux-xtensa.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      37c8a5fa
  28. Sep 20, 2018
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.4.7-14-gc86da84d30e4 · f858927f
      Rob Herring authored
      
      Major changes are I2C and SPI bus checks, YAML output format (for
      future validation), some new libfdt functions, and more libfdt
      validation of dtbs.
      
      The YAML addition adds an optional dependency on libyaml. pkg-config is
      used to test for it and pkg-config became a kconfig dependency in 4.18.
      
      This adds the following commits from upstream:
      
      c86da84d30e4 Add support for YAML encoded output
      361b5e7d8067 Make type_marker_length helper public
      bfbfab047e45 pylibfdt: Add a means to add and delete notes
      9005f4108e7c pylibfdt: Allow delprop() to return errors
      b94c056b137e Make valgrind optional
      fd06c54d4711 tests: Better testing of dtc -I fs mode
      c3f50c9a86d9 tests: Allow dtbs_equal_unordered to ignore mem reserves
      0ac9fdee37c7 dtc: trivial '-I fs -O dts' test
      0fd1c8c783f3 pylibfdt: fdt_get_mem_rsv returns 2 uint64_t values
      04853cad18f4 pylibfdt: Don't incorrectly / unnecessarily override uint64_t typemap
      9619c8619c37 Kill bogus TYPE_BLOB marker type
      ac68ff92ae20 parser: add TYPE_STRING marker to path references
      90a190eb04d9 checks: add SPI bus checks
      53a1bd546905 checks: add I2C bus checks
      88f18909db73 dtc: Bump version to v1.4.7
      85bce8b2f06d tests: Correction to vg_prepare_blob()
      57f7f9e7bc7c tests: Don't call memcmp() with NULL arguments
      c12b2b0c20eb libfdt: fdt_address_cells() and fdt_size_cells()
      3fe0eeda0b7f livetree: Set phandle properties type to uint32
      853649acceba pylibfdt: Support the sequential-write interface
      9b0e4fe26093 tests: Improve fdt_resize() tests
      1087504bb3e8 libfdt: Add necessary header padding in fdt_create()
      c72fa777e613 libfdt: Copy the struct region in fdt_resize()
      32b9c6130762 Preserve datatype markers when emitting dts format
      6dcb8ba408ec libfdt: Add helpers for accessing unaligned words
      42607f21d43e tests: Fix incorrect check name 'prop_name_chars'
      9d78c33bf8a1 tests: fix grep for checks error messages
      b770f3d1c13f pylibfdt: Support setting the name of a node
      2f0d07e678e0 pylibfdt: Add functions to set and get properties as strings
      354d3dc55939 pylibfdt: Update the bytearray size with pack()
      3c374d46acce pylibfdt: Allow reading integer values from properties
      49d32ce40bb4 pylibfdt: Use an unsigned type for fdt32_t
      481246a0c13a pylibfdt: Avoid accessing the internal _fdt member in tests
      9aafa33d99ed pylibfdt: Add functions to update properties
      5a598671fdbf pylibfdt: Support device-tree creation/expansion
      483e170625e1 pylibfdt: Add support for reading the memory reserve map
      29bb05aa4200 pylibfdt: Add support for the rest of the header functions
      582a7159a5d0 pylibfdt: Add support for fdt_next_node()
      f0f8c9169819 pylibfdt: Reorder functions to match libfdt.h
      64a69d123935 pylibfdt: Return string instead of bytearray from getprop()
      4d09a83420df fdtput: Add documentation
      e617cbe1bd67 fdtget: Add documentation
      180a93924014 Use <inttypes.h> format specifiers in a bunch of places we should
      b9af3b396576 scripts/dtc: Fixed format mismatch in fprintf
      4b8fcc3d015c libfdt: Add fdt_check_full() function
      c14223fb2292 tests: Use valgrind client requests for better checking
      5b67d2b955a3 tests: Better handling of valgrind errors saving blobs
      e2556aaeb506 tests: Remove unused #define
      fb9c6abddaa8 Use size_t for blob lengths in utilfdt_read*
      0112fda03bf6 libfdt: Add fdt_header_size()
      6473a21d8bfe Consolidate utilfdt_read_len() variants
      d5db5382c5e5 libfdt: Safer access to memory reservations
      719d582e98ec libfdt: Propagate name errors in fdt_getprop_by_offset()
      70166d62a27f libfdt: Safer access to strings section
      eb890c0f77dc libfdt: Make fdt_check_header() more thorough
      899d6fad93f3 libfdt: Improve sequential write state checking
      04b5b4062ccd libfdt: Clean up header checking functions
      44d3efedc816 Preserve datatype information when parsing dts
      f0be81bd8de0 Make Property a subclass of bytearray
      24b1f3f064d4 pylibfdt: Add a method to access the device tree directly
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      f858927f
  29. Sep 19, 2018
  30. Aug 22, 2018
  31. May 15, 2018
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc · 50aafd60
      Rob Herring authored
      
      This adds the following commits from upstream:
      
      84e414b0b5bc tests: Add a test case for the omit-if-no-ref keyword
      4038fd90056e dtc: add ability to make nodes conditional on them being referenced
      e1f139ea4900 checks: drop warning for missing PCI bridge bus-range
      f4eba68d89ee checks: Print duplicate node name instead of parent name
      46df1fb1b211 .travis.yml: Run valgrind checks via Travis
      14a3002a1aee tests: Update valgrind suppressions for sw_tree1
      02c5fe9debc0 tests: Remove valgrind error from tests/get_path
      df536831d02c checks: add graph binding checks
      2347c96edcbe checks: add a check for duplicate unit-addresses of child nodes
      8f1b35f88395 Correct overlay syntactic sugar for generating target-path fragments
      afbddcd418fb Suppress warnings on overlay fragments
      119e27300359 Improve tests for dtc overlay generation
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      50aafd60
  32. Apr 24, 2018
    • Rob Herring's avatar
      dtc: checks: drop warning for missing PCI bridge bus-range · 970f04c8
      Rob Herring authored
      
      Cherry-picked from dtc upstream commit e1f139ea4900fd0324c646822b4061fec6e08321.
      
      Having a 'bus-range' property for PCI bridges should not be required,
      so remove the warning when missing. There was some confusion with the
      Linux kernel printing a message that no property is present and the OS
      assigned the bus number. This message was intended to be informational
      rather than a warning.
      
      When the firmware doesn't enumerate the PCI bus and leaves it up to the
      OS to do, then it is perfectly fine for the OS to assign bus numbers
      and bus-range is not necessary.
      
      There are a few cases where bus-range is needed or useful as Arnd
      Bergmann summarized:
      
      - Traditionally Linux avoided using multiple PCI domains, but instead
        configured separate PCI host bridges to have non-overlapping
        bus ranges so we can present them to user space as a single
        domain, and run the kernel without CONFIG_PCI_DOMAINS.
        Specifying the bus ranges this way would and give stable bus
        numbers across boots when the probe order is not fixed.
      
      - On certain ARM64 systems, we must only use the first
        128 bus numbers based on the way the IOMMU identifies
        the device with truncated bus/dev/fn number. There are probably
        others like this, with various limitations.
      
      - To leave some room for hotplugged devices, each slot on
        a host bridge can in theory get a range of bus numbers
        that are available when assigning bus numbers at boot time
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      970f04c8
  33. Apr 07, 2018
  34. Apr 06, 2018
Loading