1. 16 11月, 2017 1 次提交
  2. 09 9月, 2016 1 次提交
  3. 06 10月, 2015 1 次提交
  4. 23 9月, 2013 1 次提交
    • G
      modpost: Optionally ignore secondary errors seen if a single module build fails · eed380f3
      Guenter Roeck 提交于
      Commit ea4054a2 (modpost: handle huge numbers of modules) added
      support for building a large number of modules.
      
      Unfortunately, the commit changed the semantics of the makefile: Instead of
      passing only existing object files to modpost, make now passes all expected
      object files. If make was started with option -i, this results in a modpost
      error if a single file failed to build.
      
      Example with the current btrfs build falure on m68k:
      
      fs/btrfs/btrfs.o: No such file or directory
      make[1]: [__modpost] Error 1 (ignored)
      
      This error is followed by lots of errors such as:
      
      m68k-linux-gcc: error: arch/m68k/emu/nfcon.mod.c: No such file or directory
      m68k-linux-gcc: fatal error: no input files
      compilation terminated.
      make[1]: [arch/m68k/emu/nfcon.mod.o] Error 1 (ignored)
      
      This doesn't matter much for normal builds, but it is annoying for builds
      started with "make -i" due to the large number of secondary errors.
      Those errors unnececessarily clog any error log and make it difficult
      to find the real errors in the build.
      
      Fix the problem by adding a new parameter '-n' to modpost. If this parameter
      is specified, modpost reports but ignores missing object files.
      
      With this patch, error output from above problem is (with make -i):
      
      m68k-linux-ld: cannot find fs/btrfs/ioctl.o: No such file or directory
      make[2]: [fs/btrfs/btrfs.o] Error 1 (ignored)
      ...
      fs/btrfs/btrfs.o: No such file or directory (ignored)
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Michael Marek <mmarek@suse.cz>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      eed380f3
  5. 05 4月, 2013 1 次提交
    • R
      modpost: handle huge numbers of modules. · ea4054a2
      Rusty Russell 提交于
      strace shows:
      72102 execve("/bin/sh", ["/bin/sh", "-c", "echo '  scripts/mod/modpost -m -a
      -o /cc/wfg/sound-compiletest/Module.symvers      -s'; scripts/
      mod/modpost -m -a -o /cc/wfg/sound-compiletest/Module.symvers      -s vmlinux
      arch/x86/crypto/ablk_helper.o arch/x86/crypto/aes-i586.o arch
      /x86/crypto/aesni-intel.o arch/x86/crypto/crc32-pclmul.o
      ...
      drivers/ata/sata_promise.o "...], [/* 119 vars */] <unfinished ...>
      71827 wait4(-1,  <unfinished ...>
      72102 <... execve resumed> )            = -1 E2BIG (Argument list too long)
      
      So we re-run the shell command which produces the list and feed it into modpost -T -.
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      ea4054a2
  6. 25 1月, 2013 1 次提交
  7. 19 10月, 2012 1 次提交
  8. 10 10月, 2012 1 次提交
    • D
      MODSIGN: Sign modules during the build process · 80d65e58
      David Howells 提交于
      If CONFIG_MODULE_SIG is set, then this patch will cause all modules files to
      to have signatures added.  The following steps will occur:
      
       (1) The module will be linked to foo.ko.unsigned instead of foo.ko
      
       (2) The module will be stripped using both "strip -x -g" and "eu-strip" to
           ensure minimal size for inclusion in an initramfs.
      
       (3) The signature will be generated on the stripped module.
      
       (4) The signature will be appended to the module, along with some information
           about the signature and a magic string that indicates the presence of the
           signature.
      
      Step (3) requires private and public keys to be available.  By default these
      are expected to be found in files:
      
      	signing_key.priv
      	signing_key.x509
      
      in the base directory of the build.  The first is the private key in PEM form
      and the second is the X.509 certificate in DER form as can be generated from
      openssl:
      
      	openssl req \
      		-new -x509 -outform PEM -out signing_key.x509 \
      		-keyout signing_key.priv -nodes \
      		-subj "/CN=H2G2/O=Magrathea/CN=Slartibartfast"
      
      If the secret key is not found then signing will be skipped and the unsigned
      module from (1) will just be copied to foo.ko.
      
      If signing occurs, lines like the following will be seen:
      
      	LD [M]  fs/foo/foo.ko.unsigned
      	STRIP [M] fs/foo/foo.ko.stripped
      	SIGN [M] fs/foo/foo.ko
      
      will appear in the build log.  If the signature step will be skipped and the
      following will be seen:
      
      	LD [M]  fs/foo/foo.ko.unsigned
      	STRIP [M] fs/foo/foo.ko.stripped
      	NO SIGN [M] fs/foo/foo.ko
      
      NOTE!  After the signature step, the signed module _must_not_ be passed through
      strip.  The unstripped, unsigned module is still available at the name on the
      LD [M] line.  This restriction may affect packaging tools (such as rpmbuild)
      and initramfs composition tools.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      80d65e58
  9. 31 8月, 2012 1 次提交
    • scripts/Makefile.modpost: error in finding modules from .mod files. · ef591a55
      이건호 提交于
      This error may happen when the user's id or path includes .ko string.
      For example, user's id is xxx.ko and building test.ko module,
      the test.mod file lists ko name and all object files.
         /home/xxx.ko/kernel_dev/device/drivers/test.ko
         /home/xxx.ko/kernel_dev/device/drivers/test_main.o
      /home/xxx.ko/kernel_dev/device/drivers/test_io.o ...
      Current Makefile.modpost and Makefile.modinst find and list up not
      only test.ko but also other object files.
      because all of object file's path includes .ko string.
      This is a patch to fix it.
      Signed-off-by: NGunho Lee <gunho.lee@lge.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      ef591a55
  10. 25 5月, 2011 1 次提交
  11. 31 3月, 2011 1 次提交
  12. 03 8月, 2010 2 次提交
    • U
      4696e295
    • S
      kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line · 6588169d
      Sam Ravnborg 提交于
      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: NSam 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: NMichal Marek <mmarek@suse.cz>
      6588169d
  13. 19 9月, 2009 1 次提交
  14. 30 10月, 2008 1 次提交
  15. 23 7月, 2008 1 次提交
    • M
      markers: fix duplicate modpost entry · d35cb360
      Mathieu Desnoyers 提交于
      When a kernel was rebuilt, the previous Module.markers was not cleared.
      It caused markers with different format strings to appear as duplicates
      when a markers was changed.  This problem is present since
      scripts/mod/modpost.c started to generate Module.markers, commit
      b2e3e658
      
      It therefore applies to 2.6.25, 2.6.26 and linux-next.
      
      I merely merged the patches from Roland, Wenji and Takashi here.
      
      Credits to
      Roland McGrath <roland@redhat.com>
      Wenji Huang <wenji.huang@oracle.com>
      and
      Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
      
      for providing the individual fixes.
      
      - Changelog :
        - Integrated Takashi's Makefile modification to clear Module.markers upon
          make clean.
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Wenji Huang <wenji.huang@oracle.com>
      Cc: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
      Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d35cb360
  16. 01 6月, 2008 1 次提交
    • S
      kbuild: fix $(src) assignmnet with external modules · 96d97f26
      Sam Ravnborg 提交于
      When we introduced support for KBUILD_EXTRA_SYMBOLS
      we started to include the externam module's kbuild
      file when doing the final modpost step.
      
      As external modules often do:
      ccflags-y := -I$(src)
      
      We had problems because $(src) was unassinged and
      gcc then used the next parameter for -I resulting in
      strange build failures.
      
      Fix is to assign $(src) and $(obj) when building
      external modules.
      
      This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10798Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Tvrtko <tvrtko.ursulin@sophos.com>
      Cc: Andrea Arcangeli <andrea@qumranet.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      96d97f26
  17. 27 4月, 2008 1 次提交
  18. 26 4月, 2008 1 次提交
  19. 24 3月, 2008 1 次提交
  20. 14 2月, 2008 1 次提交
    • M
      Linux Kernel Markers: create modpost file · b2e3e658
      Mathieu Desnoyers 提交于
      This adds some new magic in the MODPOST phase for CONFIG_MARKERS.  Analogous
      to the Module.symvers file, the build will now write a Module.markers file
      when CONFIG_MARKERS=y is set.  This file lists the name, defining module, and
      format string of each marker, separated by \t characters.  This simple text
      file can be used by offline build procedures for instrumentation code,
      analogous to how System.map and Module.symvers can be useful to have for
      kernels other than the one you are running right now.
      
      The strings are made easy to extract by having the __trace_mark macro define
      the name and format together in a single array called __mstrtab_* in the
      __markers_strings section.  This is straightforward and reliable as long as
      the marker structs are always defined by this macro.  It is an unreasonable
      amount of hairy work to extract the string pointers from the __markers section
      structs, which entails handling a relocation type for every machine under the
      sun.
      
      Mathieu :
      - Ran through checkpatch.pl
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: David Smith <dsmith@redhat.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b2e3e658
  21. 29 1月, 2008 1 次提交
    • S
      kbuild: add verbose option to Section mismatch reporting in modpost · 588ccd73
      Sam Ravnborg 提交于
      If the config option CONFIG_SECTION_MISMATCH is not set and
      we see a Section mismatch present the following to the user:
      
      modpost: Found 1 section mismatch(es).
      To see additional details select "Enable full Section mismatch analysis"
      in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH).
      
      If the option CONFIG_SECTION_MISMATCH is selected
      then be verbose in the Section mismatch reporting from mdopost.
      Sample outputs:
      
      WARNING: o-x86_64/vmlinux.o(.text+0x7396): Section mismatch in reference from the function discover_ebda() to the variable .init.data:ebda_addr
      The function  discover_ebda() references
      the variable __initdata ebda_addr.
      This is often because discover_ebda lacks a __initdata
      annotation or the annotation of ebda_addr is wrong.
      
      WARNING: o-x86_64/vmlinux.o(.data+0x74d58): Section mismatch in reference from the variable pci_serial_quirks to the function .devexit.text:pci_plx9050_exit()
      The variable pci_serial_quirks references
      the function __devexit pci_plx9050_exit()
      If the reference is valid then annotate the
      variable with __exit* (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      
      WARNING: o-x86_64/vmlinux.o(__ksymtab+0x630): Section mismatch in reference from the variable __ksymtab_arch_register_cpu to the function .cpuinit.text:arch_register_cpu()
      The symbol arch_register_cpu is exported and annotated __cpuinit
      Fix this by removing the __cpuinit annotation of arch_register_cpu or drop the export.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      588ccd73
  22. 26 7月, 2007 2 次提交
  23. 17 7月, 2007 1 次提交
    • S
      kbuild: do section mismatch check on full vmlinux · 741f98fe
      Sam Ravnborg 提交于
      Previously we did do the check on the .o files used to link
      vmlinux but that failed to find questionable references across
      the .o files.
      Create a dedicated vmlinux.o file used only for section mismatch checks
      that uses the defualt linker script so section does not get renamed.
      
      The vmlinux.o may later be used as part of the the final link of vmlinux
      but for now it is used fo section mismatch only.
      For a defconfig build this is instant but for an allyesconfig this
      add two minutes to a full build (that anyways takes ~2 hours).
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      741f98fe
  24. 03 5月, 2007 1 次提交
  25. 17 10月, 2006 1 次提交
  26. 01 10月, 2006 1 次提交
    • S
      kbuild: make modpost processing configurable · ea837f1c
      Sam Ravnborg 提交于
      On request from Al Viro make modpost processing configurable.
      
      KBUILD_MODPOST_WARN can be set to make modpost warn instead of
      error out in case on unresolved symbols in final module link.
      
      KBUILD_MODPOST_NOFINAL can be set to avoid the final and timeconsuming
      .c file generation and link of .ko files. This is solely useful for
      speeding up when doing compile checks with for example allmodconfig
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      ea837f1c
  27. 25 9月, 2006 2 次提交
  28. 01 8月, 2006 1 次提交
  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. 09 6月, 2006 1 次提交
    • R
      kconfig: fix .config dependencies · c955ccaf
      Roman Zippel 提交于
      This fixes one of the worst kbuild warts left - the broken dependencies used
      to check and regenerate the .config file.  This was done via an indirect
      dependency and the .config itself had an empty command, which can cause make
      not to reread the changed .config file.
      
      Instead of this we generate now a new file include/config/auto.conf from
      .config, which is used for kbuild and has the proper dependencies.  It's also
      the main make target now for all files generated during this step (and thus
      replaces include/linux/autoconf.h).
      
      This also means we can now relax the syntax requirements for the .config file
      and we don't have to rewrite it all the time, i.e.  silentoldconfig only
      writes .config now when it's necessary to keep it in sync with the Kconfig
      files and even this can be suppressed by setting the environment variable
      KCONFIG_NOSILENTUPDATE, so the update can (and must) be done manually.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      c955ccaf
  33. 25 3月, 2006 1 次提交
  34. 06 3月, 2006 1 次提交
  35. 19 2月, 2006 1 次提交
    • S
      kbuild: improved modversioning support for external modules · 040fcc81
      Sam Ravnborg 提交于
      With following patch a second option is enabled to obtain
      symbol information from a second external module when a
      external module is build.
      The recommended approach is to use a common kbuild file but
      that may be impractical in certain cases.
      With this patch one can copy over a Module.symvers from one
      external module to make symbols (and symbol versions) available
      for another external module.
      
      Updated documentation in Documentation/kbuild/modules.txt
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      040fcc81
  36. 10 1月, 2006 1 次提交
  37. 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