Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Apr 11, 2018
    • Miguel Ojeda's avatar
      clang-format: add configuration file · d4ef8d3f
      Miguel Ojeda authored
      clang-format is a tool to format C/C++/...  code according to a set of
      rules and heuristics.  Like most tools, it is not perfect nor covers
      every single case, but it is good enough to be helpful.
      
      In particular, it is useful for quickly re-formatting blocks of code
      automatically, for reviewing full files in order to spot coding style
      mistakes, typos and possible improvements.  It is also handy for sorting
      ``#includes``, for aligning variables and macros, for reflowing text and
      other similar tasks.  It also serves as a teaching tool/guide for
      newcomers.
      
      The tool itself has been already included in the repositories of popular
      Linux distributions for a long time.  The rules in this file are
      intended for clang-format >= 4, which is easily available in most
      distributions.
      
      This commit adds the configuration file that contains the rules that the
      tool uses to know how to format the code according to the kernel coding
      style.  This gives us several advantages:
      
        * clang-forma...
      d4ef8d3f
  2. Apr 07, 2018
  3. Mar 25, 2018
  4. Feb 14, 2018
  5. Dec 12, 2017
    • Paolo Pisati's avatar
      scripts/package: snap-pkg target · 5704d455
      Paolo Pisati authored
      Following in footsteps of other targets like 'deb-pkg, 'rpm-pkg' and 'tar-pkg',
      this patch adds a 'snap-pkg' target for the creation of a Linux kernel snap
      package using the kbuild infrastructure.
      
      A snap, in its general form, is a self contained, sandboxed, universal package
      and it is intended to work across multiple distributions and/or devices. A snap
      package is distributed as a single compressed squashfs filesystem.
      
      A kernel snap is a snap package carrying the Linux kernel, kernel modules,
      accessory files (DTBs, System.map, etc) and a manifesto file.  The purpose of a
      kernel snap is to carry the Linux kernel during the creation of a system image,
      eg. Ubuntu Core, and its subsequent upgrades.
      
      For more information on snap packages: https://snapcraft.io/docs/
      
      
      
      Signed-off-by: default avatarPaolo Pisati <paolo.pisati@canonical.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      5704d455
  6. Nov 14, 2017
  7. Nov 08, 2017
  8. Apr 24, 2017
  9. Jul 22, 2016
    • Luis R. Rodriguez's avatar
      scripts: add Linux .cocciconfig for coccinelle · dd951fc1
      Luis R. Rodriguez authored
      Coccinelle supports reading .cocciconfig, the order of precedence for
      variables for .cocciconfig is as follows:
      
       o Your current user's home directory is processed first
       o Your directory from which spatch is called is processed next
       o The directory provided with the --dir option is processed last, if used
      
      Since coccicheck runs through make, it naturally runs from the kernel
      proper dir, as such the second rule above would be implied for picking up a
      .cocciconfig when using 'make coccicheck'.
      
      'make coccicheck' also supports using M= targets.If you do not supply
      any M= target, it is assumed you want to target the entire kernel.
      The kernel coccicheck script has:
      
          if [ "$KBUILD_EXTMOD" = "" ] ; then
              OPTIONS="--dir $srctree $COCCIINCLUDE"
          else
              OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE"
          fi
      
      KBUILD_EXTMOD is set when an explicit target with M= is used. For both cases
      the spatch --dir argument is used, as such third rule applies when
      ...
      dd951fc1
  10. Jun 07, 2016
    • Emese Revfy's avatar
      GCC plugin infrastructure · 6b90bd4b
      Emese Revfy authored
      This patch allows to build the whole kernel with GCC plugins. It was ported from
      grsecurity/PaX. The infrastructure supports building out-of-tree modules and
      building in a separate directory. Cross-compilation is supported too.
      Currently the x86, arm, arm64 and uml architectures enable plugins.
      
      The directory of the gcc plugins is scripts/gcc-plugins. You can use a file or a directory
      there. The plugins compile with these options:
       * -fno-rtti: gcc is compiled with this option so the plugins must use it too
       * -fno-exceptions: this is inherited from gcc too
       * -fasynchronous-unwind-tables: this is inherited from gcc too
       * -ggdb: it is useful for debugging a plugin (better backtrace on internal
          errors)
       * -Wno-narrowing: to suppress warnings from gcc headers (ipa-utils.h)
       * -Wno-unused-variable: to suppress warnings from gcc headers (gcc_version
          variable, plugin-version.h)
      
      The infrastructure introduces a new Makefile target called gcc-plugins. It
      supports all gcc versio...
      6b90bd4b
  11. Apr 28, 2016
  12. Aug 28, 2015
  13. Aug 07, 2015
    • David Woodhouse's avatar
      modsign: Use single PEM file for autogenerated key · fb117949
      David Woodhouse authored
      
      The current rule for generating signing_key.priv and signing_key.x509 is
      a classic example of a bad rule which has a tendency to break parallel
      make. When invoked to create *either* target, it generates the other
      target as a side-effect that make didn't predict.
      
      So let's switch to using a single file signing_key.pem which contains
      both key and certificate. That matches what we do in the case of an
      external key specified by CONFIG_MODULE_SIG_KEY anyway, so it's also
      slightly cleaner.
      
      Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      fb117949
  14. Jun 15, 2015
  15. Apr 17, 2015
  16. Feb 17, 2015
  17. Feb 12, 2015
  18. Nov 27, 2014
  19. Nov 25, 2014
  20. Oct 26, 2014
  21. Jul 30, 2014
    • Andi Kleen's avatar
      kbuild: Support split debug info v4 · 866ced95
      Andi Kleen authored
      This is an alternative approach to lower the overhead of debug info
      (as we discussed a few days ago)
      
      gcc 4.7+ and newer binutils have a new "split debug info" debug info
      model where the debug info is only written once into central ".dwo" files.
      
      This avoids having to copy it around multiple times, from the object
      files to the final executable. It lowers the disk space
      requirements. In addition it defaults to compressed debug data.
      
      More details here: http://gcc.gnu.org/wiki/DebugFission
      
      This patch adds a new option to enable it. It has to be an option,
      because it'll undoubtedly break everyone's debuginfo packaging scheme.
      gdb/objdump/etc. all still work, if you have new enough versions.
      
      I don't see big compile wins (maybe a second or two faster or so), but the
      object dirs with debuginfo get significantly smaller. My standard kernel
      config (slightly bigger than defconfig) shrinks from 2.9G disk space
      to 1.1G objdir (with non reduced debuginfo). I presume if you are IO limited
      the compile time difference will be larger.
      
      Only problem I've seen so far is that it doesn't play well with older
      versions of ccache (apparently fixed, see
      https://bugzilla.samba.org/show_bug.cgi?id=10005
      
      )
      
      v2: various fixes from Dirk Gouders. Improve commit message slightly.
      v3: Fix clean rules and improve Kconfig slightly
      v4: Fix merge error in last version (Sam Ravnborg)
          Clarify description that it mainly helps disk size.
      Cc: Dirk Gouders <dirk@gouders.net>
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      866ced95
  22. Apr 16, 2014
  23. Feb 10, 2014
  24. Jul 31, 2013
  25. Dec 17, 2012
  26. Oct 19, 2012
  27. Oct 10, 2012
  28. Jul 01, 2011
  29. Apr 28, 2011
    • Sam Ravnborg's avatar
      kbuild: asm-generic support · d8ecc5cd
      Sam Ravnborg authored
      There is an increasing amount of header files
      shared between individual architectures in asm-generic.
      To avoid a lot of dummy wrapper files that just
      include the corresponding file in asm-generic provide
      some basic support in kbuild for this.
      
      With the following patch an architecture can maintain
      a list of files in the file arch/$(ARCH)/include/asm/Kbuild
      
      To use a generic file just add:
      
              generic-y += <name-of-header-file.h>
      
      For each file listed kbuild will generate the necessary
      wrapper in arch/$(ARCH)/include/generated/asm.
      
      When installing userspace headers a wrapper is likewise created.
      
      The original inspiration for this came from the unicore32
      patchset - although a different method is used.
      
      The patch includes several improvements from Arnd Bergmann.
      Michael Marek contributed Makefile.asm-generic.
      
      Remis Baima did an intial implementation along to achive
      the same - see https://patchwork.kernel.org/patch/13352/
      
      
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-...
      d8ecc5cd
  30. Feb 22, 2011
  31. Mar 23, 2010
  32. Mar 12, 2010
  33. Mar 06, 2010
  34. Jan 11, 2010
  35. Dec 12, 2009