diff -urN -x .svn kconfig-2.6.14/conf.c kconfig/conf.c --- kconfig-2.6.14/conf.c 2005-11-28 16:50:06.000000000 +0100 +++ kconfig/conf.c 2005-11-29 12:56:10.000000000 +0100 @@ -13,6 +13,8 @@ #define LKC_DIRECT_LINK #include "lkc.h" +extern int dep_output; + static void conf(struct menu *menu); static void check_conf(struct menu *menu); @@ -493,6 +495,10 @@ case 'o': input_mode = ask_new; break; + case 'O': + input_mode = ask_new; + dep_output = 1; + break; case 's': input_mode = ask_silent; valid_stdin = isatty(0) && isatty(1) && isatty(2); diff -urN -x .svn kconfig-2.6.14/confdata.c kconfig/confdata.c --- kconfig-2.6.14/confdata.c 2005-11-28 16:50:06.000000000 +0100 +++ kconfig/confdata.c 2005-11-29 12:58:47.000000000 +0100 @@ -16,13 +16,10 @@ const char conf_def_filename[] = ".config"; -const char conf_defname[] = "arch/$ARCH/defconfig"; +const char conf_defname[] = "defconfig"; const char *conf_confnames[] = { ".config", - "/lib/modules/$UNAME_RELEASE/.config", - "/etc/kernel-config", - "/boot/config-$UNAME_RELEASE", conf_defname, NULL, }; @@ -119,17 +116,17 @@ sym = NULL; switch (line[0]) { case '#': - if (memcmp(line + 2, "CONFIG_", 7)) + if (memcmp(line + 2, CFGSYM, CFGSYMLEN)) continue; - p = strchr(line + 9, ' '); + p = strchr(line + CFGSYMLEN + 2, ' '); if (!p) continue; *p++ = 0; if (strncmp(p, "is not set", 10)) continue; - sym = sym_find(line + 9); + sym = sym_find(line + CFGSYMLEN+2); if (!sym) { - fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 9); + fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + CFGSYMLEN+2); break; } switch (sym->type) { @@ -142,19 +139,19 @@ ; } break; - case 'C': - if (memcmp(line, "CONFIG_", 7)) + case CFGSYMFC: + if (memcmp(line, CFGSYM, CFGSYMLEN)) continue; - p = strchr(line + 7, '='); + p = strchr(line + CFGSYMLEN, '='); if (!p) continue; *p++ = 0; p2 = strchr(p, '\n'); if (p2) *p2 = 0; - sym = sym_find(line + 7); + sym = sym_find(line + CFGSYMLEN); if (!sym) { - fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 7); + fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + CFGSYMLEN); break; } switch (sym->type) { @@ -305,8 +302,6 @@ if (!out_h) return 1; } - sym = sym_lookup("KERNELRELEASE", 0); - sym_calc_value(sym); time(&now); env = getenv("KCONFIG_NOTIMESTAMP"); if (env && *env) @@ -314,20 +309,20 @@ fprintf(out, _("#\n" "# Automatically generated make config: don't edit\n" - "# Linux kernel version: %s\n" + "# %s version: %s\n" "%s%s" "#\n"), - sym_get_string_value(sym), + getenv("PROJECT"), getenv("FULLVERSION"), use_timestamp ? "# " : "", use_timestamp ? ctime(&now) : ""); if (out_h) fprintf(out_h, "/*\n" " * Automatically generated C config: don't edit\n" - " * Linux kernel version: %s\n" + " * %s version: %s\n" "%s%s" " */\n" "#define AUTOCONF_INCLUDED\n", - sym_get_string_value(sym), + getenv("PROJECT"), getenv("FULLVERSION"), use_timestamp ? " * " : "", use_timestamp ? ctime(&now) : ""); @@ -366,28 +361,28 @@ case S_TRISTATE: switch (sym_get_tristate_value(sym)) { case no: - fprintf(out, "# CONFIG_%s is not set\n", sym->name); + fprintf(out, "# " CFGSYM "%s is not set\n", sym->name); if (out_h) - fprintf(out_h, "#undef CONFIG_%s\n", sym->name); + fprintf(out_h, "#undef " CFGSYM "%s\n", sym->name); break; case mod: - fprintf(out, "CONFIG_%s=m\n", sym->name); + fprintf(out, CFGSYM "%s=m\n", sym->name); if (out_h) - fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name); + fprintf(out_h, "#define " CFGSYM "%s_MODULE 1\n", sym->name); break; case yes: - fprintf(out, "CONFIG_%s=y\n", sym->name); + fprintf(out, CFGSYM "%s=y\n", sym->name); if (out_h) - fprintf(out_h, "#define CONFIG_%s 1\n", sym->name); + fprintf(out_h, "#define " CFGSYM "%s 1\n", sym->name); break; } break; case S_STRING: // fix me str = sym_get_string_value(sym); - fprintf(out, "CONFIG_%s=\"", sym->name); + fprintf(out, CFGSYM "%s=\"", sym->name); if (out_h) - fprintf(out_h, "#define CONFIG_%s \"", sym->name); + fprintf(out_h, "#define " CFGSYM "%s \"", sym->name); do { l = strcspn(str, "\"\\"); if (l) { @@ -410,16 +405,16 @@ case S_HEX: str = sym_get_string_value(sym); if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) { - fprintf(out, "CONFIG_%s=%s\n", sym->name, str); + fprintf(out, CFGSYM "%s=%s\n", sym->name, str); if (out_h) - fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str); + fprintf(out_h, "#define " CFGSYM "%s 0x%s\n", sym->name, str); break; } case S_INT: str = sym_get_string_value(sym); - fprintf(out, "CONFIG_%s=%s\n", sym->name, str); + fprintf(out, CFGSYM "%s=%s\n", sym->name, str); if (out_h) - fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str); + fprintf(out_h, "#define " CFGSYM "%s %s\n", sym->name, str); break; } } diff -urN -x .svn kconfig-2.6.14/gconf.c kconfig/gconf.c --- kconfig-2.6.14/gconf.c 2005-11-28 16:50:06.000000000 +0100 +++ kconfig/gconf.c 2005-11-29 12:59:41.000000000 +0100 @@ -275,8 +275,9 @@ /*"style", PANGO_STYLE_OBLIQUE, */ NULL); - sprintf(title, _("Linux Kernel v%s Configuration"), - getenv("KERNELRELEASE")); + sprintf(title, "%s v%s Configuration", + getenv("PROJECT"), getenv("FULLVERSION")); + gtk_window_set_title(GTK_WINDOW(main_wnd), title); gtk_widget_show(main_wnd); diff -urN -x .svn kconfig-2.6.14/.gitignore kconfig/.gitignore --- kconfig-2.6.14/.gitignore 2005-11-28 16:50:06.000000000 +0100 +++ kconfig/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -# -# Generated files -# -config* -lex.*.c -*.tab.c -*.tab.h - -# -# configuration programs -# -conf -mconf -qconf -gconf -kxgettext diff -urN -x .svn kconfig-2.6.14/lkc.h kconfig/lkc.h --- kconfig-2.6.14/lkc.h 2005-11-28 16:50:06.000000000 +0100 +++ kconfig/lkc.h 2005-11-29 12:56:10.000000000 +0100 @@ -24,6 +24,12 @@ #undef P #define SRCTREE "srctree" +#define CFGSYM "PTXCONF_" +#define CFGSYMFC 'P' +#define CFGSYMLEN 8 +#define RELEASESYM "FULLVERSION" +#define RELEASENAME "PTXdist" + #define PACKAGE "linux" #define LOCALEDIR "/usr/share/locale" diff -urN -x .svn kconfig-2.6.14/mconf.c kconfig/mconf.c --- kconfig-2.6.14/mconf.c 2005-11-28 16:50:06.000000000 +0100 +++ kconfig/mconf.c 2005-11-29 13:05:04.000000000 +0100 @@ -29,7 +29,7 @@ static const char mconf_readme[] = N_( "Overview\n" "--------\n" -"Some kernel features may be built directly into the kernel.\n" +"Some features may be built directly.\n" "Some may be made into loadable runtime modules. Some features\n" "may be completely removed altogether. There are also certain\n" "kernel parameters which are not really features, but must be\n" @@ -115,7 +115,7 @@ "-----------------------------\n" "Menuconfig supports the use of alternate configuration files for\n" "those who, for various reasons, find it necessary to switch\n" -"between different kernel configurations.\n" +"between different configurations.\n" "\n" "At the end of the main menu you will find two options. One is\n" "for saving the current configuration to a file of your choosing.\n" @@ -148,7 +148,7 @@ "\n" "Optional personality available\n" "------------------------------\n" -"If you prefer to have all of the kernel options listed in a single\n" +"If you prefer to have all of the options listed in a single\n" "menu, rather than the default multimenu hierarchy, run the menuconfig\n" "with MENUCONFIG_MODE environment variable set to single_menu. Example:\n" "\n" @@ -186,18 +186,18 @@ "This feature depends on another which has been configured as a module.\n" "As a result, this feature will be built as a module."), nohelp_text[] = N_( - "There is no help available for this kernel option.\n"), + "There is no help available for this option.\n"), load_config_text[] = N_( "Enter the name of the configuration file you wish to load. " "Accept the name shown to restore the configuration you " "last retrieved. Leave blank to abort."), load_config_help[] = N_( "\n" - "For various reasons, one may wish to keep several different kernel\n" + "For various reasons, one may wish to keep several different \n" "configurations available on a single machine.\n" "\n" "If you have saved a previous configuration in a file other than the\n" - "kernel's default, entering the name of the file here will allow you\n" + "project's default, entering the name of the file here will allow you\n" "to modify that configuration.\n" "\n" "If you are uncertain, then you have probably never used alternate\n" @@ -207,7 +207,7 @@ "as an alternate. Leave blank to abort."), save_config_help[] = N_( "\n" - "For various reasons, one may wish to keep different kernel\n" + "For various reasons, one may wish to keep different\n" "configurations available on a single machine.\n" "\n" "Entering a file name here will allow you to later retrieve, modify\n" @@ -218,7 +218,7 @@ "leave this blank.\n"), search_help[] = N_( "\n" - "Search for CONFIG_ symbols and display their relations.\n" + "Search for CFGSYM_ symbols and display their relations.\n" "Example: search for \"^FOO\"\n" "Result:\n" "-----------------------------------------------------------------\n" @@ -234,7 +234,7 @@ "Selected by: BAR\n" "-----------------------------------------------------------------\n" "o The line 'Prompt:' shows the text used in the menu structure for\n" - " this CONFIG_ symbol\n" + " this CVSYM_ symbol\n" "o The 'Defined at' line tell at what file / line number the symbol\n" " is defined\n" "o The 'Depends on:' line tell what symbols needs to be defined for\n" @@ -250,9 +250,9 @@ "Only relevant lines are shown.\n" "\n\n" "Search examples:\n" - "Examples: USB => find all CONFIG_ symbols containing USB\n" - " ^USB => find all CONFIG_ symbols starting with USB\n" - " USB$ => find all CONFIG_ symbols ending with USB\n" + "Examples: USB => find all CFGSYM_ symbols containing USB\n" + " ^USB => find all CFGSYM_ symbols starting with USB\n" + " USB$ => find all CFGSYM_ symbols ending with USB\n" "\n"); static char buf[4096], *bufptr = buf; @@ -851,7 +851,7 @@ if (sym->help) { if (sym->name) { - str_printf(&help, "CONFIG_%s:\n\n", sym->name); + str_printf(&help, CFGSYM "%s:\n\n", sym->name); str_append(&help, _(sym->help)); str_append(&help, "\n"); } @@ -1039,7 +1039,6 @@ int main(int ac, char **av) { - struct symbol *sym; char *mode; int stat; @@ -1050,10 +1049,8 @@ conf_parse(av[1]); conf_read(NULL); - sym = sym_lookup("KERNELRELEASE", 0); - sym_calc_value(sym); - sprintf(menu_backtitle, _("Linux Kernel v%s Configuration"), - sym_get_string_value(sym)); + sprintf(menu_backtitle, "%s v%s Configuration", + getenv("PROJECT"), getenv("FULLVERSION")); mode = getenv("MENUCONFIG_MODE"); if (mode) { @@ -1069,7 +1066,7 @@ do { cprint_init(); cprint("--yesno"); - cprint(_("Do you wish to save your new kernel configuration?")); + cprint(_("Do you wish to save your new configuration?")); cprint("5"); cprint("60"); stat = exec_conf(); @@ -1078,18 +1075,18 @@ if (stat == 0) { if (conf_write(NULL)) { fprintf(stderr, _("\n\n" - "Error during writing of the kernel configuration.\n" - "Your kernel configuration changes were NOT saved." + "Error during writing of the configuration.\n" + "Your configuration changes were NOT saved." "\n\n")); return 1; } printf(_("\n\n" - "*** End of Linux kernel configuration.\n" - "*** Execute 'make' to build the kernel or try 'make help'." + "*** End of configuration.\n" + "*** Execute 'make' to build the project or try 'make help'." "\n\n")); } else { fprintf(stderr, _("\n\n" - "Your kernel configuration changes were NOT saved." + "Your configuration changes were NOT saved." "\n\n")); } diff -urN -x .svn kconfig-2.6.14/README.PTX kconfig/README.PTX --- kconfig-2.6.14/README.PTX 1970-01-01 01:00:00.000000000 +0100 +++ kconfig/README.PTX 2005-11-29 12:55:02.000000000 +0100 @@ -0,0 +1,14 @@ +README.PTX +========== + +This is a copy of the linux-2.6.14 scripts/kconfig directory. The only +modification is the Makefile, which comes from an old version of kconfig +(standalone version 1.4, patched with kconfig-Makefile.diff) and the +kconfig.diff patch. + +To update to a new kconfig version copy the kconfig directory from the kernel +and replace Makefile with that one to be found in ../ptx-modifications and +apply the patches. + +Robert Schwebel + diff -urN -x .svn kconfig-2.6.14/zconf.y kconfig/zconf.y --- kconfig-2.6.14/zconf.y 2005-11-28 16:50:06.000000000 +0100 +++ kconfig/zconf.y 2005-11-29 12:56:10.000000000 +0100 @@ -17,6 +17,7 @@ #define DEBUG_PARSE 0x0002 int cdebug = PRINTD; +int dep_output = 0; extern int zconflex(void); static void zconfprint(const char *err, ...); @@ -125,6 +126,8 @@ sym->flags |= SYMBOL_OPTIONAL; menu_add_entry(sym); printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2); + if (dep_output) + printf("\nDEP:%s", sym->name); }; config_stmt: config_entry_start config_option_list @@ -139,6 +142,8 @@ sym->flags |= SYMBOL_OPTIONAL; menu_add_entry(sym); printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), $2); + if (dep_output) + printf("\nDEP:%s", sym->name); }; menuconfig_stmt: menuconfig_entry_start config_option_list @@ -217,8 +222,11 @@ config_option: T_SELECT T_WORD if_expr T_EOL { - menu_add_symbol(P_SELECT, sym_lookup($2, 0), $3); + struct symbol *sym = sym_lookup($2, 0); + menu_add_symbol(P_SELECT, sym, $3); printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); + if (dep_output) + printf(":%s", sym->name); }; config_option: T_RANGE symbol symbol if_expr T_EOL