1. 15 1月, 2012 1 次提交
    • S
      Kbuild: Use dtc's -d (dependency) option · 7c431851
      Stephen Warren 提交于
      This hooks dtc into Kbuild's dependency system.
      
      Thus, for example, "make dtbs" will rebuild tegra-harmony.dtb if only
      tegra20.dtsi has changed yet tegra-harmony.dts has not. The previous
      lack of this feature recently caused me to have very confusing "git
      bisect" results.
      
      For ARM, it's obvious what to add to $(targets). I'm not familiar enough
      with other architectures to know what to add there. Powerpc appears to
      already add various .dtb files into $(targets), but the other archs may
      need something added to $(targets) to work.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      [mmarek: Dropped arch/c6x part to avoid merging commits from the middle
      of the merge window]
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      7c431851
  2. 09 1月, 2012 1 次提交
    • M
      kbuild: Fix comment in Makefile.lib · 5bb0571b
      Michal Marek 提交于
      KBUILD_MODNAME is not defined for files that are linked into multiple
      modules, and trying to change reality to match documentation would
      result in all sorts of trouble. E.g. options for built-in modules would
      be called either foo_bar.param, foo.param, or bar.param, depending on
      the configuration. So just change the comment.
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      5bb0571b
  3. 31 8月, 2011 1 次提交
  4. 10 6月, 2011 2 次提交
  5. 18 4月, 2011 1 次提交
  6. 14 1月, 2011 1 次提交
    • L
      decompressors: add XZ decompressor module · 24fa0402
      Lasse Collin 提交于
      In userspace, the .lzma format has become mostly a legacy file format that
      got superseded by the .xz format.  Similarly, LZMA Utils was superseded by
      XZ Utils.
      
      These patches add support for XZ decompression into the kernel.  Most of
      the code is as is from XZ Embedded <http://tukaani.org/xz/embedded.html>.
      It was written for the Linux kernel but is usable in other projects too.
      
      Advantages of XZ over the current LZMA code in the kernel:
        - Nice API that can be used by other kernel modules; it's
          not limited to kernel, initramfs, and initrd decompression.
        - Integrity check support (CRC32)
        - BCJ filters improve compression of executable code on
          certain architectures. These together with LZMA2 can
          produce a few percent smaller kernel or Squashfs images
          than plain LZMA without making the decompression slower.
      
      This patch: Add the main decompression code (xz_dec), testing module
      (xz_dec_test), wrapper script (xz_wrap.sh) for the xz command line tool,
      and documentation.  The xz_dec module is enough to have a usable XZ
      decompressor e.g.  for Squashfs.
      Signed-off-by: NLasse Collin <lasse.collin@tukaani.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Alain Knaff <alain@knaff.lu>
      Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
      Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      24fa0402
  7. 24 12月, 2010 1 次提交
    • D
      of: Add support for linking device tree blobs into vmlinux · aab94339
      Dirk Brandewie 提交于
      This patch adds support for linking device tree blob(s) into
      vmlinux. Modifies asm-generic/vmlinux.lds.h to add linking
      .dtb sections into vmlinux. To maintain compatiblity with the of/fdt
      driver code platforms MUST copy the blob to a non-init memory location
      before the kernel frees the .init.* sections in the image.
      
      Modifies scripts/Makefile.lib to add a kbuild command to
      compile DTS files to device tree blobs and a rule to create objects to
      wrap the blobs for linking.
      
      STRUCT_ALIGNMENT is defined in vmlinux.lds.h for use in the rule to
      create wrapper objects for the dtb in Makefile.lib.  The
      STRUCT_ALIGN() macro in vmlinux.lds.h is modified to use the
      STRUCT_ALIGNMENT definition.
      
      The DTB's are placed on 32 byte boundries to allow parsing the blob
      with driver/of/fdt.c during early boot without having to copy the blob
      to get the structure alignment GCC expects.
      
      A DTB is linked in by adding the DTB object to the list of objects to
      be linked into vmlinux in the archtecture specific Makefile using
         obj-y += foo.dtb.o
      Signed-off-by: NDirk Brandewie <dirk.brandewie@gmail.com>
      Acked-by: NMichal Marek <mmarek@suse.cz>
      [grant.likely@secretlab.ca: cleaned up whitespace inconsistencies]
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      aab94339
  8. 29 10月, 2010 1 次提交
  9. 23 9月, 2010 1 次提交
  10. 07 4月, 2010 1 次提交
    • B
      x86: Add optimized popcnt variants · d61931d8
      Borislav Petkov 提交于
      Add support for the hardware version of the Hamming weight function,
      popcnt, present in CPUs which advertize it under CPUID, Function
      0x0000_0001_ECX[23]. On CPUs which don't support it, we fallback to the
      default lib/hweight.c sw versions.
      
      A synthetic benchmark comparing popcnt with __sw_hweight64 showed almost
      a 3x speedup on a F10h machine.
      Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
      LKML-Reference: <20100318112015.GC11152@aftab>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      d61931d8
  11. 11 3月, 2010 1 次提交
  12. 13 1月, 2010 1 次提交
    • J
      kbuild: really fix bzImage build with non-bash sh · 1373411a
      Jonathan Nieder 提交于
      In an x86 build with CONFIG_KERNEL_LZMA enabled and dash as sh,
      arch/x86/boot/compressed/vmlinux.bin.lzma ends with
      '\xf0\x7d\x39\x00' (16 bytes) instead of the 4 bytes intended and
      the resulting vmlinuz fails to boot.  This improves on the
      previous behavior, in which the file contained the characters
      '-ne ' as well, but not by much.
      
      Previous commits replaced "echo -ne" first with "/bin/echo -ne",
      then "printf" in the hope of improving portability, but none of
      these commands is guaranteed to support hexadecimal escapes on
      POSIX systems.  So use the shell to convert from hexadecimal to
      octal.
      
      With this change, an LZMA-compressed kernel built with dash as sh
      boots correctly again.
      Reported-by: NSebastian Dalfuß <sd@sedf.de>
      Reported-by: NOliver Hartkopp <oliver@hartkopp.net>
      Reported-by: NMichael Guntsche <mike@it-loops.com>
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Cc: Michael Tokarev <mjt@tls.msk.ru>
      Cc: Alek Du <alek.du@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      1373411a
  13. 12 1月, 2010 1 次提交
    • A
      lib: add support for LZO-compressed kernels · 7dd65feb
      Albin Tonnerre 提交于
      This patch series adds generic support for creating and extracting
      LZO-compressed kernel images, as well as support for using such images on
      the x86 and ARM architectures, and support for creating and using
      LZO-compressed initrd and initramfs images.
      
      Russell King said:
      
      : Testing on a Cortex A9 model:
      : - lzo decompressor is 65% of the time gzip takes to decompress a kernel
      : - lzo kernel is 9% larger than a gzip kernel
      :
      : which I'm happy to say confirms your figures when comparing the two.
      :
      : However, when comparing your new gzip code to the old gzip code:
      : - new is 99% of the size of the old code
      : - new takes 42% of the time to decompress than the old code
      :
      : What this means is that for a proper comparison, the results get even better:
      : - lzo is 7.5% larger than the old gzip'd kernel image
      : - lzo takes 28% of the time that the old gzip code took
      :
      : So the expense seems definitely worth the effort.  The only reason I
      : can think of ever using gzip would be if you needed the additional
      : compression (eg, because you have limited flash to store the image.)
      :
      : I would argue that the default for ARM should therefore be LZO.
      
      This patch:
      
      The lzo compressor is worse than gzip at compression, but faster at
      extraction.  Here are some figures for an ARM board I'm working on:
      
      Uncompressed size: 3.24Mo
      gzip  1.61Mo 0.72s
      lzo   1.75Mo 0.48s
      
      So for a compression ratio that is still relatively close to gzip, it's
      much faster to extract, at least in that case.
      
      This part contains:
       - Makefile routine to support lzo compression
       - Fixes to the existing lzo compressor so that it can be used in
         compressed kernels
       - wrapper around the existing lzo1x_decompress, as it only extracts one
         block at a time, while we need to extract a whole file here
       - config dialog for kernel compression
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: cleanup]
      Signed-off-by: NAlbin Tonnerre <albin.tonnerre@free-electrons.com>
      Tested-by: NWu Zhangjin <wuzhangjin@gmail.com>
      Acked-by: N"H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Tested-by: NRussell King <rmk@arm.linux.org.uk>
      Acked-by: NRussell King <rmk@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7dd65feb
  14. 15 12月, 2009 1 次提交
    • A
      module: make MODULE_SYMBOL_PREFIX into a CONFIG option · 9e1b9b80
      Alan Jenkins 提交于
      The next commit will require the use of MODULE_SYMBOL_PREFIX in
      .tmp_exports-asm.S.  Currently it is mixed in with C structure
      definitions in "asm/module.h".  Move the definition of this arch option
      into Kconfig, so it can be easily accessed by any code.
      
      This also lets modpost.c use the same definition.  Previously modpost
      relied on a hardcoded list of architectures in mk_elfconfig.c.
      
      A build test for blackfin, one of the two MODULE_SYMBOL_PREFIX archs,
      showed the generated code was unchanged.  vmlinux was identical save
      for build ids, and an apparently randomized suffix on a single "__key"
      symbol in the kallsyms data).
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: Mike Frysinger <vapier@gentoo.org> (blackfin)
      CC: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9e1b9b80
  15. 12 12月, 2009 1 次提交
  16. 12 10月, 2009 1 次提交
  17. 19 6月, 2009 1 次提交
    • P
      gcov: add gcov profiling infrastructure · 2521f2c2
      Peter Oberparleiter 提交于
      Enable the use of GCC's coverage testing tool gcov [1] with the Linux
      kernel.  gcov may be useful for:
      
       * debugging (has this code been reached at all?)
       * test improvement (how do I change my test to cover these lines?)
       * minimizing kernel configurations (do I need this option if the
         associated code is never run?)
      
      The profiling patch incorporates the following changes:
      
       * change kbuild to include profiling flags
       * provide functions needed by profiling code
       * present profiling data as files in debugfs
      
      Note that on some architectures, enabling gcc's profiling option
      "-fprofile-arcs" for the entire kernel may trigger compile/link/
      run-time problems, some of which are caused by toolchain bugs and
      others which require adjustment of architecture code.
      
      For this reason profiling the entire kernel is initially restricted
      to those architectures for which it is known to work without changes.
      This restriction can be lifted once an architecture has been tested
      and found compatible with gcc's profiling. Profiling of single files
      or directories is still available on all platforms (see config help
      text).
      
      [1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.htmlSigned-off-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Li Wei <W.Li@Sun.COM>
      Cc: Michael Ellerman <michaele@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2521f2c2
  18. 09 5月, 2009 1 次提交
  19. 19 4月, 2009 1 次提交
    • S
      kbuild: introduce subdir-ccflags-y · 720097d8
      Sam Ravnborg 提交于
      Following patch introduce support for setting options
      to gcc that has effect for current directory and all
      subdirectories.
      
      The typical use case are an architecture or a subsystem that
      decide to cover all files with -Werror.
      Today alpha, mips and sparc uses -Werror in almost all their
      Makefile- with subdir-ccflag-y it is now simpler to do so
      as only the top-level directories needs to be covered.
      
      Likewise if we decide to cover a full subsystem such
      as net/ with -Werror this is done by adding a single
      line to net/Makefile.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      720097d8
  20. 25 3月, 2009 1 次提交
    • J
      dynamic debug: combine dprintk and dynamic printk · e9d376f0
      Jason Baron 提交于
      This patch combines Greg Bank's dprintk() work with the existing dynamic
      printk patchset, we are now calling it 'dynamic debug'.
      
      The new feature of this patchset is a richer /debugfs control file interface,
      (an example output from my system is at the bottom), which allows fined grained
      control over the the debug output. The output can be controlled by function,
      file, module, format string, and line number.
      
      for example, enabled all debug messages in module 'nf_conntrack':
      
      echo -n 'module nf_conntrack +p' > /mnt/debugfs/dynamic_debug/control
      
      to disable them:
      
      echo -n 'module nf_conntrack -p' > /mnt/debugfs/dynamic_debug/control
      
      A further explanation can be found in the documentation patch.
      Signed-off-by: NGreg Banks <gnb@sgi.com>
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e9d376f0
  21. 05 1月, 2009 2 次提交
    • H
      bzip2/lzma: handle failures from bzip2 and lzma correctly · 0f5e2d24
      H. Peter Anvin 提交于
      Impact: Bug fix
      
      If bzip2 or lzma fails (for example, if they aren't installed on the
      system), we need to propagate the failure out to "make".  However,
      they were masked by being followed by a semicolon.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      0f5e2d24
    • A
      bzip2/lzma: library support for gzip, bzip2 and lzma decompression · bc22c17e
      Alain Knaff 提交于
      Impact: Replaces inflate.c with a wrapper around zlib_inflate; new library code
      
      This is the first part of the bzip2/lzma patch
      
      The bzip patch is based on an idea by Christian Ludwig, includes support for
      compressing the kernel with bzip2 or lzma rather than gzip. Both
      compressors give smaller sizes than gzip.  Lzma's decompresses faster
      than bzip2.
      
      It also supports ramdisks and initramfs' compressed using these two
      compressors.
      
      The functionality has been successfully used for a couple of years by
      the udpcast project
      
      This version applies to "tip" kernel 2.6.28
      
      This part contains:
      - changed inflate.c to accomodate rest of patch
      - implementation of bzip2 compression (not used at this stage yet)
      - implementation of lzma compression (not used at this stage yet)
      - Makefile routines to support bzip2 and lzma kernel compression
      Signed-off-by: NAlain Knaff <alain@knaff.lu>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      bc22c17e
  22. 04 12月, 2008 1 次提交
    • S
      kbuild: expand -I in KBUILD_CPPFLAGS · d8672b40
      Sam Ravnborg 提交于
      kbuild failed to expand include flags in KBUILD_CPPFLAGS
      resulting in code like this in arch Makefiles:
      
      ifeq ($(KBUILD_SRC),)
      KBUILD_CPPFLAGS += -Iinclude/foo
      else
      KBUILD_CPPFLAGS += -I$(srctree)/include/foo
      endif
      
      Move use of LINUXINCLUDE into Makefile.lib to allow
      us to expand -I directives of KBUILD_CPPFLAGS so
      we can avoid the above code.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      d8672b40
  23. 17 10月, 2008 1 次提交
    • J
      driver core: basic infrastructure for per-module dynamic debug messages · 346e15be
      Jason Baron 提交于
      Base infrastructure to enable per-module debug messages.
      
      I've introduced CONFIG_DYNAMIC_PRINTK_DEBUG, which when enabled centralizes
      control of debugging statements on a per-module basis in one /proc file,
      currently, <debugfs>/dynamic_printk/modules. When, CONFIG_DYNAMIC_PRINTK_DEBUG,
      is not set, debugging statements can still be enabled as before, often by
      defining 'DEBUG' for the proper compilation unit. Thus, this patch set has no
      affect when CONFIG_DYNAMIC_PRINTK_DEBUG is not set.
      
      The infrastructure currently ties into all pr_debug() and dev_dbg() calls. That
      is, if CONFIG_DYNAMIC_PRINTK_DEBUG is set, all pr_debug() and dev_dbg() calls
      can be dynamically enabled/disabled on a per-module basis.
      
      Future plans include extending this functionality to subsystems, that define 
      their own debug levels and flags.
      
      Usage:
      
      Dynamic debugging is controlled by the debugfs file, 
      <debugfs>/dynamic_printk/modules. This file contains a list of the modules that
      can be enabled. The format of the file is as follows:
      
      	<module_name> <enabled=0/1>
      		.
      		.
      		.
      
      	<module_name> : Name of the module in which the debug call resides
      	<enabled=0/1> : whether the messages are enabled or not
      
      For example:
      
      	snd_hda_intel enabled=0
      	fixup enabled=1
      	driver enabled=0
      
      Enable a module:
      
      	$echo "set enabled=1 <module_name>" > dynamic_printk/modules
      
      Disable a module:
      
      	$echo "set enabled=0 <module_name>" > dynamic_printk/modules
      
      Enable all modules:
      
      	$echo "set enabled=1 all" > dynamic_printk/modules
      
      Disable all modules:
      
      	$echo "set enabled=0 all" > dynamic_printk/modules
      
      Finally, passing "dynamic_printk" at the command line enables
      debugging for all modules. This mode can be turned off via the above
      disable command.
      
      [gkh: minor cleanups and tweaks to make the build work quietly]
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      346e15be
  24. 24 5月, 2008 1 次提交
    • S
      kbuild: create new CFLAGS_REMOVE_(basename).o option · 656ee82c
      Steven Rostedt 提交于
      We currently have a way to add special CFLAGS to code, but we do not have a
      way to remove them if needed.
      
      With the case of ftrace, some files should simply not be profiled. Adding
      the -pg flag to these files is simply a waste, and adding "notrace" to each
      and every function is ugly.
      
      Currently we put in "Makefile turd" [1] to stop the compiler from adding -pg
      to certain files. This was clumsy and awkward.
      
      This patch now adds the revese of CFLAGS_(basename).o with
      CFLAGS_REMOVE_(basename).o.  This allows developers to prevent certain
      CFLAGS from being used to compile files. For example, we can now do
      
      CFLAGS_REMOVE_string.o = -pg
      
      to remove the -pg option from the string.o file in the lib directory.
      
      Note: a space delimited list of options may be added to the REMOVE macro.
      
      [1] - what David Miller called the workaronud to remove -pg
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      656ee82c
  25. 29 1月, 2008 1 次提交
    • T
      kbuild: implement modules.order · 551559e1
      Tejun Heo 提交于
      When multiple built-in modules (especially drivers) provide the same
      capability, they're prioritized by link order specified by the order
      listed in Makefile.  This implicit ordering is lost for loadable
      modules.
      
      When driver modules are loaded by udev, what comes first in
      modules.alias file is selected.  However, the order in this file is
      indeterministic (depends on filesystem listing order of installed
      modules).  This causes confusion.
      
      The solution is two-parted.  This patch updates kbuild such that it
      generates and installs modules.order which contains the name of
      modules ordered according to Makefile.  The second part is update to
      depmod such that it generates output files according to this file.
      
      Note that both obj-y and obj-m subdirs can contain modules and
      ordering information between those two are lost from beginning.
      Currently obj-y subdirs are put before obj-m subdirs.
      
      Sam Ravnborg cleaned up Makefile modifications and suggested using awk
      to remove duplicate lines from modules.order instead of using separate
      C program.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Cc: Bill Nottingham <notting@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Jon Masters <jonathan@jonmasters.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      551559e1
  26. 16 10月, 2007 3 次提交
    • S
      kbuild: introduce ccflags-y, asflags-y and ldflags-y · f77bf014
      Sam Ravnborg 提交于
      Introduce ccflags-y, asflags-y and ldflags-y so we soon can
      deprecate use of EXTRA_CFLAGS, EXTRA_AFLAGS and EXTRA_LDFLAGS.
      This patch does not touch any in-tree users - thats next round.
      Lets get this committed first and then fix the users of the
      soon to be deprecated variants next.
      
      The rationale behind this change is to introduce support for
      makefile fragments like:
      
      ccflags-$(CONFIG_WHATEVER_DEBUG) := -DDEBUG
      
      As a replacement for the uglier:
      ifeq ($(CONFIG_WHATEVER_DEBUG),y)
              EXTRA_CFLAGS := -DDEBUG
      endif
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      f77bf014
    • S
      kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP · 06c5040c
      Sam Ravnborg 提交于
      The variable CPPFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      
      This patch replace use of CPPFLAGS with KBUILD_CPPFLAGS all over the
      tree and enabling one to use:
      make CPPFLAGS=...
      to specify additional CPP commandline options.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      06c5040c
    • S
      kbuild: enable 'make AFLAGS=...' to add additional options to AS · 222d394d
      Sam Ravnborg 提交于
      The variable AFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      On top of that several people over time has asked for a way to
      pass in additional flags to gcc.
      
      This patch replace use of AFLAGS with KBUILD_AFLAGS all over
      the tree.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      222d394d
  27. 15 10月, 2007 1 次提交
    • S
      kbuild: enable 'make CFLAGS=...' to add additional options to CC · a0f97e06
      Sam Ravnborg 提交于
      The variable CFLAGS is a wellknown variable and the usage by
      kbuild may result in unexpected behaviour.
      On top of that several people over time has asked for a way to
      pass in additional flags to gcc.
      
      This patch replace use of CFLAGS with KBUILD_CFLAGS all over the
      tree and enabling one to use:
      make CFLAGS=...
      to specify additional gcc commandline options.
      
      One usecase is when trying to find gcc bugs but other
      use cases has been requested too.
      
      Patch was tested on following architectures:
      alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k
      
      Test was simple to do a defconfig build, apply the patch and check
      that nothing got rebuild.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      a0f97e06
  28. 13 10月, 2007 2 次提交
    • S
      kbuild: kill backward compatibility checks · 836caba7
      Sam Ravnborg 提交于
      These checks has been present for several kernel releases (> 5).
      So lets just get rid of them.
      With this we no longer check for use of:
      EXTRA_TARGETS, O_TARGET, L_TARGET, list-multi, export-objs
      
      There were three remaining in-tree users of O_TARGET in some
      unmaintained sh64 code - mail sent to the maintainer + list.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      836caba7
    • S
      kbuild: fix directory traversal bug · f5fb9765
      Sam Ravnborg 提交于
      Previously kbuild choked over the following:
      obj-y += ../../../arch/i386/kernel/bootflag.o
      
      This has resulted in some rather ugly workarounds in
      current x86_64 tree.
      This patch fixes kbuild to allow the above and enable
      potential cleanups in x86_64 and maybe in other places.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      f5fb9765
  29. 01 7月, 2006 1 次提交
    • S
      kbuild: fix ia64 breakage after introducing make -rR · 5e8d780d
      Sam Ravnborg 提交于
      kbuild used $¤(*F to get filename of target without extension.
      This was used in several places all over kbuild, but introducing
      make -rR broke his for all cases where we specified full path to
      target/prerequsite. It is assumed that make -rR disables old style
      suffix-rules which is why is suddenly failed.
      
      ia64 was impacted by this change because several div* routines in
      arch/ia64/lib are build using explicit paths and then kbuild failed.
      
      Thanks to David Mosberger-Tang <David.Mosberger@acm.org> for an explanation
      what was the root-cause and for testing on ia64.
      
      This patch also fixes two uses of $(*F) in arch/um
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      5e8d780d
  30. 27 6月, 2006 1 次提交
    • L
      Revert "kbuild: fix make -rR breakage" · d38b6968
      Linus Torvalds 提交于
      This reverts commit e5c44fd8.
      
      Thanks to Daniel Ritz and Michal Piotrowski for noticing the problem.
      
      Daniel says:
      
        "[The] reason is a recent change that made modules always shows as
         module.mod.  it breaks modprobe and probably many scripts..besides
         lsmod looking horrible
      
         stuff like this in modprobe.conf:
              install pcmcia_core /sbin/modprobe --ignore-install pcmcia_core; /sbin/modprobe pcmcia
         makes modprobe fork/exec endlessly calling itself...until oom
         interrupts it"
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d38b6968
  31. 25 6月, 2006 1 次提交
    • S
      kbuild: fix make -rR breakage · e5c44fd8
      Sam Ravnborg 提交于
      make failed to supply the filename when using make -rR and using $(*F)
      to get target filename without extension.
      This bug was not reproduceable in small scale but using:
      $(basename $(notdir $@)) fixes it with same functionality.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      e5c44fd8
  32. 07 4月, 2006 1 次提交
  33. 26 12月, 2005 1 次提交
    • U
      kbuild: set correct KBUILD_MODNAME when using well known kernel symbols as module names · f83b5e32
      Ustyugov Roman 提交于
      This patch fixes a problem when we use well known kernel symbols as module
      names.
      
      For example, if module source name is current.c, idle_stack.c or etc.,
      we have a bad KBUILD_MODNAME value.
      For example, KBUILD_MODNAME will be "get_current()" instead of "current", or
      "(init_thread_union.stack)" instead of "idle_task".
      
      The trick is to define a stringify macro on the commandline - named
      KBUILD_STR for namespace reasons - and then to stringify the module
      name.
      
      There are a few uses of KBUILD_MODNAME throughout the tree but the usage
      is for debug and will not be harmed by this change so left untouched for now.
      
      While at it KBUILD_BASENAME was changed too. Any spinlock usage in the
      unix module would have created wrong section names without it.
      Usage in spinlock.h fixed so it no longer stringify KBUILD_BASENAME.
      
      Original patch from Ustyogov Roman - all bugs introduced by me.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      f83b5e32
  34. 26 7月, 2005 1 次提交
    • S
      kbuild: introduce Kbuild.include · 8ec4b4ff
      Sam Ravnborg 提交于
      Kbuild.include is a placeholder for definitions originally present in
      both the top-level Makefile and scripts/Makefile.build.
      There were a slight difference in the filechk definition, so the most videly
      used version was kept and usr/Makefile was adopted for this syntax.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      ---
      8ec4b4ff
  35. 25 7月, 2005 1 次提交