Skip to content
Snippets Groups Projects
  1. Jan 28, 2008
    • Tejun Heo's avatar
      kbuild: implement modules.order · 551559e1
      Tejun Heo authored
      
      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: default avatarTejun Heo <htejun@gmail.com>
      Acked-by: default avatarGreg 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: default avatarSam Ravnborg <sam@ravnborg.org>
      551559e1
  2. Oct 15, 2007
    • Sam Ravnborg's avatar
      kbuild: introduce ccflags-y, asflags-y and ldflags-y · f77bf014
      Sam Ravnborg authored
      
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      f77bf014
    • Sam Ravnborg's avatar
      kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP · 06c5040c
      Sam Ravnborg authored
      
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      06c5040c
    • Sam Ravnborg's avatar
      kbuild: enable 'make AFLAGS=...' to add additional options to AS · 222d394d
      Sam Ravnborg authored
      
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      222d394d
  3. Oct 14, 2007
    • Sam Ravnborg's avatar
      kbuild: enable 'make CFLAGS=...' to add additional options to CC · a0f97e06
      Sam Ravnborg authored
      
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      a0f97e06
  4. Oct 12, 2007
    • Sam Ravnborg's avatar
      kbuild: kill backward compatibility checks · 836caba7
      Sam Ravnborg authored
      
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      836caba7
    • Sam Ravnborg's avatar
      kbuild: fix directory traversal bug · f5fb9765
      Sam Ravnborg authored
      
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      f5fb9765
  5. Jul 01, 2006
    • Sam Ravnborg's avatar
      kbuild: fix ia64 breakage after introducing make -rR · 5e8d780d
      Sam Ravnborg authored
      
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      5e8d780d
  6. Jun 26, 2006
    • Linus Torvalds's avatar
      Revert "kbuild: fix make -rR breakage" · d38b6968
      Linus Torvalds authored
      
      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: default avatarLinus Torvalds <torvalds@osdl.org>
      d38b6968
  7. Jun 24, 2006
    • Sam Ravnborg's avatar
      kbuild: fix make -rR breakage · e5c44fd8
      Sam Ravnborg authored
      
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      e5c44fd8
  8. Apr 07, 2006
  9. Dec 25, 2005
    • Ustyugov Roman's avatar
      kbuild: set correct KBUILD_MODNAME when using well known kernel symbols as module names · f83b5e32
      Ustyugov Roman authored
      
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      f83b5e32
  10. Jul 25, 2005
  11. Apr 16, 2005
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      v2.6.12-rc2
      1da177e4
Loading