1. 21 Jan, 2019 1 commit
  2. 17 Jan, 2019 1 commit
  3. 16 Jan, 2019 1 commit
  4. 13 Jan, 2019 1 commit
  5. 07 Jan, 2019 1 commit
  6. 06 Jan, 2019 4 commits
  7. 23 Dec, 2018 1 commit
  8. 19 Dec, 2018 2 commits
  9. 16 Dec, 2018 5 commits
  10. 13 Dec, 2018 1 commit
    • 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>
  11. 09 Dec, 2018 1 commit
  12. 08 Dec, 2018 1 commit
  13. 02 Dec, 2018 1 commit
  14. 01 Dec, 2018 7 commits
    • Masahiro Yamada's avatar
      kbuild: let fixdep directly write to .*.cmd files · 392885ee
      Masahiro Yamada authored
      Currently, fixdep writes dependencies to .*.tmp, which is renamed to
      .*.cmd after everything succeeds. This is a very safe way to avoid
      corrupted .*.cmd files. The if_changed_dep has carried this safety
      mechanism since it was added in 2002.
      If fixdep fails for some reasons or a user terminates the build while
      fixdep is running, the incomplete output from the fixdep could be
      This is my insight about some bad scenarios:
      [1] If the compiler succeeds to generate *.o file, but fixdep fails
          to write necessary dependencies to .*.cmd file, Make will miss
          to rebuild the object when headers or CONFIG options are changed.
          In this case, fixdep should not generate .*.cmd file at all so
          that 'arg-check' will surely trigger the rebuild of the object.
      [2] A partially constructed .*.cmd file may not be a syntactically
          correct makefile. The next time Make runs, it would include it,
          then fail to parse it. Once this happens, 'make clean' is be the
          only way to fix it.
      In fact, [1] is no longer a problem since commit 9c2af1c7 ("kbuild:
      add .DELETE_ON_ERROR special target"). Make deletes a target file on
      any failure in its recipe. Because fixdep is a part of the recipe of
      *.o target, if it fails, the *.o is deleted anyway. However, I am a
      bit worried about the slight possibility of [2].
      So, here is a solution. Let fixdep directly write to a .*.cmd file,
      but allow makefiles to include it only when its corresponding target
      This effectively reverts commit 2982c953 ("kbuild: remove redundant
      $(wildcard ...) for cmd_files calculation"), and commit 00d78ab2
      ("kbuild: remove dead code in cmd_files calculation in top Makefile")
      because now we must check the presence of targets.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    • Masahiro Yamada's avatar
      kbuild: descend into scripts/gcc-plugins/ via scripts/Makefile · ce2fd53a
      Masahiro Yamada authored
      Now that 'archprepare' depends on 'scripts', Kbuild can descend into
      scripts/gcc-plugins in a more standard way.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    • Masahiro Yamada's avatar
      kbuild: make 'archprepare' depend on 'scripts' · 059bc9fc
      Masahiro Yamada authored
      Before start descending, Kbuild needs to run 'prepare' and 'scripts',
      which has been orthogonal to each other.
      Going forward, let's consider 'scripts' is a part of the preparation.
      This will allow more cleanups.
      Move 'scripts' to the prerequisite of 'archprepare', where UML starts
      compiling target *.c files.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    • Masahiro Yamada's avatar
      kbuild: move modpost out of 'scripts' target · 60df1aee
      Masahiro Yamada authored
      I am eagar to build under the scripts/ directory only with $(HOSTCC),
      but scripts/mod/ highly depends on the $(CC) and target arch headers.
      That it why the 'scripts' target must depend on 'asm-generic',
      'gcc-plugins', and $(autoksyms_h).
      Move it to the 'prepare0' stage. I know this is a cheesy workaround,
      but better than the current situation.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    • Masahiro Yamada's avatar
      kbuild: fix UML build error with CONFIG_GCC_PLUGINS · 65bba042
      Masahiro Yamada authored
      UML fails to build with CONFIG_GCC_PLUGINS=y.
      $ make -s ARCH=um mrproper
      $ make -s ARCH=um allmodconfig
      $ make ARCH=um
        UPD     include/generated/uapi/linux/version.h
        WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
        WRAP    arch/x86/include/generated/uapi/asm/poll.h
        WRAP    arch/x86/include/generated/asm/dma-contiguous.h
        WRAP    arch/x86/include/generated/asm/early_ioremap.h
        WRAP    arch/x86/include/generated/asm/export.h
        WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
        WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
        SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
        SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
        SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
        SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
        SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
        SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
        SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
        HOSTCC  scripts/unifdef
        CC      arch/x86/um/user-offsets.s
      cc1: error: cannot load plugin ./scripts/gcc-plugins/cyc_complexity_plugin.so
      ./scripts/gcc-plugins/cyc_complexity_plugin.so: cannot open shared object file: No such file or directory
      cc1: error: cannot load plugin ./scripts/gcc-plugins/structleak_plugin.so
      ./scripts/gcc-plugins/structleak_plugin.so: cannot open shared object file: No such file or directory
      cc1: error: cannot load plugin ./scripts/gcc-plugins/latent_entropy_plugin.so
      ./scripts/gcc-plugins/latent_entropy_plugin.so: cannot open shared object file: No such file or directory
      cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so
      ./scripts/gcc-plugins/randomize_layout_plugin.so: cannot open shared object file: No such file or directory
      make[1]: *** [scripts/Makefile.build;119: arch/x86/um/user-offsets.s] Error 1
      make: *** [arch/um/Makefile;152: arch/x86/um/user-offsets.s] Error 2
      Reorder the preparation stage (with cleanups) to make sure gcc-plugins
      is built before descending to arch/x86/um/.
      Fixes: 6b90bd4b
       ("GCC plugin infrastructure")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    • Masahiro Yamada's avatar
      kbuild: fix single target build for external module · e07db28e
      Masahiro Yamada authored
      Building a single target in an external module fails due to missing
      .tmp_versions directory.
      For example,
        $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o
      will fail in the following way:
        CC [M]  /home/masahiro/foo/foo.o
      /bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent
      This is because $(cmd_crmodverdir) is executed only before building
      /, %/, %.ko single targets of external modules. Create .tmp_versions
      in the 'prepare' target.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    • Masahiro Yamada's avatar
      kbuild: announce removal of SUBDIRS if used · 0126be38
      Masahiro Yamada authored
      SUBDIRS has been kept as a backward compatibility since
      commit ("[PATCH] kbuild: external module support") in 2002.
      We do not need multiple ways to do the same thing, so I will remove
      SUBDIRS after the Linux 5.3 release. I cleaned up in-tree code, and
      updated the document so that nobody would try to use it.
      Meanwhile, display the following warning if SUBDIRS is used.
      Makefile:189: ================= WARNING ================
      Makefile:190: 'SUBDIRS' will be removed after Linux 5.3
      Makefile:191: Please use 'M=' or 'KBUILD_EXTMOD' instead
      Makefile:192: ==========================================
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: Boris Brezillon <boris.brezillon@bootlin.com> # for scx200_docflash.c
      Acked-by: Guenter Roeck <linux@roeck-us.net> # for scx200_wdt.c
  15. 25 Nov, 2018 1 commit
  16. 18 Nov, 2018 1 commit
  17. 13 Nov, 2018 3 commits
  18. 11 Nov, 2018 1 commit
  19. 04 Nov, 2018 1 commit
  20. 02 Nov, 2018 2 commits
  21. 22 Oct, 2018 1 commit
  22. 19 Oct, 2018 2 commits