summaryrefslogtreecommitdiff
path: root/scripts/Makefile
AgeCommit message (Collapse)Author
2012-05-18x86, realmode: 16-bit real-mode code support for relocs toolH. Peter Anvin
A new option is added to the relocs tool called '--realmode'. This option causes the generation of 16-bit segment relocations and 32-bit linear relocations for the real-mode code. When the real-mode code is moved to the low-memory during kernel initialization, these relocation entries can be used to relocate the code properly. In the assembly code 16-bit segment relocations must be relative to the 'real_mode_seg' absolute symbol. Linear relocations must be relative to a symbol prefixed with 'pa_'. 16-bit segment relocation is used to load cs:ip in 16-bit code. Linear relocations are used in the 32-bit code for relocatable data references. They are declared in the linker script of the real-mode code. The relocs tool is moved to arch/x86/tools/relocs.c, and added new target archscripts that can be used to build scripts needed building an architecture. be compiled before building the arch/x86 tree. [ hpa: accelerating this because it detects invalid absolute relocations, a serious bug in binutils 2.22.52.0.x which currently produces bad kernels. ] Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/1336501366-28617-2-git-send-email-jarkko.sakkinen@intel.com Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: <stable@vger.kernel.org>
2011-05-02kbuild: move scripts/basic/docproc.c to scripts/docproc.cPeter Foley
Move docproc from scripts/basic to scripts so it is only built for *doc targets instead of every time the kernel is built.
2011-03-17KBuild: silence "'scripts/unifdef' is up to date."Mike Waychison
While changing our build system over to use the headers_install target as part of our klibc build, the following message started showing up in our logs: make[2]: `scripts/unifdef' is up to date. It turns out that the build blindly invokes a recursive make on this target, which causes make to emit this message when the target is already up to date. This isn't seen for most targets as the rest of the build relies primarily on the default target and on PHONY targets when invoking make recursively. Silence the above message when building unifdef as part of headers_install by hiding it behind a new PHONY target called "build_unifdef" that has an empty recipe. Signed-off-by: Mike Waychison <mikew@google.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-10-14ftrace/x86: Add support for C version of recordmcountSteven Rostedt
This patch adds the support for the C version of recordmcount and compile times show ~ 12% improvement. After verifying this works, other archs can add: HAVE_C_MCOUNT_RECORD in its Kconfig and it will use the C version of recordmcount instead of the perl version. Cc: <linux-arch@vger.kernel.org> Cc: Michal Marek <mmarek@suse.cz> Cc: linux-kbuild@vger.kernel.org Cc: John Reiser <jreiser@bitwagon.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-09-15sparc: Kill PROM console driver.David S. Miller
Many years ago when this driver was written, it had a use, but these days it's nothing but trouble and distributions should not enable it in any situation. Pretty much every console device a sparc machine could see has a bonafide real driver, making the PROM console hack unnecessary. If any new device shows up, we should write a driver instead of depending upon this crutch to save us. We've been able to take care of this even when no chip documentation exists (sunxvr500, sunxvr2500) so there are no excuses. Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-02Move dtc and libfdt sources from arch/powerpc/boot to scripts/dtcDavid Gibson
The powerpc kernel always requires an Open Firmware like device tree to supply device information. On systems without OF, this comes from a flattened device tree blob. This blob is usually generated by dtc, a tool which compiles a text description of the device tree into the flattened format used by the kernel. Sometimes, the bootwrapper makes small changes to the pre-compiled device tree blob (e.g. filling in the size of RAM). To do this it uses the libfdt library. Because these are only used on powerpc, the code for both these tools is included under arch/powerpc/boot (these were imported and are periodically updated from the upstream dtc tree). However, the microblaze architecture, currently being prepared for merging to mainline also uses dtc to produce device tree blobs. A few other archs have also mentioned some interest in using dtc. Therefore, this patch moves dtc and libfdt from arch/powerpc into scripts, where it can be used by any architecture. The vast bulk of this patch is a literal move, the rest is adjusting the various Makefiles to use dtc and libfdt correctly from their new locations. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-06Revert "fix modules_install via NFS"David Woodhouse
This reverts commit 8b249b6856f16f09b0e5b79ce5f4d435e439b9d6. This 'fix' is not necessary; we just need to undo the damage caused accidentally by Igor/Mauro in 4b29631db33292d416dc395c56122ea865e7635c ("V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI card") Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-01-07fix modules_install via NFSSam Ravnborg
Rafael reported: I get the following error from 'make modules_install' on my test boxes: HOSTCC firmware/ihex2fw /home/rafael/src/linux-2.6/firmware/ihex2fw.c:268: fatal error: opening dependency file firmware/.ihex2fw.d: Read-only file system compilation terminated. make[3]: *** [firmware/ihex2fw] Error 1 make[2]: *** [_modinst_post] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 where the configuration is that the kernel is compiled on a build box with 'make O=<destdir> -j5' and then <destdir> is mounted over NFS read-only by each test box (full path to this directory is the same on the build box and on the test boxes). Then, I cd into <destdir>, run 'make modules_install' and get the error above. The issue turns out to be that we when we install firmware pick up the list of firmware blobs from firmware/Makefile. And this triggers the Makefile rules to update ihex2fw. There were two solutions for this issue: 1) Move the list of firmware blobs to a separate file 2) Avoid ihex2fw rebuild by moving it to scripts As I seriously beleive that the list of firmware blobs should be done in a fundamental different way solution 2) was selected. Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: David Woodhouse <dwmw2@infradead.org>
2008-08-27selinux: add support for installing a dummy policy (v2)Serge E. Hallyn
In August 2006 I posted a patch generating a minimal SELinux policy. This week, David P. Quigley posted an updated version of that as a patch against the kernel. It also had nice logic for auto-installing the policy. Following is David's original patch intro (preserved especially bc it has stats on the generated policies): se interested in the changes there were only two significant changes. The first is that the iteration through the list of classes used NULL as a sentinel value. The problem with this is that the class_to_string array actually has NULL entries in its table as place holders for the user space object classes. The second change was that it would seem at some point the initial sids table was NULL terminated. This is no longer the case so that iteration has to be done on array length instead of looking for NULL. Some statistics on the policy that it generates: The policy consists of 523 lines which contain no blank lines. Of those 523 lines 453 of them are class, permission, and initial sid definitions. These lines are usually little to no concern to the policy developer since they will not be adding object classes or permissions. Of the remaining 70 lines there is one type, one role, and one user statement. The remaining lines are broken into three portions. The first group are TE allow rules which make up 29 of the remaining lines, the second is assignment of labels to the initial sids which consist of 27 lines, and file system labeling statements which are the remaining 11. In addition to the policy.conf generated there is a single file_contexts file containing two lines which labels the entire system with base_t. This policy generates a policy.23 binary that is 7920 bytes. (then a few versions later...): The new policy is 587 lines (stripped of blank lines) with 476 of those lines being the boilerplate that I mentioned last time. The remaining 111 lines have the 3 lines for type, user, and role, 70 lines for the allow rules (one for each object class including user space object classes), 27 lines to assign types to the initial sids, and 11 lines for file system labeling. The policy binary is 9194 bytes. Changelog: Aug 26: Added Documentation/SELinux.txt Aug 26: Incorporated a set of comments by Stephen Smalley: 1. auto-setup SELINUXTYPE=dummy 2. don't auto-install if selinux is enabled with non-dummy policy 3. don't re-compute policy version 4. /sbin/setfiles not /usr/sbin/setfiles Aug 22: As per JMorris comments, made sure make distclean cleans up the mdp directory. Removed a check for file_contexts which is now created in the same file as the check, making it superfluous. Signed-off-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org>
2006-10-01[PATCH] allow /proc/config.gz to be built as a moduleRoss Biro
The driver for /proc/config.gz consumes rather a lot of memory and it is in fact possible to build it as a module. In some ways this is a bit risky, because the .config which is used for compiling kernel/configs.c isn't necessarily the same as the .config which was used to build vmlinux. But OTOH the potential memory savings are decent, and it'd be fairly dumb to build your configs.o with a different .config. Signed-off-by: Andrew Morton <akpm@google.com> Cc: "Randy.Dunlap" <rdunlap@xenotime.net> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-25kbuild: modpost on vmlinux regardless of CONFIG_MODULESSam Ravnborg
Based on patch from: Magnus Damm <magnus@valinux.co.jp> This has the advantage that all section mismatch checks are run regardless of modules being enabled or not. When running modpost on vmlinux output: MODPOST vmlinux When running modpost on modules output count of modules like this: MODPOST 5 modules Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25kbuild: use in-kernel unifdefSam Ravnborg
Let headers_install use in-kernel unifdef Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-12-16kconfig: move lxdialog to scripts/kconfig/lxdialogSam Ravnborg
The only lxdialog user i kconfig - for menuconfig. So move it to reflect this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-08-11kbuild: Replace host-progs with hostprogs-ySam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-08-09kbuild: Selective compile of targets in scripts/Sam Ravnborg
Do not build executables unless needed. Same goes for scripts/mod/, descend only when CONFIG_MODULES are enabled. With inputs form: Russell King <rmk+lkml@arm.linux.org.uk> and Brian Gerst <bgerst@quark.didntduck.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-07-23kbuild: Fix up moving of modpostSam Ravnborg
A few small issues to fix the moving of modpost. A few files was missing in the commit and one change needed. Also bk ignored the files in their new location. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-07-23kbuild: Move modpost files to a new subdir scripts/modBrian Gerst
Move modpost and support files to scripts/mod. Directory named mod by Sam. From: Brian Gerst <bgerst@didntduck.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2004-06-20[PATCH] kbuild: add deb-pkg targetSam Ravnborg
To prepare kbuild for more kernel packaging formats move all packaging support to scripts/package. In top-level Makefile introduce generic support for all package formats using target names *-pkg. Included the old rpm target for backward compatibility. A new variable KBUILD_IMAGE is used to specify what kernel image will be part of the final package, and is to be set by the arch specific makefile. KBUILD_IMAGE may be overridden from command line or environment. KBUILD_IMAGE will see wider usage later, mainly when installing kernel images. Introducing KBUILD_IMAGE allowed arch specific details to be deleted from the mkspec and builddeb scripts. While in the process added the deb packet format. Script is From: Wichert Akkerman <wichert@wiggy.net> To create a RPM packet use 'make rpm-pkg'. To create a deb packet use 'make deb-pkg'. Both targets are included in 'make help' Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-03-15[PATCH] Fix early parallel make failuresAndrew Morton
From: Sam Ravnborg <sam@ravnborg.org> Ingo said: Starting at around 2.6.4-rc2-mm1, I keep seeing 'scripts/fixdep: Text file busy' messages when doing a -j10 bzImage build - which seems to suggest that by the time fixdep is used by the build system it's not built yet. Sam said: I was pretty sure it was something I had caused, so I gave it a spin. What actually happened was that we tried to build the target 'silentoldconfig' in parrallel with 'scripts'. Since 'silentoldconfig' started a new make and then the config target needed 'scripts' we saw two parallel runs. The way I decided to fix it was to split scripts/ in two parts. The first part is now the very basic stuff - moved to scripts/basic/. The second part is dependent on kernel config etc. and kept in scripts/ In the 2.7 timeframe i will redo this initial stuff - it's becoming too messy for anyone to understand today. Description: Fix dependencies in early phases of kernel build. This solves a few problems nively: modpost is no longer rebuild twicewhen reaching the 'target' state 'make -j10' now works nicely again The patch is rather large due to the following file moves: mkdir scripts/basic mv scripts/fixdep.c scripts/basic mv scripts/split-include.c scripts/basic mv scripts/docproc.c scripts/basic
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-09-09[PATCH] Move ikconfig to /proc/config.gzAndrew Morton
From: "Randy.Dunlap" <randy.dunlap@verizon.net> The SuSE kernels place their ikconfig info at /proc/config.gz: in a different place, and compressed. We thought it was a good idea to do it that way in 2.6 as well. - gzip the /proc config file, put it in /proc/config.gz; - Based on a SuSE patch by Oliver Xymoron <oxymoron@waste.org>, which was derived from a patch by Nicholas Leon <nicholas@binary9.net> - change /proc/ikconfig/built_with to /proc/config_build_info; - cleanup ikconfig init/exit entry points (static, __init, __exit); - Makefile help from Sam Ravnborg; DESC ikconfig cleanup EDESC From: Stephen Hemminger <shemminger@osdl.org> Simplify and cleanup the code: - use single interface to seq_file where possible - don't need to do as much of the /proc interface, only read - use copy_to_user to avoid char at a time copy - remove unneccesary globals - use const char[] rather than const char * where possible. Didn't change the version since interface doesn't change.
2003-03-17[FBDEV] Ug!!! For some reason BK keeps removing this change. I hope this is ↵James Simmons
the last time I have to add it.
2003-03-11kbuild: build-targets replaced with alwaysSam Ravnborg
The former name "kbuild-targets" did not give the user the intuitive feeling that this target will be build regards less of any dependencies no matter if we compile modules or not. The new name "always" imply that this will be build always, and tus is more informative. Fixed the few users of build-targets, and added a warning in Makefile.build
2003-03-10kbuild: Use targets := to tell kbuild about additional targetsSam Ravnborg
EXTRA_TARGETS served several purposes before: 1) List targets to be build (built-in only) 2) Inform kbuild of targets within the makefile Mixing the above are causing confusion, so for now on targets := is used to inform kbuild about targets in a Makefile - that it otherwise did not know about. kbuild uses the "targets :=" information to: a) read the dependency file .target.cmd b) delete the target file during make clean
2003-02-19kbuild: [PATCH] put genksyms in scripts dirKai Germaschewski
This puts genksyms into scripts/genksyms/. genksyms used to be maintained externally, though the only possible user was the kernel build. Moving it into the kernel sources makes it easier to keep it uptodate, like for example updating it to generate linker scripts directly instead of postprocessing the generated header file fragments with sed, as we do currently. Also, genksyms does not handle __typeof__, which needs to be fixed since some of the exported symbol in the kernel are defined using __typeof__. (Rusty Russell/me)
2003-02-19kbuild: Handle MODULE_SYMBOL_PREFIX in module postprocessingKai Germaschewski
Loosely based on a patch by Miles Bader, have modpost deal with weird archs (v850) which prefix their symbols with '_'. Modpost does not yet handle ppc64 "prefix function symbols with '.'" correctly, btw.
2003-02-18kbuild: Remove scripts/elfconfig.h with "make clean"Kai Germaschewski
We have a bit of a mess with build-targets, EXTRA_TARGETS, targets, which needs cleaning up some time. Anyway, we just add $(targets) to the files which get deleted with "make clean" for now.
2003-02-16kbuild: Fix a "make -j" bug.Kai Germaschewski
We really need fixdep before we can compile anything... (Pointed out by wli, and others)
2003-02-14kbuild: Merge file2alias into scripts/modpost.cKai Germaschewski
Up to now, we called "nm" to find the symbol table in vmlinux / modules. Using code from scripts/file2alias.c allows us to do that parsing ourselves, which is faster and will give us the opportunity to merge the MODULE_DEVICE_TABLE() parsing into modpost, too.
2003-02-14kbuild: Figure endianness / word size at compile timeKai Germaschewski
The helper file2alias had to jump through a lot of hoops because it did not know the host and target endianness / word size at compile time. We now build a small header scripts/elfconfig.h which contains this information for file2alias to use.
2003-02-14kbuild: Module alias and device table supportRusty Russell
Introduces "MODULE_ALIAS" which modules can use to embed their own aliases for modprobe to use. Also adds a "finishing" step to modules to supplement their aliases based on MODULE_TABLE declarations, eg. 'usb:v0506p4601dl*dh*dc*dsc*dp*ic*isc*ip*' for drivers/usb/net/pegasus.o
2003-02-14kbuild: Do module post processing in CKai Germaschewski
Doing the module post processing using some scripting with sed/grep etc was doable, but performance is of course much better when we do it in C instead, and it also allows for easier extensibility for additional postprocessing for e.g. the MODULE_DEVICE_TABLE's. Executing the new helper "modpost" will build the additional C code for all modules at once, so we can just keep the hash table of exported symbols in memory instead of rebuilding it for every module.
2002-12-04kbuild: Fix 'make -j' problemKai Germaschewski
As pointed out by wli, all other compilation relies on fixdep to exist already. BTW, wli's benchmark numbers for the kallsyms speed-up patch: -make -j bzImage 323.03s user 157.65s system 843% cpu 57.019 total +make -j bzImage 270.02s user 147.01s system 1303% cpu 32.004 total
2002-12-04kbuild: Speed up kallsyms generationKai Germaschewski
This patch basically just replaces the scripts/kallsyms script by a scripts/kallsyms.c C program, which does the same thing much faster. It also removes duplicates and entries which are not between _stext and _etext, as they would not get used anyway. This saves about 290KB in vmlinux with my .config, more than 50% of the kallsyms bloat ;)
2002-11-22kbuild: Introduced build-targetsSam Ravnborg
build-targets is used to list targets that is always built. This allowed misuse of EXTRA_TARGETS to be deleted. built-in.o is now only created for directories defining a obj-* variable, avoiding this for scripts and lxdialog One Makefile needed a dummy obj- statement
2002-11-07[PATCH] remove old config toolsRoman Zippel
This deletes the old config tools and moves Michael's maintainer entry for them to CREDITS and I added myself for KCONFIG instead.
2002-10-29[PATCH] new kernel configuration 1/7Roman Zippel
This adds the needed kbuild changes: - support to compile host libraries and c++ programs - change config calls into kconfig
2002-10-13kbuild: More cleaning work...Kai Germaschewski
o Having .config depend on all Config.in's via a find is annoying, since it causes a long break before "make" actually gets going. Comment it out for now. o Fix some "make -j" issues with generating module versions. o Unify "make distclean" and "make mrproper", they were doing nearly the same thing anyway. o Use the new "make clean" infrastructure for arch/i386/boot/ and scripts/ o Reorganize the "make clean" stuff a little, do the find -name '*.[oas]' | xargs rm -f from the top-level Makefile again and only use the per-subdir rule for special cases like generated files, host-progs and the like.
2002-10-05Don't add the $(obj) prefix twice..Linus Torvalds
2002-10-03kbuild: Adapt mrproper targetsKai Germaschewski
Use $(call descend,..) for mrproper as well.
2002-10-03kbuild: include arch-Makefile in common placeKai Germaschewski
The top-level Makefile is separated into two parts, one which does include .config, so it can access CONFIG_FOO, and one which does not, since it may not even exist yet (make *config). However, both parts need to include arch/$(ARCH)/Makefile, be it for arch-specific settings or just for archclean/archmrproper. So we now include arch/$(ARCH)/Makefile before the config/noconfig split, which also has the advantage of giving us the arch-specific build dirs (e.g. arch/i386/{kernel,mm,lib}) in both cases. In addition, fix a couple of small glitches (make menuconfig, make modules_install, proper output when descending)
2002-10-02kbuild: Always build helpers in script/Kai Germaschewski
As noticed by Sam Ravnborg, we need the targets in scripts (fixdep, in particular) considered always, i.e. also when compiling modules.
2002-10-02kbuild: Small quirks for separate obj / src treesKai Germaschewski
Add a couple of missing $(obj) and the like. Also, remove the __chmod hack which made some files in the source tree executable - hopefully, everybody's copy is by now ;)
2002-08-16kbuild: Hand mergeKai Germaschewski
2002-08-16kbuild: Cleanup the chmod rule in scripts/Kai Germaschewski
This rule makes sure that some scripts really have the executable bit set. Since it doesn't create the sripts, they shouldn't be targets, but rather prerequisites (of a phony rule)
2002-08-16[PATCH] mrproper: Moved knowledge of files in scripts to scripts/MakefileSam Ravnborg
No reason to keep this knowledge in a central place when it can be avoided
2002-08-16[PATCH] kbuild: Moved conmakehash to scriptsSam Ravnborg
- Suggested by David Miller to avoid a race with make -j Furthermore cleaned up a little in scripts/Makefile - Use $(obj) - Added a few comments
2002-07-25[PATCH] Remove docgen + gen-all-syms targetsSam Ravnborg
Removed unused targets to CHMOD_FILES in scripts This allow a fresh kernel to start the build process without bailing about docgen.
2002-07-24[PATCH] docbook: scripts/docproc improved [5/9]Sam Ravnborg
This is the first patch in a serie to clean-up the DocBook Makefile. docproc is extented to include the functionality previously provided by gen-all-syms and docgen. Furthermore the necessity to specify which files to search for EXPORT_SYMBOL are removed, the information is now read in the .tmpl files. docproc is furthermore extended to generate dependency information. gen-all-syms and docgen are deleted.
2002-06-09kbuild: Improve output alignmentKai Germaschewski
by Sam Ravnborg