aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/kbuild/kbuild.txt (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-12-01kbuild: announce removal of SUBDIRS if usedMasahiro Yamada1-6/+1
SUBDIRS has been kept as a backward compatibility since commit ("[PATCH] kbuild: external module support") in 2002. We do not need multiple ways to do the same thing, so I will remove SUBDIRS after the Linux 5.3 release. I cleaned up in-tree code, and updated the document so that nobody would try to use it. Meanwhile, display the following warning if SUBDIRS is used. Makefile:189: ================= WARNING ================ Makefile:190: 'SUBDIRS' will be removed after Linux 5.3 Makefile:191: Please use 'M=' or 'KBUILD_EXTMOD' instead Makefile:192: ========================================== Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Boris Brezillon <boris.brezillon@bootlin.com> # for scx200_docflash.c Acked-by: Guenter Roeck <linux@roeck-us.net> # for scx200_wdt.c
2018-07-18kbuild: Use HOST*FLAGS options from the command lineLaura Abbott1-0/+16
Now that we have the rename in place, reuse the HOST*FLAGS options as something that can be set from the command line and included with the rest of the flags. Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-06kbuild: document the KBUILD_KCONFIG env. variableRandy Dunlap1-0/+5
Add usage info for the Kbuild environment variable KBUILD_KCONFIG. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-06kbuild: delete INSTALL_FW_PATH from kbuild documentationRandy Dunlap1-9/+0
Removed Kbuild documentation for INSTALL_FW_PATH. The kbuild symbol INSTALL_FW_PATH was removed from Kbuild tools in September 2017 (for 4.14) but the symbol was not deleted from the kbuild documentation, so do that now. Fixes: 5620a0d1aacd ("firmware: delete in-kernel firmware") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: stable@vger.kernel.org # 4.14+ Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-06kbuild: update ARCH alias info for sparcRandy Dunlap1-1/+1
The supported alias for building sparc 32-bit is "sparc32", not "sparc", so update the alias documentation for that. Just using "sparc" produces a 64-bit config file. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-06kbuild: update ARCH alias info for shRandy Dunlap1-0/+1
In Kbuild documentation, add alias for 64-bit sh ARCH ("sh64") to the list of ARCH aliases. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-03-26kbuild: remove internally used LDFLAGS_vmlinux from kbuild.txtMasahiro Yamada1-4/+0
Documentation/kbuild/makefiles.txt lists variables used in Makefile whereas Documentation/kbuild/kbuild.txt describes user assignable parameters given via environments or the command line. The top Makefile and arch/*/Makefile accumulate proper linker flags to LDFLAGS_vmlinux. So, users can not override it from the command line. Generally, per-file options are not supposed to be user-assignable. Remove the misleading entry from kbuild.txt. If we need a way to append user-specific flags for linking the kernel, LDFLAGS_KERNEL would be a consistent choice because we already expose LDFLAGS_MODULE counter-part to users. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-30kbuild: handle libs-y archives separately from built-in.o archivesNicholas Piggin1-2/+6
The thin archives build currently puts all lib.a and built-in.o files together and links them with --whole-archive. This works because thin archives can recursively refer to thin archives. However some architectures include libgcc.a, which may not be a thin archive, or it may not be constructed with the "P" option, in which case its contents do not get linked correctly. So don't pull .a libs into the root built-in.o archive. These libs should already have symbol tables and indexes built, so they can be direct linker inputs. Move them out of the --whole-archive option, which restore the conditional linking behaviour of lib.a to thin archives builds. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-08-07modsign: Allow password to be specified for signing keyDavid Woodhouse1-0/+5
We don't want this in the Kconfig since it might then get exposed in /proc/config.gz. So make it a parameter to Kbuild instead. This also means we don't have to jump through hoops to strip quotes from it, as we would if it was a config option. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
2012-05-05kbuild: document KBUILD_LDS, KBUILD_VMLINUX_{INIT,MAIN} and LDFLAGS_vmlinuxSam Ravnborg1-0/+19
Newly exported variables - used by link-vmlinux.sh Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds1-0/+13
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: kbuild: make KBUILD_NOCMDDEP=1 handle empty built-in.o scripts/kallsyms.c: fix potential segfault scripts/gen_initramfs_list.sh: Convert to a /bin/sh script kbuild: Fix GNU make v3.80 compatibility kbuild: Fix passing -Wno-* options to gcc 4.4+ kbuild: move scripts/basic/docproc.c to scripts/docproc.c kbuild: Fix Makefile.asm-generic for um kbuild: Allow to combine multiple W= levels kbuild: Disable -Wunused-but-set-variable for gcc 4.6.0 Fix handling of backlash character in LINUX_COMPILE_BY name kbuild: asm-generic support kbuild: implement several W= levels kbuild: Fix build with binutils <= 2.19 initramfs: Use KBUILD_BUILD_TIMESTAMP for generated entries kbuild: Allow to override LINUX_COMPILE_BY and LINUX_COMPILE_HOST macros kbuild: Drop unused LINUX_COMPILE_TIME and LINUX_COMPILE_DOMAIN macros kbuild: Use the deterministic mode of ar kbuild: Call gzip with -n kbuild: move KALLSYMS_EXTRA_PASS from Kconfig to Makefile Kconfig: improve KALLSYMS_ALL documentation Fix up trivial conflict in Makefile
2011-04-18initramfs: Use KBUILD_BUILD_TIMESTAMP for generated entriesMichal Marek1-1/+2
gen_init_cpio gets the current time and uses it for each symlink, special file, and directory. Grab the current time once and make it possible to override it with the KBUILD_BUILD_TIMESTAMP variable for reproducible builds. Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-18kbuild: Allow to override LINUX_COMPILE_BY and LINUX_COMPILE_HOST macrosMichal Marek1-0/+12
Make it possible to override the user@host string displayed during boot and in /proc/version by the environment variables KBUILD_BUILD_USER and KBUILD_BUILD_HOST. Several distributions patch scripts/mkcompile_h to achieve this, so let's provide an official way. Also, document the KBUILD_BUILD_TIMESTAMP variable while at it. Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-03-31Fix common misspellingsLucas De Marchi1-4/+4
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-21Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds1-0/+5
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: kbuild: Make DEBUG_SECTION_MISMATCH selectable, but not on by default genksyms: Regenerate lexer and parser genksyms: Track changes to enum constants genksyms: simplify usage of find_symbol() genksyms: Add helpers for building string lists genksyms: Simplify printing of symbol types genksyms: Simplify lexer genksyms: Do not paste the bison header file to lex.c modpost: fix trailing comma KBuild: silence "'scripts/unifdef' is up to date." kbuild: Add extra gcc checks kbuild: reenable section mismatch analysis unifdef: update to upstream version 2.5
2011-03-09kbuild: Add extra gcc checksBorislav Petkov1-0/+5
Add a 'W=1' Makefile switch which adds additional checking per build object. The idea behind this option is targeted at developers who, in the process of writing their code, want to do the occasional make W=1 [target.o] and let gcc do more extensive code checking for them. Then, they could eyeball the output for valid gcc warnings about various bugs/discrepancies which are not reported during the normal build process. For more background information and a use case, read through this thread: http://marc.info/?l=kernel-janitors&m=129802065918147&w=2 Cc: Michal Marek <mmarek@suse.cz> Cc: linux-kbuild@vger.kernel.org Acked-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-02-17kbuild, mtd, net: a few comment typo fixes and rewordingGilles Espinasse1-1/+1
Signed-off-by: Gilles Espinasse <g.esp@free.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-10Merge branch 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds1-0/+8
* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: deb-pkg: s/hdr/kernel_headers_/ && s/header/libc_headers_/ deb-pkg: Make deb-pkg generate a seperate linux-libc-dev deb kbuild: create linux-headers package in deb-pkg kbuild, deb-pkg: support overriding userland architecture kbuild, deb-pkg: select userland architecture based on UTS_MACHINE kbuild, deb-pkg: Fix build with paranoid umask
2010-12-20kbuild, deb-pkg: support overriding userland architectureAsbjoern Sloth Toennesen1-0/+8
Usefull if building for sparc64 userland, because the sparc and sparc64 userlands use the same 64-bit kernel, making it impossible to always select the correct userland architecture for the resulting debian package. Might also be usefull, if you want a i386 userland with a amd64 kernel. Example usage: make KBUILD_DEBARCH=i386 deb-pkg LKML-reference: <alpine.DEB.2.02.1011051437500.13287@aurora.sdinet.de> Signed-off-by: Asbjoern Sloth Toennesen <asbjorn@asbjorn.biz> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Acked-by: maximilian attems <max@stro.at> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-05Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6Linus Torvalds1-2/+24
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: modpost: support objects with more than 64k sections trivial: fix a typo in a filename frv: clean up arch/frv/Makefile kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command line kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line Kbuild: Add option to set -femit-struct-debug-baseonly Makefile: "make kernelrelease" should show the correct full kernel version Makefile.build: make KBUILD_SYMTYPES work again
2010-08-05Documentation: fix kbuild typos and wordingNicolas Kaiser1-4/+4
Fixed some typos and wording. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-03kbuild: allow assignment to {A,C}FLAGS_KERNEL on the command lineSam Ravnborg1-0/+10
It is now possible to assign options to AS and CC on the command line - which is only used for built-in code. {A,C}FLAGS_KERNEL was used both in the top-level Makefile in the arch makefiles, thus users had no way to specify additional options to AS, CC without overriding the original value. Introduce a new set of variables KBUILD_{A,C}FLAGS_KERNEL that is used by arch specific files and free up {A,C}FLAGS_KERNEL so they can be assigned on the command line. All arch Makefiles that used the old variables has been updated. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-03kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command lineSam Ravnborg1-2/+14
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: Sam 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: Michal Marek <mmarek@suse.cz>
2010-03-03tags: Add the ability to make tags for all archs using "all"John Kacur1-0/+4
make ALLSOURCE_ARCHS=all tags - Document this in kbuild.txt Without this change you have to type each arch separately. Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-02-17kbuild: fix a couple of typos in DocumentationKirill Smelkov1-1/+1
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12kbuild: generate modules.builtinMichal Marek1-0/+14
To make it easier for module-init-tools and scripts like mkinitrd to distinguish builtin and missing modules, install a modules.builtin file listing all builtin modules. This is done by generating an additional config file (tristate.conf) with tristate options set to uppercase 'Y' or 'M'. If we source that config file, the builtin modules appear in obj-Y. Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-09-20kbuild: use INSTALLKERNEL to select customized installkernel scriptSam Ravnborg1-0/+16
Replace the use of CROSS_COMPILE to select a customized installkernel script with the possibility to set INSTALLKERNEL to select a custom installkernel script when running make: make INSTALLKERNEL=arm-installkernel install With this patch we are now more consistent across different architectures - they did not all support use of CROSS_COMPILE. The use of CROSS_COMPILE was a hack as this really belongs to gcc/binutils and the installkernel script does not change just because we change toolchain. The use of CROSS_COMPILE caused troubles with an upcoming patch that saves CROSS_COMPILE when a kernel is built - it would no longer be installable. [Thanks to Peter Z. for this hint] This patch undos what Ian did in commit: 0f8e2d62fa04441cd12c08ce521e84e5bd3f8a46 ("use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh") The patch has been lightly tested on x86 only - but all changes looks obvious. Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin] Acked-by: Russell King <linux@arm.linux.org.uk> [arm] Acked-by: Paul Mundt <lethal@linux-sh.org> [sh] Acked-by: "H. Peter Anvin" <hpa@zytor.com> [x86] Cc: Ian Campbell <icampbell@arcom.com> Cc: Tony Luck <tony.luck@intel.com> [ia64] Cc: Fenghua Yu <fenghua.yu@intel.com> [ia64] Cc: Hirokazu Takata <takata@linux-m32r.org> [m32r] Cc: Geert Uytterhoeven <geert@linux-m68k.org> [m68k] Cc: Kyle McMartin <kyle@mcmartin.ca> [parisc] Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> [powerpc] Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390] Cc: Thomas Gleixner <tglx@linutronix.de> [x86] Cc: Ingo Molnar <mingo@redhat.com> [x86] Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-14kbuild: fix kbuild.txt typosRandy Dunlap1-14/+15
Fix typos in the new kbuild.txt file. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-07kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscopeJike Song1-0/+7
This patch reintroduce the ALLSOURCE_ARCHS support for tags/TAGS/ cscope targets. The Kbuild previously has this feature, but after moving the targets into scripts/tags.sh, ALLSOURCE_ARCHS disappears. It's something like this: $ make ALLSOURCE_ARCHS="x86 mips arm" tags cscope Signed-off-by: Jike Song <albcamus@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-02kbuild: document environment variablesSam Ravnborg1-0/+126
Add kbuild.txt to Documentation/kbuild More stuff can be added later - at least we have som of the varous environment variables documented now. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>