On Mon, 14 Oct 2002 10:18:49 -0700 (PDT),
Christian Lambert <clambert@xxxxxxx> wrote:
>I didn't apply the kdb patch because it had a problem patching main.c
>from the stock debian kernel (which is very close to kernel.org).
>
>patching file init/main.c
>Hunk #2 FAILED at 255.
>Hunk #3 succeeded at 448 (offset 18 lines).
>1 out of 3 hunks FAILED -- saving rejects to file init/main.c.rej
That would be this patch against parse_options(). Hand edit
init/main.c, find parse_options(), find init= and insert the kdb chunk
(from #ifdef CONFIG_KDB down to #endif, minus the leading '+')
immediately before that point.
Index: 19.1/init/main.c
--- 19.1/init/main.c Wed, 29 May 2002 14:00:22 +1000 kaos
(linux-2.4/k/11_main.c 1.1.5.1.1.8.1.3.1.9.1.4 644)
+++ 19.13/init/main.c Tue, 09 Apr 2002 11:23:13 +1000 kaos
(linux-2.4/k/11_main.c 1.2.1.1.1.20 644)
@@ -251,6 +255,34 @@ static void __init parse_options(char *l
}
if (next != NULL)
*next++ = 0;
+#ifdef CONFIG_KDB
+ /* kdb, kdb=on, kdb=off, kdb=early */
+ if (strncmp(line, "kdb", 3) == 0) {
+ if (line[3] == '\0') {
+ /* Backward compatibility, kdb with no option
means early activation */
+ printk("Boot flag kdb with no options is
obsolete, use kdb=early\n");
+ kdb_on = 1;
+ kdb_flags |= KDB_FLAG_EARLYKDB;
+ continue;
+ }
+ if (line[3] == '=') {
+ if (strcmp(line+4, "on") == 0) {
+ kdb_on = 1;
+ continue;
+ }
+ if (strcmp(line+4, "off") == 0) {
+ kdb_on = 0;
+ continue;
+ }
+ if (strcmp(line+4, "early") == 0) {
+ kdb_on = 1;
+ kdb_flags |= KDB_FLAG_EARLYKDB;
+ continue;
+ }
+ printk("Boot flag %s not recognised, assumed to
be environment variable\n", line);
+ }
+ }
+#endif /* CONFIG_KDB */
if (!strncmp(line,"init=",5)) {
line += 5;
execute_command = line;
|