relocate kconfig "package name" to Kconfig/environment
This was discussed some time ago, but I don't really follow kconfig closely and the current source still doesn't do what I need, so I just banged it out. This moves the string "Linux kernel" out of hardcoded kconfig sources and into a Kconfig option. This allows the projects that utilize kconfig as their build system to better integrate the menusystem into their project. Rather than having to edit the sources all over the place, they only need to update the new "KERNELPACKAGE" setting to whatever represents their project. Feedback welcome! :)
--- Makefile | 3 ++- init/Kconfig | 4 ++++ scripts/kconfig/conf.c | 10 +++++----- scripts/kconfig/confdata.c | 17 ++++++++++++----- scripts/kconfig/gconf.c | 4 ++-- scripts/kconfig/mconf.c | 21 ++++++++++++--------- scripts/kconfig/qconf.cc | 4 ++-- 7 files changed, 39 insertions(+), 24 deletions(-)
Makefile +2 -1
@@ -338,8 +338,9 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) +KERNELPACKAGE = Linux Kernel -export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION +export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION KERNELPACKAGE export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
init/Kconfig +4 -0
@@ -6,6 +6,10 @@ config KERNELVERSION string option env="KERNELVERSION" +config KERNELPACKAGE + string + option env="KERNELPACKAGE" + config DEFCONFIG_LIST string depends on !UML
scripts/kconfig/conf.c +5 -5
@@ -563,8 +563,8 @@ int main(int ac, char **av)case ask_silent:if (stat (".config" , &tmpstat)) { printf(_("***\n" - "*** You have not yet configured your kernel!\n" - "*** (missing kernel .config file)\n" + "*** You have not yet configured things!\n" + "*** (missing .config file)\n" "***\n" "*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make xconfig\").\n"
@@ -610,7 +610,7 @@ int main(int ac, char **av) }else if (conf_get_changed ()) { name =getenv ("KCONFIG_NOSILENTUPDATE" );if (name && *name) { -fprintf (stderr,_ ("\n*** Kernel configuration requires explicit update.\n\n" )); +fprintf (stderr,_ ("\n*** Configuration requires explicit update.\n\n" ));return 1 ; } }else
@@ -621,12 +621,12 @@ int main(int ac, char **av)check_conf (&rootmenu); }while (conf_cnt);if (conf_write (NULL )) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); +fprintf (stderr,_ ("\n*** Error during writing of the configuration.\n\n" ));return 1 ; } skip_check:if (input_mode == ask_silent &&conf_write_autoconf ()) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); +fprintf (stderr,_ ("\n*** Error during writing of the configuration.\n\n" ));return 1 ; }
scripts/kconfig/confdata.c +12 -5
@@ -392,7 +392,7 @@ int conf_read(const char *name)int conf_write (const char *name) {FILE *out; -struct symbol *sym; +struct symbol *sym, *pkg_sym;struct menu *menu;const char *basename;char dirname[128 ], tmpname[128 ], newname[128 ];
@@ -438,6 +438,8 @@ int conf_write(const char *name) sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (sym); + pkg_sym =sym_lookup ("KERNELPACKAGE" ,0 ); +sym_calc_value (pkg_sym);time (&now); env =getenv ("KCONFIG_NOTIMESTAMP" );if (env && *env)
@@ -445,9 +447,10 @@ int conf_write(const char *name)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 (pkg_sym),sym_get_string_value (sym), use_timestamp ?"# " :"" , use_timestamp ?ctime (&now) :"" );
@@ -668,7 +671,7 @@ out:int conf_write_autoconf (void ) { -struct symbol *sym; +struct symbol *sym, *pkg_sym;const char *str;char *name;FILE *out, *out_h;
@@ -694,19 +697,23 @@ int conf_write_autoconf(void) sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (sym); + pkg_sym =sym_lookup ("KERNELPACKAGE" ,0 ); +sym_calc_value (pkg_sym);time (&now);fprintf (out,"#\n" "# Automatically generated make config: don't edit\n" -"# Linux kernel version: %s\n" +"# %s version: %s\n" "# %s" "#\n" , +sym_get_string_value (pkg_sym),sym_get_string_value (sym),ctime (&now));fprintf (out_h,"/*\n" " * Automatically generated C config: don't edit\n" -" * Linux kernel version: %s\n" +" * %s version: %s\n" " * %s" " */\n" "#define AUTOCONF_INCLUDED\n" , +sym_get_string_value (pkg_sym),sym_get_string_value (sym),ctime (&now)); for_all_symbols(i, sym) {
scripts/kconfig/gconf.c +2 -2
@@ -266,8 +266,8 @@ void init_main_window(const gchar * glade_file)/*"style", PANGO_STYLE_OBLIQUE, */ NULL); -sprintf (title,_ ("Linux Kernel v%s Configuration" ), -getenv ("KERNELVERSION" )); +sprintf (title,_ ("%s v%s Configuration" ), +getenv ("KERNELPACKAGE" ),getenv ("KERNELVERSION" ));gtk_window_set_title (GTK_WINDOW (main_wnd), title);gtk_widget_show (main_wnd);
scripts/kconfig/mconf.c +12 -9
@@ -362,13 +362,16 @@ static void set_config_filename(const char *config_filename) {static char menu_backtitle[PATH_MAX +128 ];int size; -struct symbol *sym; +struct symbol *sym, *pkg_sym; sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (sym); + pkg_sym =sym_lookup ("KERNELPACKAGE" ,0 ); +sym_calc_value (pkg_sym); size =snprintf (menu_backtitle,sizeof (menu_backtitle), -_ ("%s - Linux Kernel v%s Configuration" ), - config_filename,sym_get_string_value (sym)); +_ ("%s - %s v%s Configuration" ), + config_filename,sym_get_string_value (pkg_sym), +sym_get_string_value (sym));if (size >=sizeof (menu_backtitle)) menu_backtitle[sizeof (menu_backtitle)-1 ] ='\0' ;set_dialog_backtitle (menu_backtitle);
@@ -894,7 +897,7 @@ int main(int ac, char **av)if (conf_get_changed ()) res =dialog_yesno (NULL ,_ ("Do you wish to save your " -"new kernel configuration?\n" +"new configuration?\n" "<ESC><ESC> to continue." ),6 ,60 );else
@@ -906,20 +909,20 @@ int main(int ac, char **av)case 0 :if (conf_write (filename)) {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 ; }case -1 :printf (_ ("\n\n" -"*** End of Linux kernel configuration.\n" -"*** Execute 'make' to build the kernel or try 'make help'." +"*** End of source configuration.\n" +"*** Execute 'make' to build the source or try 'make help'." "\n\n" ));break ;default :fprintf (stderr,_ ("\n\n" -"Your kernel configuration changes were NOT saved." +"Your configuration changes were NOT saved." "\n\n" )); }
scripts/kconfig/qconf.cc +2 -2
@@ -1276,8 +1276,8 @@ ConfigMainWindow::ConfigMainWindow(void) char title[256]; QWidget *d = configApp->desktop(); - snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration"), - getenv("KERNELVERSION")); + snprintf(title, sizeof(title), _("%s v%s Configuration"), + getenv("KERNELPACKAGE"), getenv("KERNELVERSION")); setCaption(title); width = configSettings->readNumEntry("/window width", d->width() - 64);
Quoted 25 lines · On Mon, 11 Feb 2008 18:38:15 -0500 Mike Frysinger wrote:
This was discussed some time ago, but I don't really follow kconfig closely and the current source still doesn't do what I need, so I just banged it out. This moves the string "Linux kernel" out of hardcoded kconfig sources and into a
Kconfigoption. This allows the projects that utilize kconfig as their build system to better integrate the menusystem into their project. Rather than having to edit the sources all over the place, they only need to update the new "KERNELPACKAGE" setting to whatever represents their project. Feedback welcome! :)Signed-off-by Mike Frysinger <[email protected]>--- Makefile | 3 ++- init/Kconfig | 4 ++++ scripts/kconfig/conf.c | 10 +++++----- scripts/kconfig/confdata.c | 17 ++++++++++++----- scripts/kconfig/gconf.c | 4 ++-- scripts/kconfig/mconf.c | 21 ++++++++++++--------- scripts/kconfig/qconf.cc | 4 ++-- 7 files changed, 39 insertions(+), 24 deletions(-)Makefile +0
-0
Makefile KBUILD_AFLAGS := -D__ASSEMBLY__ · line 341
Quoted 4 lines
Makefile +1
-0@@ -338,8 +338,9 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) +KERNELPACKAGE = Linux Kernel
Doesn't need quotes?
Quoted 10 lines
Makefile +1
-1-export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION +export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION KERNELPACKAGE export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGSinit/Kconfig +0
-0
init/Kconfig config KERNELVERSION · line 12
Quoted 7 lines
init/Kconfig +4
-0@@ -6,6 +6,10 @@ config KERNELVERSION string option env="KERNELVERSION" +config KERNELPACKAGE + string + option env="KERNELPACKAGE" +
Each arch/$ARCH/Kconfig can have (and most do) a "mainmenu" entry that could be useful here, either alone or combined with 'KERNELPACKAGE'.
Quoted 8 lines
init/Kconfig +0
-0config DEFCONFIG_LIST string depends on !UMLscripts/kconfig/conf.c +0
-0
scripts/kconfig/conf.c int main(int ac, char **av) · line 566
Quoted 6 lines
scripts/kconfig/conf.c +1
-2@@ -563,8 +563,8 @@ int main(int ac, char **av)case ask_silent:if (stat (".config" , &tmpstat)) { printf(_("***\n" - "*** You have not yet configured your kernel!\n" - "*** (missing kernel .config file)\n" + "*** You have not yet configured things!\n"
s/things/$KERNELPACKAGE/ ?
scripts/kconfig/conf.c int main(int ac, char **av) · line 613
Quoted 10 lines
scripts/kconfig/conf.c +2
-1+"*** (missing .config file)\n" "***\n" "*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make xconfig\").\n" @@ -610,7 +610,7 @@ int main(int ac, char **av) }else if (conf_get_changed ()) { name =getenv ("KCONFIG_NOSILENTUPDATE" );if (name && *name) { -fprintf (stderr,_ ("\n*** Kernel configuration requires explicit update.\n\n" )); +fprintf (stderr,_ ("\n*** Configuration requires explicit update.\n\n" ));
s/Configuration/$KERNELPACKAGE configuration/
scripts/kconfig/conf.c int main(int ac, char **av) · line 624
Quoted 9 lines
scripts/kconfig/conf.c +1
-1return 1 ; } }else @@ -621,12 +621,12 @@ int main(int ac, char **av)check_conf (&rootmenu); }while (conf_cnt);if (conf_write (NULL )) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); +fprintf (stderr,_ ("\n*** Error during writing of the configuration.\n\n" ));
insert $KERNELPACKAGE where "kernel" was.
scripts/kconfig/conf.c int main(int ac, char **av) · line 629
Quoted 6 lines
scripts/kconfig/conf.c +1
-1return 1 ; } skip_check:if (input_mode == ask_silent &&conf_write_autoconf ()) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); +fprintf (stderr,_ ("\n*** Error during writing of the configuration.\n\n" ));
ditto.
Quoted 26 lines
scripts/kconfig/conf.c +0
-0return 1 ; }scripts/kconfig/confdata.c +3
-1@@ -392,7 +392,7 @@ int conf_read(const char *name)int conf_write (const char *name) {FILE *out; -struct symbol *sym; +struct symbol *sym, *pkg_sym;struct menu *menu;const char *basename;char dirname[128 ], tmpname[128 ], newname[128 ];@@ -438,6 +438,8 @@ int conf_write(const char *name) sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (sym); + pkg_sym =sym_lookup ("KERNELPACKAGE" ,0 ); +sym_calc_value (pkg_sym);time (&now); env =getenv ("KCONFIG_NOTIMESTAMP" );if (env && *env)
scripts/kconfig/confdata.c int conf_write(const char *name) · line 454
Quoted 9 lines
scripts/kconfig/confdata.c +2
-1@@ -445,9 +447,10 @@ int conf_write(const char *name) 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(pkg_sym), sym_get_string_value(sym),
Why drop the "version: "? I.e., must KERNELVERSION contain that word if it is desired?
Quoted 16 lines
scripts/kconfig/confdata.c +2
-1use_timestamp ?"# " :"" , use_timestamp ? ctime(&now) : "");@@ -668,7 +671,7 @@ out:int conf_write_autoconf (void ) { -struct symbol *sym; +struct symbol *sym, *pkg_sym;const char *str;char *name;FILE *out, *out_h;@@ -694,19 +697,23 @@ int conf_write_autoconf(void) sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (sym); + pkg_sym =sym_lookup ("KERNELPACKAGE" ,0 );
scripts/kconfig/confdata.c int conf_write_autoconf(void) · line 709
Quoted 10 lines
scripts/kconfig/confdata.c +3
-1+sym_calc_value (pkg_sym);time (&now);fprintf (out,"#\n" "# Automatically generated make config: don't edit\n" -"# Linux kernel version: %s\n" +"# %s version: %s\n" "# %s" "#\n" , +sym_get_string_value (pkg_sym),sym_get_string_value (sym),ctime (&now));
Ditto.
scripts/kconfig/confdata.c int conf_write_autoconf(void) · line 717
Quoted 9 lines
scripts/kconfig/confdata.c +2
-1fprintf (out_h,"/*\n" " * Automatically generated C config: don't edit\n" -" * Linux kernel version: %s\n" +" * %s version: %s\n" " * %s" " */\n" "#define AUTOCONF_INCLUDED\n" , +sym_get_string_value (pkg_sym),sym_get_string_value (sym),ctime (&now));
Ditto.
Quoted 7 lines
scripts/kconfig/confdata.c +0
-0for_all_symbols(i, sym) {scripts/kconfig/gconf.c +0
-0
scripts/kconfig/gconf.c void init_main_window(const gchar * glade_file) · line 270
Quoted 7 lines
scripts/kconfig/gconf.c +2
-2@@ -266,8 +266,8 @@ void init_main_window(const gchar * glade_file)/*"style", PANGO_STYLE_OBLIQUE, */ NULL); -sprintf (title,_ ("Linux Kernel v%s Configuration" ), -getenv ("KERNELVERSION" )); +sprintf (title,_ ("%s v%s Configuration" ), +getenv ("KERNELPACKAGE" ),getenv ("KERNELVERSION" ));
But here at least a 'v' is added... (inconsistent)
Quoted 14 lines
scripts/kconfig/gconf.c +0
-0gtk_window_set_title (GTK_WINDOW (main_wnd), title);gtk_widget_show (main_wnd);scripts/kconfig/mconf.c +1
-1@@ -362,13 +362,16 @@ static void set_config_filename(const char *config_filename) {static char menu_backtitle[PATH_MAX +128 ];int size; -struct symbol *sym; +struct symbol *sym, *pkg_sym;
scripts/kconfig/mconf.c static void set_config_filename(const char *config_filename) · line 374
Quoted 10 lines
scripts/kconfig/mconf.c +5
-2sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (sym); + pkg_sym =sym_lookup ("KERNELPACKAGE" ,0 ); +sym_calc_value (pkg_sym); size =snprintf (menu_backtitle,sizeof (menu_backtitle), -_ ("%s - Linux Kernel v%s Configuration" ), - config_filename,sym_get_string_value (sym)); +_ ("%s - %s v%s Configuration" ), + config_filename,sym_get_string_value (pkg_sym), +sym_get_string_value (sym));
Ditto.
Quoted 13 lines
scripts/kconfig/mconf.c +1
-1if (size >=sizeof (menu_backtitle)) menu_backtitle[sizeof (menu_backtitle)-1 ] ='\0' ;set_dialog_backtitle (menu_backtitle);@@ -894,7 +897,7 @@ int main(int ac, char **av)if (conf_get_changed ()) res =dialog_yesno (NULL ,_ ("Do you wish to save your " -"new kernel configuration?\n" +"new configuration?\n" "<ESC><ESC> to continue." ),6 ,60 );else
scripts/kconfig/mconf.c int main(int ac, char **av) · line 913
Quoted 7 lines
scripts/kconfig/mconf.c +2
-2@@ -906,20 +909,20 @@ int main(int ac, char **av)case 0 :if (conf_write (filename)) { 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."
Insert $KERNELPACKAGE where "kernel" was.
Quoted 23 lines
scripts/kconfig/mconf.c +3
-3"\n\n"));return 1 ; }case -1 :printf (_ ("\n\n" -"*** End of Linux kernel configuration.\n" -"*** Execute 'make' to build the kernel or try 'make help'." +"*** End of source configuration.\n" +"*** Execute 'make' to build the source or try 'make help'." "\n\n" ));break ;default :fprintf (stderr,_ ("\n\n" -"Your kernel configuration changes were NOT saved." +"Your configuration changes were NOT saved." "\n\n" )); }scripts/kconfig/qconf.cc +0
-0
scripts/kconfig/qconf.cc ConfigMainWindow::ConfigMainWindow(void) · line 1280
Quoted 7 lines
scripts/kconfig/qconf.cc +2
-2@@ -1276,8 +1276,8 @@ ConfigMainWindow::ConfigMainWindow(void) char title[256]; QWidget *d = configApp->desktop(); - snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration"), - getenv("KERNELVERSION")); + snprintf(title, sizeof(title), _("%s v%s Configuration"), + getenv("KERNELPACKAGE"), getenv("KERNELVERSION"));
'v' is added...
scripts/kconfig/qconf.cc ConfigMainWindow::ConfigMainWindow(void)
Quoted 4 lines
scripts/kconfig/qconf.cc +0
-1setCaption(title); width = configSettings->readNumEntry("/window width", d->width() - 64); -
---
~Randy
Quoted 10 lines · Randy Dunlap
Makefile KBUILD_AFLAGS := -D__ASSEMBLY__ · line 341
Quoted 7 lines · On Mon, 11 Feb 2008 18:38:15 -0500 Mike Frysinger wrote:
Makefile +1
-0@@ -338,8 +338,9 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) +KERNELPACKAGE = Linux KernelDoesn't need quotes?
shouldnt ... or at least, it worked fine for me in testing menuconfig
Quoted 6 lines
Quoted 6 lines
init/Kconfig +0
-0@@ -6,6 +6,10 @@ config KERNELVERSION string option env="KERNELVERSION"
Quoted 7 lines
init/Kconfig config KERNELVERSION · line 12
Quoted 4 lines
init/Kconfig +4
-0+config KERNELPACKAGE + string + option env="KERNELPACKAGE" +Each
arch/$ARCH/Kconfigcan have (and most do) a "mainmenu" entry that could be useful here, either alone or combined with 'KERNELPACKAGE'.
i dont think that main menu option actually gets displayed anywhere ? either way, that string tends to be much longer than what we want here ...
Quoted 11 lines
scripts/kconfig/conf.c int main(int ac, char **av) · line 566
Quoted 9 lines
scripts/kconfig/conf.c +1
-2@@ -563,8 +563,8 @@ int main(int ac, char **av)case ask_silent:if (stat (".config" , &tmpstat)) { printf(_("***\n" - "*** You have not yet configured your kernel!\n" - "*** (missing kernel .config file)\n" + "*** You have not yet configured things!\n"s/things/$KERNELPACKAGE/ ?
i thought just making it generic in the generic sections kept things simple and wasnt really a loss of information. doesnt matter to me one way or the other though.
Quoted 22 lines
Quoted 22 lines
scripts/kconfig/confdata.c +3
-1@@ -392,7 +392,7 @@ int conf_read(const char *name)int conf_write (const char *name) {FILE *out; -struct symbol *sym; +struct symbol *sym, *pkg_sym;struct menu *menu;const char *basename;char dirname[128 ], tmpname[128 ], newname[128 ];@@ -438,6 +438,8 @@ int conf_write(const char *name) sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (sym); + pkg_sym =sym_lookup ("KERNELPACKAGE" ,0 ); +sym_calc_value (pkg_sym);time (&now); env =getenv ("KCONFIG_NOTIMESTAMP" );if (env && *env)@@ -445,9 +447,10 @@ int conf_write(const char *name)
Quoted 11 lines
scripts/kconfig/confdata.c int conf_write(const char *name) · line 454
Quoted 8 lines
scripts/kconfig/confdata.c +2
-1fprintf(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(pkg_sym), sym_get_string_value(sym),Why drop the "version: "? I.e., must KERNELVERSION contain that word if it is desired?
i really dont know what you're talking about ... nothing was dropped here
Quoted 6 lines
Quoted 6 lines
scripts/kconfig/gconf.c +0
-0@@ -266,8 +266,8 @@ void init_main_window(const gchar * glade_file)/*"style", PANGO_STYLE_OBLIQUE, */ NULL);
Quoted 6 lines
scripts/kconfig/gconf.c void init_main_window(const gchar * glade_file) · line 270
Quoted 4 lines
scripts/kconfig/gconf.c +2
-2-sprintf (title,_ ("Linux Kernel v%s Configuration" ), -getenv ("KERNELVERSION" )); +sprintf (title,_ ("%s v%s Configuration" ), +getenv ("KERNELPACKAGE" ),getenv ("KERNELVERSION" ));But here at least a 'v' is added... (inconsistent)
the 'v' wasn't added by me, it's always been there. the title bar is consistent across all the configuration interfaces:
<package name> v<version> Configuration
which becomes:
Linux Kernel v2.6.25-rc1 Configuration
-mike
Quoted 28 lines · On Mon, 11 Feb 2008 19:29:27 -0500 Mike Frysinger wrote:
Quoted 10 lines · Randy Dunlap
Makefile KBUILD_AFLAGS := -D__ASSEMBLY__ · line 341
Quoted 7 lines · On Mon, 11 Feb 2008 18:38:15 -0500 Mike Frysinger wrote:
Makefile +1
-0@@ -338,8 +338,9 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from include/config/kernel.release (if it exists) KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) +KERNELPACKAGE = Linux KernelDoesn't need quotes?
shouldnt ... or at least, it worked fine for me in testing menuconfig
Quoted 6 lines
Quoted 6 lines
init/Kconfig +0
-0@@ -6,6 +6,10 @@ config KERNELVERSION string option env="KERNELVERSION"Quoted 7 lines
init/Kconfig config KERNELVERSION · line 12
Quoted 4 lines
init/Kconfig +4
-0+config KERNELPACKAGE + string + option env="KERNELPACKAGE" +Each
arch/$ARCH/Kconfigcan have (and most do) a "mainmenu" entry that could be useful here, either alone or combined with 'KERNELPACKAGE'.
Quoted 1 line
i dont think that main menu option actually gets displayed anywhere ? either
No, it's not currently used. Unfortunately.
Quoted 52 lines
way, that string tends to be much longer than what we want here ...
Quoted 11 lines
scripts/kconfig/conf.c int main(int ac, char **av) · line 566
Quoted 9 lines
scripts/kconfig/conf.c +1
-2@@ -563,8 +563,8 @@ int main(int ac, char **av)case ask_silent:if (stat (".config" , &tmpstat)) { printf(_("***\n" - "*** You have not yet configured your kernel!\n" - "*** (missing kernel .config file)\n" + "*** You have not yet configured things!\n"s/things/$KERNELPACKAGE/ ?
i thought just making it generic in the generic sections kept things simple and wasnt really a loss of information. doesnt matter to me one way or the other though.
Quoted 22 lines
Quoted 22 lines
scripts/kconfig/confdata.c +3
-1@@ -392,7 +392,7 @@ int conf_read(const char *name)int conf_write (const char *name) {FILE *out; -struct symbol *sym; +struct symbol *sym, *pkg_sym;struct menu *menu;const char *basename;char dirname[128 ], tmpname[128 ], newname[128 ];@@ -438,6 +438,8 @@ int conf_write(const char *name) sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (sym); + pkg_sym =sym_lookup ("KERNELPACKAGE" ,0 ); +sym_calc_value (pkg_sym);time (&now); env =getenv ("KCONFIG_NOTIMESTAMP" );if (env && *env)@@ -445,9 +447,10 @@ int conf_write(const char *name)Quoted 11 lines
scripts/kconfig/confdata.c int conf_write(const char *name) · line 454
Quoted 8 lines
scripts/kconfig/confdata.c +2
-1fprintf(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(pkg_sym), sym_get_string_value(sym),Why drop the "version: "? I.e., must KERNELVERSION contain that word if it is desired?
Quoted 1 line
i really dont know what you're talking about ... nothing was dropped here
Ack, I misread the +- & context lines.
Quoted 13 lines
Quoted 6 lines
Quoted 6 lines
scripts/kconfig/gconf.c +0
-0@@ -266,8 +266,8 @@ void init_main_window(const gchar * glade_file)/*"style", PANGO_STYLE_OBLIQUE, */ NULL);Quoted 6 lines
scripts/kconfig/gconf.c void init_main_window(const gchar * glade_file) · line 270
Quoted 4 lines
scripts/kconfig/gconf.c +2
-2-sprintf (title,_ ("Linux Kernel v%s Configuration" ), -getenv ("KERNELVERSION" )); +sprintf (title,_ ("%s v%s Configuration" ), +getenv ("KERNELPACKAGE" ),getenv ("KERNELVERSION" ));But here at least a 'v' is added... (inconsistent)
Quoted 5 lines
the 'v' wasn't added by me, it's always been there. the title bar is consistent across all the configuration interfaces:
<package name> v<version> Configuration
which becomes:
Linux Kernel v2.6.25-rc1 Configuration
Yes, I misread some lines. Sorry about that.
---
~Randy