summaryrefslogtreecommitdiff
path: root/scripts/Makefile.modinst
AgeCommit message (Collapse)Author
2009-01-14Revert "kbuild: strip generated symbols from *.ko"Sam Ravnborg
This reverts commit ad7a953c522ceb496611d127e51e278bfe0ff483. And commit: ("allow stripping of generated symbols under CONFIG_KALLSYMS_ALL") 9bb482476c6c9d1ae033306440c51ceac93ea80c These stripping patches has caused a set of issues: 1) People have reported compatibility issues with binutils due to lack of support for `--strip-unneeded-symbols' with objcopy 2.15.92.0.2 Reported by: Wenji 2) ccache and distcc no longer works as expeced Reported by: Ted, Roland, + others 3) The installed modules increased a lot in size Reported by: Ted, Davej + others Reported-by: Wenji Huang <wenji.huang@oracle.com> Reported-by: "Theodore Ts'o" <tytso@mit.edu> Reported-by: Dave Jones <davej@redhat.com> Reported-by: Roland McGrath <roland@redhat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-12-19kbuild: strip generated symbols from *.koJan Beulich
This patch changes the way __crc_ symbols are being resolved from using ld to do so to using the assembler, thus allowing these symbols to be marked local (the linker creates then as global ones) and hence allow stripping (for modules) or ignoring (for vmlinux) them. While at this, also strip other generated symbols during module installation. One potentially debatable point is the handling of the flags passeed to gcc when translating the intermediate assembly file into an object: passing $(c_flags) unchanged doesn't work as gcc passes --gdwarf2 to gas whenever is sees any -g* option, even for -g0, and despite the fact that the compiler would have already produced all necessary debug info in the C->assembly translation phase. I took the approach of just filtering out all -g* options, but an alternative to such negative filtering might be to have a positive filter which might, in the ideal case allow just all the -Wa,* options to pass through. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kbuild: fix installing external modulesSam Ravnborg
Eric Sandeen <sandeen@redhat.com> reported: Installing external modules is supposed to put them in some path under /lib/modules/<version>/extra/subdir/, but this change: http://linux.bkbits.net:8080/linux-2.6/?PAGE=cset&REV=1.1982.9.23 makes them go under /lib/modules/<version>/extrasubdir (for example, make M=fs/ext3 modules_install puts ext3.ko in /lib/modules/<version>/extrafs/ext3.ko) This was the case only when specifying a trailing slash to M=.. Fixed by removing trailing slash if present so we correctly match dir part of target. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Eric Sandeen <sandeen@redhat.com>
2006-06-24kbuild: add option for stripping modules while installing themTheodore Ts'o
Add option for stripping modules while installing them. This function adds support for stripping modules while they are being installed. CONFIG_DEBUG_KERNEL (which will probably become more popular as developers use kdump) causes the size of the installed modules to grow by a factor of 9 or so. Some kernel package systems solve this problem by stripping the debug information from /lib/modules after running "make modules_install", but that may not work for people who are installing directly into /lib/modules --- root partitions that were sized to handle 16 megs worth of modules may not be quite so happy with 145 megs of modules, so the "make modules_install" never succeeds. This patch allows such users to request modules_install to strip the modules as they are installed. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-03-06kbuild: change kbuild to not rely on incorrect GNU make behaviorPaul Smith
The kbuild system takes advantage of an incorrect behavior in GNU make. Once this behavior is fixed, all files in the kernel rebuild every time, even if nothing has changed. This patch ensures kbuild works with both the incorrect and correct behaviors of GNU make. For more details on the incorrect behavior, see: http://lists.gnu.org/archive/html/bug-make/2006-03/msg00003.html Changes in this patch: - Keep all targets that are to be marked .PHONY in a variable, PHONY. - Add .PHONY: $(PHONY) to mark them properly. - Remove any $(PHONY) files from the $? list when determining whether targets are up-to-date or not. Signed-off-by: Paul Smith <psmith@gnu.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-25kbuild: introduce Kbuild.includeSam 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: Sam Ravnborg <sam@ravnborg.org> ---
2005-03-11kbuild: Install external modules in a path relative to their own pathSam Ravnborg
When an external module is being built in down in a directory structure keep the relative directory when installing the module. Example: fs/ contains a Makefile used to build both modules: obj-y := myfs/ oldfs/ Install directories fs/myfs/myfs.ko => Will be installed in /lib/modules/<version>/extra/fs/myfs/ fs/oldfs/oldfs.o => Will be installed in /lib/modules/<version>/extra/fs/oldfs/ Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-10-17kbuild: Allow install of external modules to custom pathAndreas Gruenbacher
Currently, a ``make modules_install'' for an external module will install that module into /lib/modules/$(uname -r)/extra. Allow to override this default by specifying INSTALL_MOD_DIR. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-09-01kbuild: Fix modules_installSam Ravnborg
modules_install failed for modules with 'ko' in their name. Fixes this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-08-29kbuild: Solaris fixes in various kbuild Makfiles'sTom Rini
Additional Makefile fixes for Solaris 2.8 On Solaris, 'head' doesn't take a -q argument. But we can use 'grep -h' instead, so do that in Makefile.mod{inst,post}. The built-in test to /bin/sh doesn't like 'if ! cmd' syntax, so when determining if we need to do modversion stuff, invert the if/else cases. The built-in test also doesn't understand -ef, so invoke a real version of test which does. Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-07-10[PATCH] kbuild: sort modules for modpost and modinstBrian Gerst
Process modules in sorted order during modpost and modules install. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-07-10[PATCH] kbuild: clean up module install rulesBrian Gerst
Consolidate rules for installing internal and external modules. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-04-12[PATCH] kbuild: Create .tmp_versions when building external modulesAndrew Morton
From: Sam Ravnborg <sam@ravnborg.org> When building external modules the $PWD/.tmp_versions directory is used. The .tmp_versions directory in the kernel tree cannot be used because this would clutter up the kernel tree especially when more than one external module is being build for the same kernel tree. This patch make sure to create $PWD/.tmp_versions, and to delete it during make clean. It also removes warning about 'messed with SUBDIRS', this is no longer relevant when .tmp_versions is made outside the kernel tree.
2004-02-26[PATCH] Add a MODULE_VERSION macroAndrew Morton
From: Rusty Russell <rusty@au1.ibm.com> The way it works is that the .mod file contains the name of the module (as before), but succeeding lines are the constituent parts (assumed to be .c files, which usually works: if they use MODULE_VERSION in a file for which this isn't true we'll get a warning). As we postprocess modules, we look in the .modinfo section for a "version=", which is placed by the MODULE_VERSION() macro. This will be of form "version=<macroarg>" "\0" [24 chars] "\0". The 24 chars are replaced by the md4 sum of the .c files and any files they #include using '#include "file"' which are found in the current directory. Whitespace is collapsed outside strings, and comments are ignored for purposes of the sum. The result is a .modinfo entry such as version=1.16ac-rustytest B13E9451C4CA3B89577DEFF At the kernel summit, various people asked for a MODULE_VERSION macro to store module strings (for later access through sysfs). A simple md4 is needed to identify changes in modules which, inevitably, do not update the version. It skips whitespace and comments, and includes #includes which are in the same dir. The module versions should be set according to this definition, based on the RPM one, or CVS Revision tags. Violators will be shot. [<epoch>`:']<version>[`-'<extraversion>] <epoch>: A (small) unsigned integer which allows you to start versions anew. If not mentioned, it's zero. eg. "2:1.0" is after "1:2.0". <version>: The <version> may contain only alphanumerics. <extraversion>: Like <version>, but inserted for local customizations, eg "rh3" or "rusty1". Comparison of two versions (assuming same epoch): Split each into all-digit and all-alphabetical parts. Compare each one one at a time: digit parts numerically, alphabetical in ASCII order. So 0.10 comes after 0.9.
2003-02-17kbuild: Fix non-verbose make modules_install outputRusty Russell
2003-02-16kbuild: Fix modules_install w/o modules errorKai Germaschewski
I fixed scripts/Makefile.modpost to handle CONFIG_MODULES but no modules selected, but forgot scripts/Makefile.modinst (pointed out by akpm)
2003-02-14kbuild: Use list of modules for "make modules_install"Kai Germaschewski
Since we rely on our list of all modules for building anyway, we can as well use it to install the modules. So we don't need to descend in that step anymore, speeding it up, though it's not a particularly performance-critical area.
2002-12-13[PATCH] Revert depmod and hierarchy changesRusty Russell
module-init-tools 0.9 and newer supply a replacement depmod, so it's safe to run again. Also, some external programs like PCMCIA and mkinitrd really want the directory hierarchy in /lib/modules back again: it makes no difference to the tools (since 0.9), so revert it.
2002-12-04kbuild: Build modules as '.ko'Kai Germaschewski
2002-11-10[PATCH] In-kernel Module LoaderRusty Russell
This is an implementation of the in-kernel module loader extending the try_inc_mod_count() primitive and making its use compulsory. This has the benifit of simplicity, and similarity to the existing scheme. To reduce the cost of the constant increments and decrements, reference counters are lockless and per-cpu. Eliminated (coming in following patches): o Modversions o Module parameters o kallsyms o EXPORT_SYMBOL_GPL and MODULE_LICENCE checks o DEVICE_TABLE support. New features: o Typesafe symbol_get/symbol_put o Single "insert this module" syscall interface allows trivial userspace. o Raceless loading and unloading You will need the trivial replacement module utilities from: http://ozlabs.org/~rusty/module-init-tools-0.6.tar.gz
2002-10-27kbuild: Use Makefile.lib for modversion and modules_installSam Ravnborg
Most definitions required were present in Makefile.lib, so delete the definitions and include Makefile.lib.
2002-10-25kbuild: Removed unused definitionsSam Ravnborg
o Deleted subdir-n and subdir- handling in Makefile.build o Deleted all host-progs related stuff in Makfile.modver o In Makefile.modver also deleted everything related to composite objects o Fixed an error when deleting a .ver file + .hdepend and then do make - filter-out in Makefile.modver was faulty
2002-10-23kbuild: Switch "make modules_install" to fast mode ;)Kai Germaschewski
Use the same way we came up with for "make clean" for "make modules_install", gaining a nice speed-up. Also, some cosmetics for scripts/Makefile.clean
2002-10-23kbuild: Split Rules.makeKai Germaschewski
Rules.make is used in 4 phases, o generate modversions o build o install modules o clean split out the code specific to the phase and move it into scripts/Makefile.<phase>