1. 15 May, 2018 1 commit
    • 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
  2. 24 Apr, 2018 1 commit
    • 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
  3. 07 Apr, 2018 3 commits
  4. 06 Apr, 2018 1 commit
  5. 06 Mar, 2018 2 commits
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 · 9130ba88
      Rob Herring authored
      This adds the following commits from upstream:
      
      aadd0b65c987 checks: centralize printing of property names in failure messages
      88960e398907 checks: centralize printing of node path in check_msg
      f1879e1a50eb Add limited read-only support for older (V2 and V3) device tree to libfdt.
      37dea76e9700 srcpos: drop special handling of tab
      65893da4aee0 libfdt: overlay: Add missing license
      962a45ca034d Avoid installing pylibfdt when dependencies are missing
      cd6ea1b2bea6 Makefile: Split INSTALL out into INSTALL_{PROGRAM,LIB,DATA,SCRIPT}
      51b3a16338df Makefile.tests: Add LIBDL make(1) variable for portability sake
      333d533a8f4d Attempt to auto-detect stat(1) being used if not given proper invocation
      e54388015af1 dtc: Bump version to v1.4.6
      a1fe86f380cb fdtoverlay: Switch from using alloca to malloc
      c8d5472de3ff tests: Improve compatibility with other platforms
      c81d389a10cc checks: add chosen node checks
      e671852042a7 checks: add aliases node checks
      d0c44ebe3f42 checks: check for #{size,address}-cells without child nodes
      18a3d84bb802 checks: add string list check for *-names properties
      8fe94fd6f19f checks: add string list check
      6c5730819604 checks: add a string check for 'label' property
      a384191eba09 checks: fix sound-dai phandle with arg property check
      b260c4f610c0 Fix ambiguous grammar for devicetree rule
      fe667e382bac tests: Add some basic tests for the pci_bridge checks
      7975f6422260 Fix widespread incorrect use of strneq(), replace with new strprefixeq()
      fca296445eab Add strstarts() helper function
      cc392f089007 tests: Check non-matching cases for fdt_node_check_compatible()
      bba26a5291c8 livetree: avoid assertion of orphan phandles with overlays
      c8f8194d76cc implement strnlen for systems that need it
      c8b38f65fdec libfdt: Remove leading underscores from identifiers
      3b62fdaebfe5 Remove leading underscores from identifiers
      2d45d1c5c65e Replace FDT_VERSION() with stringify()
      2e6fe5a107b5 Fix some errors in comments
      b0ae9e4b0ceb tests: Correct warning in sw_tree1.c
      
      Commit c8b38f65fdec upstream ("libfdt: Remove leading underscores from
      identifiers") changed the multiple inclusion define protection, so the
      kernel's libfdt_env.h needs the corresponding update.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      9130ba88
    • Rob Herring's avatar
      scripts/dtc: generate lexer and parser during build instead of shipping · e039139b
      Rob Herring authored
      Now that the kernel build supports flex and bison, remove the _shipped
      files and generate them during the build instead.
      
      Based on Masahiro's original patch.
      Reviewed-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      e039139b
  6. 02 Nov, 2017 1 commit
    • Greg Kroah-Hartman's avatar
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman authored
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: default avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  7. 25 Oct, 2017 1 commit
  8. 03 Oct, 2017 2 commits
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110 · 4201d057
      Rob Herring authored
      This adds the following commits from upstream:
      
      b1a60033c110 tests: Add a test for overlays syntactic sugar
      737b2df39cc8 overlay: Add syntactic sugar version of overlays
      497432fd2131 checks: Use proper format modifier for size_t
      22a65c5331c2 dtc: Bump version to v1.4.5
      c575d8059fff Add fdtoverlay to .gitignore
      b6a6f9490d19 fdtoverlay: Sanity check blob size
      8c1eb1526d2d pylibfdt: Use Python2 explicitly
      ee3d26f6960b checks: add interrupts property check
      c1e7738988f5 checks: add gpio binding properties check
      b3bbac02d5e3 checks: add phandle with arg property checks
      fe50bd1ecc1d fdtget: Split out cell list display into a new function
      62d812308d11 README: Add a note about test_tree1.dts
      5bed86aee9e8 pylibfdt: Add support for fdt_subnode_offset()
      46f31b65b3b3 pylibfdt: Add support for fdt_node_offset_by_phandle()
      a3ae43723687 pylibfdt: Add support for fdt_parent_offset()
      a198af80344c pylibfdt: Add support for fdt_get_phandle()
      b9eba92ea50f tests: Return a failure code when any tests fail
      155faf6cc209 pylibfdt: Use local pylibfdt module
      50e5cd07f325 pylibfdt: Add a test for use of uint32_t
      ab78860f09f5 pylibfdt: Add stdint include to fix uint32_t
      36f511fb1113 tests: Add stacked overlay tests on fdtoverlay
      1bb00655d3e5 fdt: Allow stacked overlays phandle references
      a33c2247ac8d Introduce fdt_setprop_placeholder() method
      0016f8c2aa32 dtc: change default phandles to ePAPR style instead of both
      e3b9a9588a35 tests: fdtoverlay unit test
      42409146f2db fdtoverlay: A tool that applies overlays
      aae22722fc8d manual: Document missing options
      13ce6e1c2fc4 dtc: fix sprintf() format string error, again
      d990b8013889 Makefile: Fix build on MSYS2 and Cygwin
      51f56dedf8ea Clean up shared library compile/link options
      21a2bc896e3d Suppress expected error message in fdtdump test
      2a42b14d0d03 dtc: check.c fix compile error
      a10cb3c818d3 Fix get_node_by_path string equality check
      548aea2c436a fdtdump: Discourage use of fdtdump
      c2258841a785 fdtdump: Fix over-zealous version check
      9067ee4be0e6 Fix a few whitespace and style nits
      e56f2b07be38 pylibfdt: Use setup.py to build the swig file
      896f1c133265 pylibfdt: Use Makefile constructs to implement NO_PYTHON
      90db6d9989ca pylibfdt: Allow setup.py to operate stand-alone
      e20d9658cd8f Add Coverity Scan support
      b04a2cf08862 pylibfdt: Fix code style in setup.py
      1c5170d3a466 pylibfdt: Rename libfdt.swig to libfdt.i
      580a9f6c2880 Add a libfdt function to write a property placeholder
      ab15256d8d02 pylibfdt: Use the call function to simplify the Makefile
      9f2e3a3a1f19 pylibfdt: Use the correct libfdt version in the module
      e91c652af215 pylibfdt: Enable installation of Python module
      8a892fd85d94 pylibfdt: Allow building to be disabled
      741cdff85d3e .travis.yml: Add builds with and without Python library prerequisites
      14c4171f4f9a pylibfdt: Use package_dir to set the package directory
      89a5062ab231 pylibfdt: Use environment to pass C flags and files
      4e0e0d049757 pylibfdt: Allow pkg-config to be supplied in the environment
      6afd7d9688f5 Correct typo: s/pylibgfdt/pylibfdt/
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      4201d057
    • Rob Herring's avatar
      scripts/dtc: add fdt_overlay.c and fdt_addresses.c to sync script · 43223230
      Rob Herring authored
      libfdt has gained some new files. We need to include them in the
      kernel's copy.
      Reported-by: default avatarKyle Yan <kyan@codeaurora.org>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      43223230
  9. 20 Sep, 2017 1 commit
    • Frank Rowand's avatar
      scripts/dtc: dtx_diff - 2nd update of include dts paths to match build · 35f3c984
      Frank Rowand authored
      Update dtx_diff include paths in the same manner as:
      commit b12869a8 ("of: remove drivers/of/testcase-data from
      include search path for CPP"), commit 5ffa2aed ("of: remove
      arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
      commit 50f9ddaf ("of: search scripts/dtc/include-prefixes path
      for both CPP and DTC").
      
      Remove proposed include path kernel/dts/, which was never implemented
      for the dtb build.
      
      For the diff case, each source file is compiled separately.  For
      each of those compiles, provide the location of the source file
      as an include path, not the location of both source files.
      Signed-off-by: default avatarFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      35f3c984
  10. 31 Aug, 2017 1 commit
    • Russell King's avatar
      scripts/dtc: fix '%zx' warning · e6618692
      Russell King authored
      dtc uses an incorrect format specifier for printing a uint64_t value.
      uint64_t may be either 'unsigned long' or 'unsigned long long' depending
      on the host architecture.
      
      Fix this by using %llx and casting to unsigned long long, which ensures
      that we always have a wide enough variable to print 64 bits of hex.
      
          HOSTCC  scripts/dtc/checks.o
        scripts/dtc/checks.c: In function 'check_simple_bus_reg':
        scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]
          snprintf(unit_addr, sizeof(unit_addr), "%zx", reg);
          ^
        scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]
      
      Link: http://lkml.kernel.org/r/20170829222034.GJ20805@n2100.armlinux.org.uk
      Fixes: 828d4cdd ("dtc: check.c fix compile error")
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e6618692
  11. 20 Jul, 2017 1 commit
  12. 22 Jun, 2017 1 commit
    • Geert Uytterhoeven's avatar
      scripts/dtc: dtx_diff - Show real file names in diff header · 7782b144
      Geert Uytterhoeven authored
      As the comparison uses process substitution to pass files after
      conversion to DTS format, the diff header doesn't show the real
      filenames, but the names of the file descriptors used:
      
          --- /dev/fd/63  2017-06-22 11:21:47.531637188 +0200
          +++ /dev/fd/62  2017-06-22 11:21:47.531637188 +0200
      
      This is especially annoying when comparing a bunch of DT files in a
      loop, as the output doesn't show a clue about which files it refers to.
      
      Fix this by explicitly passing the original file names to the diff
      command using the --label option, giving e.g.:
      
          --- arch/arm/boot/dts/r8a7791-koelsch.dtb
          +++ arch/arm/boot/dts/r8a7791-porter.dtb
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      7782b144
  13. 19 May, 2017 1 commit
    • Olof Johansson's avatar
      devicetree: Move include prefixes from arch to separate directory · d5d332d3
      Olof Johansson authored
      We use a directory under arch/$ARCH/boot/dts as an include path
      that has links outside of the subtree to find dt-bindings from under
      include/dt-bindings. That's been working well, but new DT architectures
      haven't been adding them by default.
      
      Recently there's been a desire to share some of the DT material between
      arm and arm64, which originally caused developers to create symlinks or
      relative includes between the subtrees. This isn't ideal -- it breaks
      if the DT files aren't stored in the exact same hierarchy as the kernel
      tree, and generally it's just icky.
      
      As a somewhat cleaner solution we decided to add a $ARCH/ prefix link
      once, and allow DTS files to reference dtsi (and dts) files in other
      architectures that way.
      
      Original approach was to create these links under each architecture,
      but it lead to the problem of recursive symlinks.
      
      As a remedy, move the include link directories out of the architecture
      trees into a common location. At the same time, they can now share one
      directory and one dt-bindings/ link as well.
      
      Fixes: 4027494a ('ARM: dts: add arm/arm64 include symlinks')
      Reported-by: default avatarRussell King <linux@armlinux.org.uk>
      Reported-by: default avatarOmar Sandoval <osandov@osandov.com>
      Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Reviewed-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: linux-arch <linux-arch@vger.kernel.org>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      d5d332d3
  14. 17 May, 2017 1 commit
    • Shuah Khan's avatar
      dtc: check.c fix compile error · 828d4cdd
      Shuah Khan authored
      Fix the following compile error found on odroid-xu4:
      
      checks.c: In function ‘check_simple_bus_reg’:
      checks.c:876:41: error: format ‘%lx’ expects argument of type
      ‘long unsigned int’, but argument 4 has type
      ‘uint64_t{aka long long unsigned int}’ [-Werror=format=]
        snprintf(unit_addr, sizeof(unit_addr), "%lx", reg);
                                               ^
      checks.c:876:41: error: format ‘%lx’ expects argument of type
      ‘long unsigned int’, but argument 4 has type
      ‘uint64_t {aka long long unsigned int}’ [-Werror=format=]
      cc1: all warnings being treated as errors
      Makefile:304: recipe for target 'checks.o' failed
      make: *** [checks.o] Error 1
      Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
      [dwg: Correct new format to be correct in general]
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      [robh: cherry-picked from upstream dtc commit 2a42b14d0d03]
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      828d4cdd
  15. 14 May, 2017 1 commit
    • Kamil Rytarowski's avatar
      scripts: Switch to more portable Perl shebang · cb77f0d6
      Kamil Rytarowski authored
      The default NetBSD package manager is pkgsrc and it installs Perl
      along other third party programs under custom and configurable prefix.
      The default prefix for binary prebuilt packages is /usr/pkg, and the
      Perl executable lands in /usr/pkg/bin/perl.
      
      This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
      the most portable solution that should work for almost everybody.
      Perl's executable is detected automatically.
      
      This change switches -w option passed to the executable with more
      modern "use warnings;" approach. There is no functional change to the
      default behavior.
      
      While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).
      Signed-off-by: default avatarKamil Rytarowski <n54@gmx.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      cb77f0d6
  16. 29 Mar, 2017 1 commit
  17. 22 Mar, 2017 2 commits
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6 · 89d12310
      Rob Herring authored
      This adds the following commits from upstream:
      
      756ffc4f52f6 Build pylibfdt as part of the normal build process
      8cb3896358e9 Adjust libfdt.h to work with swig
      b40aa8359aff Mention pylibfdt in the documentation
      12cfb740cc76 Add tests for pylibfdt
      50f250701631 Add an initial Python library for libfdt
      cdbb2b6c7a3a checks: Warn on node name unit-addresses with '0x' or leading 0s
      4c15d5da17cc checks: Add bus checks for simple-bus buses
      33c3985226d3 checks: Add bus checks for PCI buses
      558cd81bdd43 dtc: Bump version to v1.4.4
      c17a811c62eb fdtput: Remove star from value_len documentation
      194d5caaefcb fdtget: Use @return to document the return value
      d922ecdd017b tests: Make realloc_fdt() really allocate *fdt
      921cc17fec29 libfdt: overlay: Check the value of the right variable
      9ffdf60bf463 dtc: Simplify asm_emit_string() implementation
      881012e44386 libfdt: Change names of sparse helper macros
      bad5b28049e5 Fix assorted sparse warnings
      672ac09ea04d Clean up gcc attributes
      49300f2ade6a dtc: Don't abuse struct fdt_reserve_entry
      fa8bc7f928ac dtc: Bump version to v1.4.3
      34a9886a177f Add printf format attributes
      f72508e2b6ca Correct some broken printf() like format mismatches
      397d5ef0203c libfdt: Add fdt_setprop_empty()
      69a1bd6ad3f9 libfdt: Remove undefined behaviour setting empty properties
      acd1b534a592 Print output filename as part of warning messages
      120775eb1cf3 dtc: Use streq() in preference to strcmp()
      852e9ecbe197 checks: Add Warning for stricter node name character checking
      ef0e8f061534 checks: Add Warning for stricter property name character checking
      00d7bb1f4b0e dtc: pos parameter to srcpos_string() can't be NULL
      95d57726bca4 livetree.c: Fix memory leak
      3b9c97093d6e dtc: Fix NULL pointer use in dtlabel + dtref case
      43eb551426ea manual: Fix typo it -> in
      4baf15f7f13f Makefile: Add tags rule
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      89d12310
    • Rob Herring's avatar
      scripts/dtc: automate getting dtc version and log in update script · 86cef614
      Rob Herring authored
      Further automate the dtc update script to fill in the dtc version and
      commit log.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      86cef614
  18. 04 Jan, 2017 1 commit
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version 0931cea3ba20 · 6f05afcb
      Rob Herring authored
      Sync to upstream dtc commit 0931cea3ba20 ("dtc: fdtdump: check fdt if
      not in scanning mode"). In particular, this pulls in dtc overlay
      support.
      
      This adds the following commits from upstream:
      
      f88865469b65 dtc: Fix memory leak in character literal parsing
      00fbb8696b66 Rename boot_info
      1ef86ad2c24f dtc: Clean up /dts-v1/ and /plugin/ handling in grammar
      e3c769aa9c16 dtc: Don't always generate __symbols__ for plugins
      c96cb3c0169e tests: Don't use -@ on plugin de/recompile tests
      66381538ce24 tests: Remove "suppression of fixups" tests
      ba765b273f0f tests: Clarify dtc overlay tests
      6ea8cd944fcd tests: More thorough tests of libfdt overlay application without dtc
      7d8ef6e1db97 tests: Correct fdt handling of overlays without fixups and base trees without symbols
      b4dc0ed8b127 tests: Fix double expansion bugs in test code
      3ea879dc0c8f tests: Split overlay tests into those with do/don't exercise dtc plugin generation
      47b4d66a2f11 tests: Test auto-alias generation on base tree, not overlay
      72e1ad811523 tests: Make overlay/plugin tests unconditional
      e7b3c3b5951b tests: Add overlay tests
      9637e3f772a9 tests: Add check_path test
      20f29d8d41f6 dtc: Plugin and fixup support
      a2c92cac53f8 dtc: Document the dynamic plugin internals
      8f70ac39801d checks: Pass boot_info instead of root node
      ea10f953878f libfdt: add missing errors to fdt_strerror()
      daa75e8fa594 libfdt: fix fdt_stringlist_search()
      e28eff5b787a libfdt: fix fdt_stringlist_count()
      ae97c7722840 tests: overlay: Rename the device tree blobs to be more explicit
      96162d2bd9cb tests: overlay: Add test suffix to the compiled blobs
      5ce8634733b7 libfdt: Add fdt_overlay_apply to the exported symbols
      804a9db90ad2 fdt: strerr: Remove spurious BADOVERLAY
      e8c3a1a493fa tests: overlay: Move back the bad fixup tests
      7a72d89d3f81 libfdt: overlay: Fix symbols and fixups nodes condition
      cabbaa972cdd libfdt: overlay: Report a bad overlay for mismatching local fixups
      deb0a5c1aeaa libfdt: Add BADPHANDLE error string
      7b7a6be9ba15 libfdt: Don't use 'index' as a local variable name
      aea8860d831e tests: Add tests cases for the overlay code
      0cdd06c5135b libfdt: Add overlay application function
      39240cc865cf libfdt: Extend the reach of FDT_ERR_BADPHANDLE
      4aa3a6f5e6d9 libfdt: Add new errors for the overlay code
      6d1832c9e64b dtc: Remove "home page" link
      45fd440a9561 Fix some typing errors in libfdt.h and livetree.c
      a59be4939c13 Merge tag 'v1.4.2'
      a34bb721caca dtc: Fix assorted problems in the testcases for the -a option
      874f40588d3e Implement the -a option to pad dtb aligned
      ec02b34c05be dtc: Makefile improvements for release uploading
      1ed45d40a137 dtc: Bump version to 1.4.2
      36fd7331fb11 libfdt: simplify fdt_del_mem_rsv()
      d877364e4a0f libfdt: Add fdt_setprop_inplace_namelen_partial
      3e9037aaad44 libfdt: Add fdt_getprop_namelen_w
      84e0e1346c68 libfdt: Add max phandle retrieval function
      d29126c90acb libfdt: Add iterator over properties
      902d0f0953d0 libfdt: Add a subnodes iterator macro
      c539075ba8ba fdtput.c: Fix memory leak.
      f79ddb83e185 fdtget.c: Fix memory leak
      1074ee54b63f convert-dtsv0-lexer.l: fix memory leak
      e24d39a024e6 fdtdump.c: make sure size_t argument to memchr is always unsigned.
      44a59713cf05 Remove unused srcpos_dump() function
      cb9241ae3453 DTC: Fix memory leak on flatname.
      1ee0ae24ea09 Simplify check field and macro names
      9d97527a8621 Remove property check functions
      2e709d158e11 Remove tree check functions
      c4cb12e193e3 Alter grammar to allow multiple /dts-v1/ tags
      d71d25d76012 Use xasprintf() in srcpos
      9dc404958e9c util: Add xasprintf portable asprintf variant
      beef80b8b55f Correct a missing space in a fdt_header cast
      68d43cec1253 Correct line lengths in libfdt.h
      b0dbceafd49a Correct space-after-tab in libfdt.h
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      6f05afcb
  19. 22 Jul, 2016 1 commit
  20. 29 Mar, 2016 1 commit
    • Rob Herring's avatar
      scripts/dtc: Update to upstream version 53bf130b1cdd · b9937347
      Rob Herring authored
      Sync to upstream dtc commit 53bf130b1cdd ("libfdt: simplify
      fdt_node_check_compatible()"). This adds the following commits from
      upstream:
      
      53bf130 libfdt: simplify fdt_node_check_compatible()
      c9d9121 Warn on node name unit-address presence/absence mismatch
      2e53f9d Catch unsigned 32bit overflow when parsing flattened device tree offsets
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      b9937347
  21. 12 Feb, 2016 2 commits
    • Rob Herring's avatar
      scripts/dtc: Update to upstream commit b06e55c88b9b · 91feabc2
      Rob Herring authored
      Sync to upstream dtc commit b06e55c88b9b ("Prevent crash on modulo by
      zero"). This adds the following commits from upstream:
      
      b06e55c Prevent crash on modulo by zero
      b433450 Fix some bugs in processing of line directives
      d728ad5 Fix crash on nul character in string escape sequence
      1ab2205 Gracefully handle bad octal literals
      1937095 Prevent crash on division by zero
      d0b3ab0 libfdt: Fix undefined behaviour in fdt_offset_ptr()
      d4c7c25 libfdt: check for potential overrun in _fdt_splice()
      f58799b libfdt: Add some missing symbols to version.lds
      af9f26d Remove duplicated -Werror in dtc Makefile
      604e61e fdt: Add functions to retrieve strings
      8702bd1 fdt: Add a function to get the index of a string
      2218387 fdt: Add a function to count strings
      554fde2 libfdt: fix comment block of fdt_get_property_namelen()
      e5e6df7 fdtdump: Fix bug printing bytestrings with negative values
      067829e Remove redundant fdtdump test code
      897a429 Move fdt_path_offset alias tests to right tests section
      2d1417c Add simple .travis.yml
      f6dbc6c guess output file format
      5e78dff guess input file format based on file content or file name
      8b927bf tests: convert `echo -n` to `printf`
      64c46b0 Fix crash with poorly defined #size-cells
      
      Cc: Grant Likely <grant.likely@linaro.org>
      Tested-by: default avatarFrank Rowand <frank.rowand@sonymobile.com>
      Reviewed-by: default avatarFrank Rowand <frank.rowand@sonymobile.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      91feabc2
    • Frank Rowand's avatar
      scripts/dtc: dtx_diff - add info to error message · 60c7f4cb
      Frank Rowand authored
      If kernel config options are not properly set, "make scripts" will not
      compile dtc.  Update the unable to find dtc error message to check
      the kernel config and give better advice on how to create dtc.
      
      Reword another error message to increase clarity.
      Signed-off-by: default avatarFrank Rowand <frank.rowand@sonymobile.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      60c7f4cb
  22. 25 Jan, 2016 1 commit
  23. 29 Apr, 2015 2 commits
  24. 09 Jun, 2014 1 commit
  25. 21 Jan, 2014 3 commits
    • Grant Likely's avatar
      scripts/dtc: Add a script to update to mainline dtc source · c8a3e6a8
      Grant Likely authored
      A very simple script that automates pulling in a newer version of DTC.
      Not particularly robust, but a whole lot better than doing it by hand
      every time.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      c8a3e6a8
    • Grant Likely's avatar
      scripts/dtc: Update to upstream version v1.4.0 · 73ab39b1
      Grant Likely authored
      Update to the latest version of dtc with the following notable
      enhancements and bug fixes:
      
      * fdtput: expand fdt if value does not fit
      * dtc/fdt{get, put}/convert-dtsv0-lexer: convert to new usage helpers
      * libfdt: Add fdt_next_subnode() to permit easy subnode iteration
      * utilfdt_read: pass back up the length of data read
      * util_version: new helper for displaying version info
      * die: constify format string arg
      * utilfdt_read_err: use xmalloc funcs
      * Export fdt_stringlist_contains()
      * dtc: Drop the '-S is deprecated' warning
      * dtc/libfdt: sparse fixes
      * dtc/libfdt: introduce fdt types for annotation by endian checkers
      * Fix util_is_printable_string
      * dtc: srcpos_verror() should print to stderr
      * libfdt: Added missing functions to shared library
      
      Shipped bison/flex generated files were built on an Ubuntu 13.10 system.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      73ab39b1
    • Grant Likely's avatar
      scripts/dtc: Update shipped files to build with bison 2.7.12 · a878b910
      Grant Likely authored
      Preparation patch before updating to upstream dtc version 1.4.0. This
      change only contains the changes caused by a new version of bison
      on the shipped files. There are no functional changes.
      
      The shipped files were build on an Ubuntu 13.10 system
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      a878b910
  26. 13 Jun, 2013 2 commits
    • Grant Likely's avatar
      dtc: ensure #line directives don't consume data from the next line · 706b78f3
      Grant Likely authored
      Previously, the #line parsing regex ended with ({WS}+[0-9]+)?. The {WS}
      could match line-break characters. If the #line directive did not contain
      the optional flags field at the end, this could cause any integer data on
      the next line to be consumed as part of the #line directive parsing. This
      could cause syntax errors (i.e. #line parsing consuming the leading 0
      from a hex literal 0x1234, leaving x1234 to be parsed as cell data,
      which is a syntax error), or invalid compilation results (i.e. simply
      consuming literal 1234 as part of the #line processing, thus removing it
      from the cell data).
      
      Fix this by replacing {WS} with [ \t] so that it can't match line-breaks.
      
      Convert all instances of {WS}, even though the other instances should be
      irrelevant for any well-formed #line directive. This is done for
      consistency and ultimate safety.
      
      [Cherry picked from DTC commit a1ee6f068e1c8dbc62873645037a353d7852d5cc]
      Reported-by: default avatarIan Campbell <Ian.Campbell@citrix.com>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      706b78f3
    • Grant Likely's avatar
      dtc: Update generated files to output from Bison 2.5 · 2a6a08ca
      Grant Likely authored
      This patch merely updates the generated dtc parser and lexer files to
      the output generated by Bison 2.5. The previous versions were generated
      from version 2.4.1. The only reason for this commit is to minimize the
      diff on the next commit which fixes a bug in the DTC #line directive
      parsing. Otherwise the Bison changes would be intermingled with the
      functional changes.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      2a6a08ca
  27. 21 Nov, 2012 1 commit
  28. 17 Oct, 2012 1 commit
  29. 01 Oct, 2012 1 commit
  30. 24 Mar, 2012 1 commit
    • Felipe Balbi's avatar
      scripts: dtc: fix compile warnings · db7f4e3d
      Felipe Balbi authored
      Fix following compile warnings:
      
      scripts/dtc/flattree.c: In function ‘flat_read_mem_reserve’:
      scripts/dtc/flattree.c:700:14: warning: variable ‘p’ set but not used
      	[-Wunused-but-set-variable]
      
      scripts/dtc/dtc.c: In function ‘main’:
      scripts/dtc/dtc.c:104:17: warning: variable ‘check’ set but not used
      	[-Wunused-but-set-variable]
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      db7f4e3d