Skip to content
Snippets Groups Projects
  1. Aug 16, 2010
  2. Aug 10, 2010
  3. Aug 03, 2010
    • Sam Ravnborg's avatar
      kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line · 80c00ba9
      Sam Ravnborg authored
      
      It is now possible to assign options to AS and CC
      on the command line - which is only used for built-in code.
      
      {A,C}FLAGS_KERNEL was used both in the top-level Makefile
      in the arch makefiles, thus users had no way to specify
      additional options to AS, CC without overriding
      the original value.
      
      Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL
      that is used by arch specific files and free up
      {A,C}FLAGS_KERNEL so they can be assigned on
      the command line.
      
      All arch Makefiles that used the old variables has been updated.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      80c00ba9
    • Sam Ravnborg's avatar
      kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line · 6588169d
      Sam Ravnborg authored
      
      It is now possible to assign options to AS, CC and LD
      on the command line - which is only used when building modules.
      
      {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
      in the arch makefiles, thus users had no way to specify
      additional options to AS, CC, LD when building modules
      without overriding the original value.
      
      Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
      that is used by arch specific files and free up
      {A,C,LD}FLAGS_MODULE so they can be assigned on
      the command line.
      
      All arch Makefiles that used the old variables has been updated.
      
      Note: Previously we had a MODFLAGS variable for both
      AS and CC. But in favour of consistency this was dropped.
      So in some cases arch Makefile has one assignmnet replaced by
      two assignmnets.
      
      Note2: MODFLAGS was not documented and is dropped
      without any notice. I do not expect much/any breakage
      from this.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Chen Liqin <liqin.chen@sunplusct.com>
      Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
      Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      6588169d
  4. Aug 01, 2010
  5. Jul 22, 2010
  6. Jul 14, 2010
    • Andi Kleen's avatar
      Kbuild: Add option to set -femit-struct-debug-baseonly · d6f4ceb7
      Andi Kleen authored
      
      Newer gcc has a -femit-struct-debug-baseonly option that dramatically
      reduces the size of object files with debug info. What it does
      is to only emit type information for structures when the structures
      are defined in the same file or in a header file.
      
      This means the type information for most headers are not included.
      This is not good when the type information is actually
      needed (e.g. with kgdb or systemtap)
      
      But often kernel hackers only care about line numbers and don't
      need all the type information anyways. In this case setting
      the option can be a big win:
      
      A build dir for a specific x86-64 configuration with gcc 4.5
      shrunk from 2.3G to 1.2G. The compilation was also nearly a minute
      faster.
      
      Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
      [mmarek: reformatted help text]
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      d6f4ceb7
  7. Jul 12, 2010
  8. Jul 07, 2010
  9. Jul 05, 2010
  10. Jun 30, 2010
  11. Jun 29, 2010
  12. Jun 18, 2010
    • Michal Marek's avatar
      kbuild: Clean up and speed up the localversion logic · 09155120
      Michal Marek authored
      
      Now that we run scripts/setlocalversion during every build, it makes
      sense to move all the localversion logic there. This cleans up the
      toplevel Makefile and also makes sure that the script is called only
      once in 'make prepare' (previously, it would be called every time due to
      a variable expansion in an ifneq statement). No user-visible change is
      intended, unless one runs the setlocalversion script directly.
      
      Reported-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      09155120
  13. Jun 15, 2010
    • Andy Whitcroft's avatar
      kbuild: fix LOCALVERSION handling to match description · d5eda75f
      Andy Whitcroft authored
      
      In the commit below the version string handling was modified, adding
      a '+' where no other version information was supplied:
      
          commit 85a256d8
          Author: David Rientjes <rientjes@google.com>
          Date:   Wed Jan 13 13:01:05 2010 -0800
      
      From the commit the intent was as below:
      
           - when CONFIG_LOCALVERSION_AUTO is disabled, a `+' is appended if the
             repository has been revised beyond a tagged commit and LOCALVERSION=
             was not passed to "make".
      
      However if the user supplies an empty LOCALVERSION on the command line
      the plus suffix is still added.  This form is useful in the case where
      the build environment knows that the version as specified is correct and
      complete but does not correspond to a specific tag.
      
      This patch changes the implementation to match the documentation
      such that specifying LOCALVERSION= on the build line is sufficient
      to suppress any suffix.
      
      Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      d5eda75f
  14. Jun 12, 2010
  15. Jun 11, 2010
    • Nicolas Palix's avatar
      Add a target to use the Coccinelle checker · 74425eee
      Nicolas Palix authored
      
      A 'coccicheck' target is added. It can be called with four different
      modes. Each one generates a different kind of output, i.e. context,
      patch, org, report, according to the corresponding mode to be
      activated.
      
      The new target calls the 'coccicheck' front-end in the 'scripts'
      directory with the MODE argument. Every SmPL file in the
      subdirectories of 'scripts/coccinelle' is then given to the front-end
      and applied to the entire source tree.
      
      The four modes behave as follows:
      
      'report' generates a list in the following format:
        file:line:column-column: message
      
      'patch' proposes a fix, when possible.
      
      'context' highlights lines of interest and their context in a
      diff-like style. Lines of interest are indicated with '-'.
      
      'org' generates a report in the Org mode format of Emacs.
      
      Signed-off-by: default avatarNicolas Palix <npalix@diku.dk>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      74425eee
  16. Jun 09, 2010
  17. Jun 07, 2010
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Allow building perf source tarballs on non-configured tree · bafb6747
      Arnaldo Carvalho de Melo authored
      
      So that we don't require that the kernel be configured first, and as we
      don't use KERNELRELEASE at all in the -src-pkg targets, we need o add a
      new wildcard for targets ending in src-pkg:
      
      On a make mrproper'ed kernel we get this without this patch:
      
      [linux-2.6-tip]$ LANG= make perf-tarbz2-src-pkg
      /bin/sh: include/config/kernel.release: No such file or directory
      make: *** [include/config/kernel.release] Error 1
      [acme@emilia linux-2.6-tip]$
      
      Acked-by: default avatarMichal Marek <mmarek@suse.cz>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20100604173552.GA875@ghostprotocols.net>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bafb6747
  18. Jun 06, 2010
  19. Jun 05, 2010
    • Arnaldo Carvalho de Melo's avatar
      perf tools: Make target to generate self contained source tarball · 8e5564e6
      Arnaldo Carvalho de Melo authored
      
      Useful for when people want to try some version of the perf tools and don't
      wants to download the kernel tarball.
      
      Here is a session using this new target:
      
        [root@emilia linux-2.6-tip]# make help | grep -i perf
          perf-tar-src-pkg    - Build perf-2.6.35-rc1.tar source tarball
          perf-targz-src-pkg  - Build perf-2.6.35-rc1.tar.gz source tarball
          perf-tarbz2-src-pkg - Build perf-2.6.35-rc1.tar.bz2 source tarball
        [root@emilia linux-2.6-tip]# make perf-tarbz2-src-pkg
          TAR
        [root@emilia linux-2.6-tip]# ls -la perf-2.6.35-rc1.tar.bz2
        -rw-r--r-- 1 root root 295731 May 31 11:18 perf-2.6.35-rc1.tar.bz2
        [root@emilia linux-2.6-tip]# tar xf perf-2.6.35-rc1.tar.bz2
        [root@emilia linux-2.6-tip]# cd perf-2.6.35-rc1
        [root@emilia perf-2.6.35-rc1]# ls
        arch  HEAD  include  lib  tools
        [root@emilia perf-2.6.35-rc1]# cd tools/perf
        [root@emilia perf]# make -j9 2>&1 | tail
            CC arch/x86/util/dwarf-regs.o
            CC util/probe-finder.o
            CC util/newt.o
            CC util/scripting-engines/trace-event-perl.o
            CC scripts/perl/Perf-Trace-Util/Context.o
            CC perf.o
            CC builtin-help.o
            AR libperf.a
            LINK perf
        rm .perf.dev.null
        [root@emilia perf]# ./perf record -a sleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.262 MB perf.data (~11457 samples) ]
        [root@emilia perf]# ./perf report | head -12
        # Events: 6K cycles
        #
        # Overhead          Command       Shared Object  Symbol
        # ........  ...............  ..................  ......
        #
             4.73%             perf  [kernel.kallsyms]   [k] format_decode
             4.49%             perf  libc-2.12.so        [.] _IO_file_underflow_internal
             4.38%             init  [kernel.kallsyms]   [k] mwait_idle
             3.29%             perf  [kernel.kallsyms]   [k] vsnprintf
             2.38%             init  [kernel.kallsyms]   [k] sched_clock_local
             2.35%             init  [kernel.kallsyms]   [k] apic_timer_interrupt
             1.86%     sirq-timer/5  [kernel.kallsyms]   [k] find_busiest_group
        [root@emilia perf]#
      
      Acked-by: default avatarMichal Marek <mmarek@suse.cz>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20100528185357.GA28009@ghostprotocols.net>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8e5564e6
  20. Jun 03, 2010
    • Michal Marek's avatar
      Makefile: clarify a comment · c8447161
      Michal Marek authored
      
      os user <gnusercn@gmail.com> writes:
      From the last comment, arch makefile will override vmlinux. It seems
      vmlinux will not be checked by `make'. But from my test, although
      `all:' will be re-defined in arch Makefile (ARM arch), vmlinux will
      still be checked and the commands associated will be executed. Should
      we use another word instead of "overridden"?
      
      Reported-by: default avataros user <gnusercn@gmail.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      c8447161
  21. May 30, 2010
  22. May 16, 2010
  23. May 10, 2010
  24. May 06, 2010
  25. Apr 30, 2010
  26. Apr 19, 2010
  27. Apr 13, 2010
  28. Mar 30, 2010
  29. Mar 20, 2010
  30. Mar 10, 2010
  31. Mar 08, 2010
  32. Feb 24, 2010
  33. Feb 12, 2010
  34. Feb 06, 2010
  35. Feb 05, 2010
  36. Feb 02, 2010
    • Joe Perches's avatar
    • David Rientjes's avatar
      kbuild: improve version string logic · 85a256d8
      David Rientjes authored
      
      The LOCALVERSION= string passed to "make" will now always be appended to
      the kernel version after CONFIG_LOCALVERSION, if it exists, regardless of
      whether CONFIG_LOCALVERSION_AUTO is set or not.  This allows users to
      uniquely identify their kernel builds with a string.
      
      If CONFIG_LOCALVERSION_AUTO is enabled, the unique SCM tag reported by
      setlocalversion (or .scmversion) is appended to the kernel version, if it
      exists.  When CONFIG_LOCALVERSION_AUTO is not enabled, a `+' is appended
      to the kernel version to represent that the kernel has been revised since
      the last release unless "make LOCALVERSION=" was used to uniquely identify
      the build.
      
      The end result is this:
      
       - when LOCALVERSION= is passed to "make", it is appended to the kernel
         version,
      
       - when CONFIG_LOCALVERSION_AUTO is enabled, a unique SCM identifier is
         appended if the respository has been revised beyond a tagged commit,
         and
      
       - when CONFIG_LOCALVERSION_AUTO is disabled, a `+' is appended if the
         repository has been revised beyond a tagged commit and LOCALVERSION=
         was not passed to "make".
      
      Examples:
      
      With CONFIG_LOCALVERSION_AUTO: "make" results in
      v2.6.32-rc4-00149-ga3ccf63.  If there are uncommited changes to the
      respository, it results in v2.6.32-rc4-00149-ga3ccf63-dirty.  If
      "make LOCALVERSION=kbuild" were used, it results in
      v2.6.32-rc4-kbuild-00149-ga3ccf63-dirty.
      
      Without CONFIG_LOCALVERSION_AUTO, "make" results in v2.6.32-rc4+
      unless the repository is at the Linux v2.6.32-rc4 commit (in which
      case the version would be v2.6.32-rc4).  If "make LOCALVERSION=kbuild"
      were used, it results in v2.6.32-rc4-kbuild.
      
      Also renames variables such as localver-auto and _localver-auto to more
      accurately describe what they represent: localver-extra and
      scm-identifier, respectively.
      
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      85a256d8
    • Roland McGrath's avatar
      kconfig CROSS_COMPILE option · 84336466
      Roland McGrath authored
      
      This adds CROSS_COMPILE as a kconfig string so you can store it in
      .config.  Then you can use plain "make" in the configured kernel build
      directory to do the right cross compilation without setting the
      command-line or environment variable every time.
      
      With this, you can set up different build directories for different kernel
      configurations, whether native or cross-builds, and then use the simple:
      
      	make -C /build/dir M=module-source-dir
      
      idiom to build modules for any given target kernel, indicating which one
      by nothing but the build directory chosen.
      
      I tried a version that defaults the string with env="CROSS_COMPILE" so
      that in a "make oldconfig" with CROSS_COMPILE in the environment you can
      just hit return to store the way you're building it.  But the kconfig
      prompt for strings doesn't give you any way to say you want an empty
      string instead of the default, so I punted that.
      
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Anibal Monsalve Salazar <anibal@debian.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Michal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      84336466
Loading