diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 08:01:25 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 08:01:25 -0400 |
commit | d7f6884ae0ae6e406ec3500fcde16e8f51642460 (patch) | |
tree | efceb246a4fa12921b7dbd3946a88fa257684405 /init | |
parent | cd28ab6a4e50a7601d22752aa7ce0c8197b10bdf (diff) | |
parent | 2f4ba45a75d6383b4a1201169a808ffea416ffa0 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 22 | ||||
-rw-r--r-- | init/Makefile | 3 | ||||
-rw-r--r-- | init/do_mounts.c | 6 | ||||
-rw-r--r-- | init/main.c | 41 |
4 files changed, 58 insertions, 14 deletions
diff --git a/init/Kconfig b/init/Kconfig index 05a75c4f5ce2..d5a1a1228fab 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -77,6 +77,22 @@ config LOCALVERSION | |||
77 | object and source tree, in that order. Your total string can | 77 | object and source tree, in that order. Your total string can |
78 | be a maximum of 64 characters. | 78 | be a maximum of 64 characters. |
79 | 79 | ||
80 | config LOCALVERSION_AUTO | ||
81 | bool "Automatically append version information to the version string" | ||
82 | default y | ||
83 | help | ||
84 | This will try to automatically determine if the current tree is a | ||
85 | release tree by looking for git tags that | ||
86 | belong to the current top of tree revision. | ||
87 | |||
88 | A string of the format -gxxxxxxxx will be added to the localversion | ||
89 | if a git based tree is found. The string generated by this will be | ||
90 | appended after any matching localversion* files, and after the value | ||
91 | set in CONFIG_LOCALVERSION | ||
92 | |||
93 | Note: This requires Perl, and a git repository, but not necessarily | ||
94 | the git or cogito tools to be installed. | ||
95 | |||
80 | config SWAP | 96 | config SWAP |
81 | bool "Support for paging of anonymous memory (swap)" | 97 | bool "Support for paging of anonymous memory (swap)" |
82 | depends on MMU | 98 | depends on MMU |
@@ -238,6 +254,8 @@ config CPUSETS | |||
238 | 254 | ||
239 | Say N if unsure. | 255 | Say N if unsure. |
240 | 256 | ||
257 | source "usr/Kconfig" | ||
258 | |||
241 | menuconfig EMBEDDED | 259 | menuconfig EMBEDDED |
242 | bool "Configure standard kernel features (for small systems)" | 260 | bool "Configure standard kernel features (for small systems)" |
243 | help | 261 | help |
@@ -260,8 +278,8 @@ config KALLSYMS_ALL | |||
260 | help | 278 | help |
261 | Normally kallsyms only contains the symbols of functions, for nicer | 279 | Normally kallsyms only contains the symbols of functions, for nicer |
262 | OOPS messages. Some debuggers can use kallsyms for other | 280 | OOPS messages. Some debuggers can use kallsyms for other |
263 | symbols too: say Y here to include all symbols, and you | 281 | symbols too: say Y here to include all symbols, if you need them |
264 | don't care about adding 300k to the size of your kernel. | 282 | and you don't care about adding 300k to the size of your kernel. |
265 | 283 | ||
266 | Say N. | 284 | Say N. |
267 | 285 | ||
diff --git a/init/Makefile b/init/Makefile index 93a53fbdbe79..a2300078f2b7 100644 --- a/init/Makefile +++ b/init/Makefile | |||
@@ -25,4 +25,5 @@ $(obj)/version.o: include/linux/compile.h | |||
25 | 25 | ||
26 | include/linux/compile.h: FORCE | 26 | include/linux/compile.h: FORCE |
27 | @echo ' CHK $@' | 27 | @echo ' CHK $@' |
28 | @$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)" | 28 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ |
29 | "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)" | ||
diff --git a/init/do_mounts.c b/init/do_mounts.c index 4e11a9aaf14a..b27c11064409 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -127,10 +127,10 @@ fail: | |||
127 | * used when disk name of partitioned disk ends on a digit. | 127 | * used when disk name of partitioned disk ends on a digit. |
128 | * | 128 | * |
129 | * If name doesn't have fall into the categories above, we return 0. | 129 | * If name doesn't have fall into the categories above, we return 0. |
130 | * Driverfs is used to check if something is a disk name - it has | 130 | * Sysfs is used to check if something is a disk name - it has |
131 | * all known disks under bus/block/devices. If the disk name | 131 | * all known disks under bus/block/devices. If the disk name |
132 | * contains slashes, name of driverfs node has them replaced with | 132 | * contains slashes, name of sysfs node has them replaced with |
133 | * bangs. try_name() does the actual checks, assuming that driverfs | 133 | * bangs. try_name() does the actual checks, assuming that sysfs |
134 | * is mounted on rootfs /sys. | 134 | * is mounted on rootfs /sys. |
135 | */ | 135 | */ |
136 | 136 | ||
diff --git a/init/main.c b/init/main.c index c9c311cf1771..f142d4035341 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/rmap.h> | 47 | #include <linux/rmap.h> |
48 | #include <linux/mempolicy.h> | 48 | #include <linux/mempolicy.h> |
49 | #include <linux/key.h> | 49 | #include <linux/key.h> |
50 | #include <net/sock.h> | ||
50 | 51 | ||
51 | #include <asm/io.h> | 52 | #include <asm/io.h> |
52 | #include <asm/bugs.h> | 53 | #include <asm/bugs.h> |
@@ -80,7 +81,6 @@ | |||
80 | static int init(void *); | 81 | static int init(void *); |
81 | 82 | ||
82 | extern void init_IRQ(void); | 83 | extern void init_IRQ(void); |
83 | extern void sock_init(void); | ||
84 | extern void fork_init(unsigned long); | 84 | extern void fork_init(unsigned long); |
85 | extern void mca_init(void); | 85 | extern void mca_init(void); |
86 | extern void sbus_init(void); | 86 | extern void sbus_init(void); |
@@ -123,6 +123,7 @@ extern void softirq_init(void); | |||
123 | char saved_command_line[COMMAND_LINE_SIZE]; | 123 | char saved_command_line[COMMAND_LINE_SIZE]; |
124 | 124 | ||
125 | static char *execute_command; | 125 | static char *execute_command; |
126 | static char *ramdisk_execute_command; | ||
126 | 127 | ||
127 | /* Setup configured maximum number of CPUs to activate */ | 128 | /* Setup configured maximum number of CPUs to activate */ |
128 | static unsigned int max_cpus = NR_CPUS; | 129 | static unsigned int max_cpus = NR_CPUS; |
@@ -297,6 +298,18 @@ static int __init init_setup(char *str) | |||
297 | } | 298 | } |
298 | __setup("init=", init_setup); | 299 | __setup("init=", init_setup); |
299 | 300 | ||
301 | static int __init rdinit_setup(char *str) | ||
302 | { | ||
303 | unsigned int i; | ||
304 | |||
305 | ramdisk_execute_command = str; | ||
306 | /* See "auto" comment in init_setup */ | ||
307 | for (i = 1; i < MAX_INIT_ARGS; i++) | ||
308 | argv_init[i] = NULL; | ||
309 | return 1; | ||
310 | } | ||
311 | __setup("rdinit=", rdinit_setup); | ||
312 | |||
300 | extern void setup_arch(char **); | 313 | extern void setup_arch(char **); |
301 | 314 | ||
302 | #ifndef CONFIG_SMP | 315 | #ifndef CONFIG_SMP |
@@ -614,6 +627,7 @@ static void do_pre_smp_initcalls(void) | |||
614 | migration_init(); | 627 | migration_init(); |
615 | #endif | 628 | #endif |
616 | spawn_ksoftirqd(); | 629 | spawn_ksoftirqd(); |
630 | spawn_softlockup_task(); | ||
617 | } | 631 | } |
618 | 632 | ||
619 | static void run_init_process(char *init_filename) | 633 | static void run_init_process(char *init_filename) |
@@ -680,10 +694,14 @@ static int init(void * unused) | |||
680 | * check if there is an early userspace init. If yes, let it do all | 694 | * check if there is an early userspace init. If yes, let it do all |
681 | * the work | 695 | * the work |
682 | */ | 696 | */ |
683 | if (sys_access((const char __user *) "/init", 0) == 0) | 697 | |
684 | execute_command = "/init"; | 698 | if (!ramdisk_execute_command) |
685 | else | 699 | ramdisk_execute_command = "/init"; |
700 | |||
701 | if (sys_access((const char __user *) ramdisk_execute_command, 0) != 0) { | ||
702 | ramdisk_execute_command = NULL; | ||
686 | prepare_namespace(); | 703 | prepare_namespace(); |
704 | } | ||
687 | 705 | ||
688 | /* | 706 | /* |
689 | * Ok, we have completed the initial bootup, and | 707 | * Ok, we have completed the initial bootup, and |
@@ -700,17 +718,24 @@ static int init(void * unused) | |||
700 | 718 | ||
701 | (void) sys_dup(0); | 719 | (void) sys_dup(0); |
702 | (void) sys_dup(0); | 720 | (void) sys_dup(0); |
703 | 721 | ||
722 | if (ramdisk_execute_command) { | ||
723 | run_init_process(ramdisk_execute_command); | ||
724 | printk(KERN_WARNING "Failed to execute %s\n", | ||
725 | ramdisk_execute_command); | ||
726 | } | ||
727 | |||
704 | /* | 728 | /* |
705 | * We try each of these until one succeeds. | 729 | * We try each of these until one succeeds. |
706 | * | 730 | * |
707 | * The Bourne shell can be used instead of init if we are | 731 | * The Bourne shell can be used instead of init if we are |
708 | * trying to recover a really broken machine. | 732 | * trying to recover a really broken machine. |
709 | */ | 733 | */ |
710 | 734 | if (execute_command) { | |
711 | if (execute_command) | ||
712 | run_init_process(execute_command); | 735 | run_init_process(execute_command); |
713 | 736 | printk(KERN_WARNING "Failed to execute %s. Attempting " | |
737 | "defaults...\n", execute_command); | ||
738 | } | ||
714 | run_init_process("/sbin/init"); | 739 | run_init_process("/sbin/init"); |
715 | run_init_process("/etc/init"); | 740 | run_init_process("/etc/init"); |
716 | run_init_process("/bin/init"); | 741 | run_init_process("/bin/init"); |