From bd5bdd875b29e882f80d2cd6dd1da468641dad2a Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Thu, 14 Jul 2005 20:18:07 +0000 Subject: kbuild: "PREEMPT" in UTS_VERSION From: Matt Mackall Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make preempt kernels easily identifiable. Added SMP PREEMPT as comment in compile.h to force it to be updated when they change (sam). Signed-off-by: Matt Mackall Signed-off-by: Sam Ravnborg --- init/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'init') diff --git a/init/Makefile b/init/Makefile index 93a53fbdbe7963..a2300078f2b7d9 100644 --- a/init/Makefile +++ b/init/Makefile @@ -25,4 +25,5 @@ $(obj)/version.o: include/linux/compile.h include/linux/compile.h: FORCE @echo ' CHK $@' - @$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)" + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ + "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)" -- cgit 1.2.3-korg From f9f97bc014d7402cd2d135e20bcd25dfec93257b Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Wed, 20 Jul 2005 05:43:05 +0200 Subject: [PATCH] kallsyms: clarify KALLSYMS_ALL help text Clarify the KALLSYMS_ALL help text slightly. Signed-off-by: Jesper Juhl --- init/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init') diff --git a/init/Kconfig b/init/Kconfig index 75755ef50c899e..abaaa7748dd199 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -260,8 +260,8 @@ config KALLSYMS_ALL help Normally kallsyms only contains the symbols of functions, for nicer OOPS messages. Some debuggers can use kallsyms for other - symbols too: say Y here to include all symbols, and you - don't care about adding 300k to the size of your kernel. + symbols too: say Y here to include all symbols, if you need them + and you don't care about adding 300k to the size of your kernel. Say N. -- cgit 1.2.3-korg From dbec486632d2303f5c0e75af7a8473fa4c4a145a Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Wed, 10 Aug 2005 20:44:50 +0200 Subject: kconfig: move initramfs options to General Setup Move initramfs options from Device Drivers | Block Drivers to General Setup This is a more natural place for this option. Furthermore separate out intramfs options to usr/Kconfig Signed-off-by: Sam Ravnborg --- drivers/block/Kconfig | 42 ------------------------------------------ init/Kconfig | 2 ++ usr/Kconfig | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 42 deletions(-) create mode 100644 usr/Kconfig (limited to 'init') diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index b594768b0241f3..7cd7bf35d0285b 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -408,48 +408,6 @@ config BLK_DEV_INITRD "real" root file system, etc. See for details. -config INITRAMFS_SOURCE - string "Initramfs source file(s)" - default "" - help - This can be either a single cpio archive with a .cpio suffix or a - space-separated list of directories and files for building the - initramfs image. A cpio archive should contain a filesystem archive - to be used as an initramfs image. Directories should contain a - filesystem layout to be included in the initramfs image. Files - should contain entries according to the format described by the - "usr/gen_init_cpio" program in the kernel tree. - - When multiple directories and files are specified then the - initramfs image will be the aggregate of all of them. - - See Date: Sun, 31 Jul 2005 04:57:49 -0400 Subject: [PATCH] kbuild: automatically append a short string to the version based upon the git commit If CONFIG_AUTO_LOCALVERSION is set, the user is using a git-based tree, and the current HEAD is not referred to by any tags in .git/refs/tags/, append -g and the first 8 characters of the commit to the version string. This makes it easier to use git-bisect, and/or to do a daily build, without trampling on your older, working builds, or accidentally setting up conflicting sets of modules. Signed-off-by: Ryan Anderson Signed-off-by: Sam Ravnborg --- Makefile | 20 ++++++++++++++++++ init/Kconfig | 16 ++++++++++++++ scripts/setlocalversion | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 scripts/setlocalversion (limited to 'init') diff --git a/Makefile b/Makefile index d01b004a2a0e74..c6aae86a02cdb1 100644 --- a/Makefile +++ b/Makefile @@ -548,6 +548,26 @@ export KBUILD_IMAGE ?= vmlinux # images. Default is /boot, but you can set it to other values export INSTALL_PATH ?= /boot +# If CONFIG_LOCALVERSION_AUTO is set, we automatically perform some tests +# and try to determine if the current source tree is a release tree, of any sort, +# or if is a pure development tree. +# +# A 'release tree' is any tree with a git TAG associated +# with it. The primary goal of this is to make it safe for a native +# git/CVS/SVN user to build a release tree (i.e, 2.6.9) and also to +# continue developing against the current Linus tree, without having the Linus +# tree overwrite the 2.6.9 tree when installed. +# +# Currently, only git is supported. +# Other SCMs can edit scripts/setlocalversion and add the appropriate +# checks as needed. + + +ifdef CONFIG_LOCALVERSION_AUTO + localversion-auto := $(shell $(PERL) $(srctree)/scripts/setlocalversion $(srctree)) + LOCALVERSION := $(LOCALVERSION)$(localversion-auto) +endif + # # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory # relocations required by build roots. This is not defined in the diff --git a/init/Kconfig b/init/Kconfig index eb86972be1c23d..f27fc48c1fdc80 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -77,6 +77,22 @@ config LOCALVERSION object and source tree, in that order. Your total string can be a maximum of 64 characters. +config LOCALVERSION_AUTO + bool "Automatically append version information to the version string" + default y + help + This will try to automatically determine if the current tree is a + release tree by looking for git tags that + belong to the current top of tree revision. + + A string of the format -gxxxxxxxx will be added to the localversion + if a git based tree is found. The string generated by this will be + appended after any matching localversion* files, and after the value + set in CONFIG_LOCALVERSION + + Note: This requires Perl, and a git repository, but not necessarily + the git or cogito tools to be installed. + config SWAP bool "Support for paging of anonymous memory (swap)" depends on MMU diff --git a/scripts/setlocalversion b/scripts/setlocalversion new file mode 100644 index 00000000000000..7c805c8fccd26b --- /dev/null +++ b/scripts/setlocalversion @@ -0,0 +1,56 @@ +#!/usr/bin/perl +# Copyright 2004 - Ryan Anderson GPL v2 + +use strict; +use warnings; +use Digest::MD5; +require 5.006; + +if (@ARGV != 1) { + print < +EOT + exit(1); +} + +my ($srctree) = @ARGV; +chdir($srctree); + +my @LOCALVERSIONS = (); + +# We are going to use the following commands to try and determine if this +# repository is at a Version boundary (i.e, 2.6.10 vs 2.6.10 + some patches) We +# currently assume that all meaningful version boundaries are marked by a tag. +# We don't care what the tag is, just that something exists. + +# Git/Cogito store the top-of-tree "commit" in .git/HEAD +# A list of known tags sits in .git/refs/tags/ +# +# The simple trick here is to just compare the two of these, and if we get a +# match, return nothing, otherwise, return a subset of the SHA-1 hash in +# .git/HEAD + +sub do_git_checks { + open(H,"<.git/HEAD") or return; + my $head = ; + chomp $head; + close(H); + + opendir(D,".git/refs/tags") or return; + foreach my $tagfile (grep !/^\.{1,2}$/, readdir(D)) { + open(F,"<.git/refs/tags/" . $tagfile) or return; + my $tag = ; + chomp $tag; + close(F); + return if ($tag eq $head); + } + closedir(D); + + push @LOCALVERSIONS, "g" . substr($head,0,8); +} + +if ( -d ".git") { + do_git_checks(); +} + +printf "-%s\n", join("-",@LOCALVERSIONS) if (scalar @LOCALVERSIONS > 0); -- cgit 1.2.3-korg