Start to genericize kconfig for use by other projects.
Subsystems (2)
PATCH 1/1 Start to genericize kconfig for use by other projects.
Replace name "Linux Kernel" in menuconfig with a macro (defaulting to "Linux Kernel" if not -Ddefined by the makefile), and remove a few unnecessary occurrences of "kernel" in pop-up text.
--
This is the start of generally genericizing the kconfig infrastructure so it builds more easily out of tree for other projects.
Lots of projects are already using menuconfig to configure themselves. Off the top of my head, busybox, uClibc, buildroot, uClinux, my toybox project, and several other things in the embedded space are already using it, plus a few more like uboot are looking to start.)
Unfortunately, they have to grab a snapshot of the kernel version and apply various modifications to it to build outside of kbuild, and those modifications don't get passed back upstream. The version in the kernel is the master that everybody periodically resyncs from, but they do a lot of work each time they resync.
I've collected some of the changes uClibc and busybox made, as well as some general cleanups I've done for the toybox version, and now I'm trying to feed them back upstream. This patch is primarily cosmetic, there are more to come.
Rob
crypto/Makefile +1 -0
@@ -50,3 +50,4 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o +obj-m += randint.o
scripts/kconfig/conf.c +12 -14
@@ -557,8 +557,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 your "PROJECT_NAME"!\n" + "*** (missing .config file)\n" "***\n" "*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make xconfig\").\n"
@@ -604,7 +604,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*** " PROJECT_NAME " configuration requires explicit update.\n\n" ));return 1 ; } }else
@@ -614,15 +614,13 @@ int main(int ac, char **av) conf_cnt =0 ;check_conf (&rootmenu); }while (conf_cnt); -if (conf_write (NULL )) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); -return 1 ; - } +if (!conf_write (NULL )) { skip_check: -if (input_mode == ask_silent &&conf_write_autoconf ()) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); -return 1 ; - } - -return 0 ; -} +if (input_mode != ask_silent ||conf_write_autoconf ()) { +return 0 ; + } + } + +fprintf (stderr,_ ("\n*** Error while saving configuration.\n\n" )); +return 1 ; +}
scripts/kconfig/confdata.c +3 -3
@@ -425,7 +425,7 @@ int conf_write(const char *name) fprintf(out, _("#\n" "# Automatically generated make config: don't edit\n" - "# Linux kernel version: %s\n" + "# "PROJECT_NAME" version: %s\n" "%s%s" "#\n"), sym_get_string_value(sym),
@@ -677,13 +677,13 @@ int conf_write_autoconf(void)time (&now);fprintf (out,"#\n" "# Automatically generated make config: don't edit\n" -"# Linux kernel version: %s\n" +"# " PROJECT_NAME " version: %s\n" "# %s" "#\n" ,sym_get_string_value (sym),ctime (&now)); fprintf(out_h, "/*\n" " * Automatically generated C config: don't edit\n" - " * Linux kernel version: %s\n" + " * "PROJECT_NAME" version: %s\n" " * %s" " */\n" "#define AUTOCONF_INCLUDED\n",
scripts/kconfig/lkc.h +4 -0
@@ -14,6 +14,10 @@# define gettext (Msgid) ((const char *) (Msgid))# define textdomain (Domainname) ((const char *) (Domainname))# define bindtextdomain (Domainname, Dirname) ((const char *) (Dirname)) +#endif + +#ifndef PROJECT_NAME +#define PROJECT_NAME "Linux Kernel"#endif #ifdef __cplusplus
scripts/kconfig/mconf.c +13 -13
@@ -115,7 +115,7 @@ static const char mconf_readme[] = N_("-----------------------------\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 @@ static const char mconf_readme[] = N_("\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"
@@ -200,18 +200,18 @@ setmod_text[] = N_("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" +"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"
@@ -221,7 +221,7 @@ save_config_text[] = N_( "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"
@@ -403,7 +403,7 @@ static void set_config_filename(const ch sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (sym); size =snprintf (menu_backtitle,sizeof (menu_backtitle), -_ ("%s - Linux Kernel v%s Configuration" ), +_ ("%s - " PROJECT_NAME " v%s Configuration" ), config_filename,sym_get_string_value (sym));if (size >=sizeof (menu_backtitle)) menu_backtitle[sizeof (menu_backtitle)-1 ] ='\0' ;
@@ -912,7 +912,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?\nPress " "<ESC><ESC> to continue." ),6 ,60 );else
@@ -924,20 +924,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 writing " PROJECT_NAME " 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 " PROJECT_NAME " configuration.\n" +"*** Execute 'make' to build, 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/zconf.tab.c_shipped +1 -1
@@ -2115,7 +2115,7 @@ void conf_parse(const char *name) modules_sym = sym_lookup(NULL, 0); modules_sym->type = S_BOOLEAN; modules_sym->flags |= SYMBOL_AUTO; - rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); + rootmenu.prompt = menu_add_prompt(P_MENU, PROJECT_NAME" Configuration", NULL); #if YYDEBUG if (getenv("ZCONF_DEBUG"))
scripts/kconfig/zconf.y +1 -1
@@ -484,7 +484,7 @@ void conf_parse(const char *name) modules_sym = sym_lookup(NULL, 0); modules_sym->type = S_BOOLEAN; modules_sym->flags |= SYMBOL_AUTO; - rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); + rootmenu.prompt = menu_add_prompt(P_MENU, PROJECT_NAME" Configuration", NULL); #if YYDEBUG if (getenv("ZCONF_DEBUG"))
Signature · 2 lines
"One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.
crypto/Makefile obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o · line 53
Quoted 9 lines · Rob Landley
...
crypto/Makefile +1
-0@@ -50,3 +50,4 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o +obj-m += randint.o
If you'd have included a diffstat as described in Documentation/SubmittingPatches section 1 point 14 you might have noticed this yourself...
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 10 lines · Adrian Bunk
crypto/Makefile obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o · line 53
Quoted 9 lines · Rob Landley
...
crypto/Makefile +1
-0@@ -50,3 +50,4 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o +obj-m += randint.o
Oops. Missed a revert. Sorry 'bout that.
Quoted 3 lines
If you'd have included a diffstat as described in
Documentation/SubmittingPatchessection 1 point 14 you might have noticed this yourself...
I was under the vague impression I'd read that, but going back I see that diffstat is first mentioned on line 437 in the next to last paragraph before "tips and tricks". That's in paragraph 12 of point 14, and that's counting the indented list elements as part of the proceeding paragraph.
Is there anything that could be done to make that document longer and more rambling? I see that last time I read it, I stopped during "Developers Certificate of Origin 1.1", which is some kind of strange non-license license which is more recent than the signed-off-by lines, but seems to be retroactively stating that signed-off-by means you've read that thing...? Is that expected to hold up in court, is it just one of those random 1980's shrinkware-license style intimidation tactics, is it some weird kind of fraternity pledge...?
(/me goes to read up on diffstat... Ah, I see, it's a program you install. I thought it was a diff option. So possibly you could make SubmittingPatches longer by mentioning that.)
With that file reverted, it's:
scripts/kconfig/conf.c | 26 ++++++++++++-------------- scripts/kconfig/confdata.c | 6 +++--- scripts/kconfig/lkc.h | 4 ++++ scripts/kconfig/mconf.c | 26 +++++++++++++------------- scripts/kconfig/zconf.tab.c_shipped | 2 +- scripts/kconfig/zconf.y | 2 +- 6 files changed, 34 insertions(+), 32 deletions(-)
Quoted 2 lines
cu
Adrian
Rob
Signature · 2 lines
"One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.
Quoted 14 lines · Rob Landley
Quoted 10 lines · Adrian Bunk
crypto/Makefile obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o · line 53
Quoted 9 lines · Rob Landley
...
crypto/Makefile +1
-0@@ -50,3 +50,4 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o +obj-m += randint.oOops. Missed a revert. Sorry 'bout that.
Quoted 4 lines
Quoted 3 lines
If you'd have included a diffstat as described in
Documentation/SubmittingPatchessection 1 point 14 you might have noticed this yourself......
To avoid misunderstandings: There should have been a smiley.
Quoted 4 lines
(/me goes to read up on diffstat... Ah, I see, it's a program you install. I thought it was a diff option. So possibly you could make SubmittingPatches longer by mentioning that.)
...
And we might make SubmittingPatches even longer by additionally mentioning
git-diff --stat
Quoted 1 line
Rob
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedHi,
Quoted 3 lines · Rob Landley
Replace name "Linux Kernel" in menuconfig with a macro (defaulting to "Linux Kernel" if not -Ddefined by the makefile), and remove a few unnecessary occurrences of "kernel" in pop-up text.
Could you drop the PROJECT_NAME changes for now? The rest looks fine. I would prefer if the project would be settable via Kconfig. If you want to play with it add this to Kconfig:
config PROJECT_NAME
string
default "Linux kernel"
and at the end of conf_parse() you can lookup, calculate and cache the value.
bye, Roman
Hi,
Quoted 7 lines · On Thu, 12 Jul 2007, I wrote:
Quoted 3 lines · Rob Landley
Replace name "Linux Kernel" in menuconfig with a macro (defaulting to "Linux Kernel" if not -Ddefined by the makefile), and remove a few unnecessary occurrences of "kernel" in pop-up text.
Could you drop the
PROJECT_NAMEchanges for now?
Or at least replace it with a variable at first.
bye, Roman
Quoted 9 lines · Roman Zippel
Hi,
Quoted 3 lines · Rob Landley
Replace name "Linux Kernel" in menuconfig with a macro (defaulting to "Linux Kernel" if not -Ddefined by the makefile), and remove a few unnecessary occurrences of "kernel" in pop-up text.
Could you drop the
PROJECT_NAMEchanges for now? The rest looks fine. I would prefer if the project would be settable viaKconfig.
Are projects likely to grab a common kconfig binary externally, rather than build their own? Where exactly is the benefit, here?
Quoted 8 lines
If you want to play with it add this to
Kconfig:config
PROJECT_NAME
string
default "Linux kernel"and at the end of
conf_parse()you can lookup, calculate and cache the value.
Except that conf_parse() uses PROJECT_NAME halfway through. How do I handle that one?
Here's a patch with all the uses of PROJECT_NAME converted to project_name, and with all the ones but the conf_parse() one converted to an %s with project-name in the printf argument list.
If you know how to fix up conf_parse(), the #define can be yanked from lkc.h and replaced with a global variable...
scripts/kconfig/conf.c +13 -15
@@ -557,12 +557,12 @@ 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 your %s!\n" +"*** (missing .config file)\n" "***\n" "*** Please run some configurator (e.g. \"make oldconfig\" or\n" "*** \"make menuconfig\" or \"make xconfig\").\n" -"***\n" )); +"***\n" ), project_name);exit (1 ); }case ask_all:
@@ -604,7 +604,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*** %s configuration requires explicit update.\n\n" ), project_name);return 1 ; } }else
@@ -614,15 +614,13 @@ int main(int ac, char **av) conf_cnt =0 ;check_conf (&rootmenu); }while (conf_cnt); -if (conf_write (NULL )) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); -return 1 ; - } +if (!conf_write (NULL )) { skip_check: -if (input_mode == ask_silent &&conf_write_autoconf ()) { -fprintf (stderr,_ ("\n*** Error during writing of the kernel configuration.\n\n" )); -return 1 ; - } - -return 0 ; -} +if (input_mode != ask_silent ||conf_write_autoconf ()) { +return 0 ; + } + } + +fprintf (stderr,_ ("\n*** Error while saving configuration.\n\n" )); +return 1 ; +}
scripts/kconfig/confdata.c +6 -5
@@ -425,9 +425,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" ), + project_name,sym_get_string_value (sym), use_timestamp ?"# " :"" , use_timestamp ?ctime (&now) :"" );
@@ -677,17 +678,17 @@ int conf_write_autoconf(void)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 (sym),ctime (&now)); + project_name,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 (sym),ctime (&now)); + project_name,sym_get_string_value (sym),ctime (&now)); for_all_symbols(i, sym) {sym_calc_value (sym);
scripts/kconfig/lkc.h +4 -0
@@ -14,6 +14,10 @@# define gettext (Msgid) ((const char *) (Msgid))# define textdomain (Domainname) ((const char *) (Domainname))# define bindtextdomain (Domainname, Dirname) ((const char *) (Dirname)) +#endif + +#ifndef project_name +#define project_name "Linux Kernel"#endif #ifdef __cplusplus
scripts/kconfig/mconf.c +16 -16
@@ -115,7 +115,7 @@ static const char mconf_readme[] = N_("-----------------------------\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 @@ static const char mconf_readme[] = N_("\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"
@@ -200,18 +200,18 @@ setmod_text[] = N_("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" +"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"
@@ -221,7 +221,7 @@ save_config_text[] = N_( "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"
@@ -403,8 +403,8 @@ static void set_config_filename(const ch sym =sym_lookup ("KERNELVERSION" ,0 );sym_calc_value (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, project_name,sym_get_string_value (sym));if (size >=sizeof (menu_backtitle)) menu_backtitle[sizeof (menu_backtitle)-1 ] ='\0' ;set_dialog_backtitle (menu_backtitle);
@@ -912,7 +912,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?\nPress " "<ESC><ESC> to continue." ),6 ,60 );else
@@ -924,20 +924,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." -"\n\n" )); +"Error writing %s configuration.\n" +"Your configuration changes were NOT saved." +"\n\n" ), project_name);return 1 ; }case -1 :printf (_ ("\n\n" -"*** End of Linux kernel configuration.\n" -"*** Execute 'make' to build the kernel or try 'make help'." -"\n\n" )); +"*** End of %s configuration.\n" +"*** Execute 'make' to build, or try 'make help'." +"\n\n" ), project_name);break ;default :fprintf (stderr,_ ("\n\n" -"Your kernel configuration changes were NOT saved." +"Your configuration changes were NOT saved." "\n\n" )); }
scripts/kconfig/zconf.tab.c_shipped +1 -1
@@ -2115,7 +2115,7 @@ void conf_parse(const char *name) modules_sym = sym_lookup(NULL, 0); modules_sym->type = S_BOOLEAN; modules_sym->flags |= SYMBOL_AUTO; - rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); + rootmenu.prompt = menu_add_prompt(P_MENU, project_name" Configuration", NULL); #if YYDEBUG if (getenv("ZCONF_DEBUG"))
scripts/kconfig/zconf.y +1 -1
@@ -484,7 +484,7 @@ void conf_parse(const char *name) modules_sym = sym_lookup(NULL, 0); modules_sym->type = S_BOOLEAN; modules_sym->flags |= SYMBOL_AUTO; - rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); + rootmenu.prompt = menu_add_prompt(P_MENU, project_name" Configuration", NULL); #if YYDEBUG if (getenv("ZCONF_DEBUG"))
Quoted 1 line
bye, Roman
Signature · 2 lines
"One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.
Quoted 8 lines · Rob Landley
Quoted 7 lines · Roman Zippel
Hi,
Quoted 3 lines · Rob Landley
Replace name "Linux Kernel" in menuconfig with a macro (defaulting to "Linux Kernel" if not -Ddefined by the makefile), and remove a few unnecessary occurrences of "kernel" in pop-up text.
Quoted 5 lines
Quoted 2 lines
Could you drop the
PROJECT_NAMEchanges for now? The rest looks fine. I would prefer if the project would be settable viaKconfig.Are projects likely to grab a common kconfig binary externally, rather than build their own?
Yes.
If you really want to share kconfig, it'd be better to break it off into a separately packaged project. For the time being, the kernel makefiles can look for it in path, then fall back to its own copy which we can eventually drop.
Signature · 1 line
Mathematics is the supreme nostalgia of our time.
Quoted 15 lines · Matt Mackall
Quoted 8 lines · Rob Landley
Quoted 7 lines · Roman Zippel
Hi,
Quoted 3 lines · Rob Landley
Replace name "Linux Kernel" in menuconfig with a macro (defaulting to "Linux Kernel" if not -Ddefined by the makefile), and remove a few unnecessary occurrences of "kernel" in pop-up text.
Quoted 5 lines
Quoted 2 lines
Could you drop the
PROJECT_NAMEchanges for now? The rest looks fine. I would prefer if the project would be settable viaKconfig.Are projects likely to grab a common kconfig binary externally, rather than build their own?
Quoted 6 lines
Yes.
If you really want to share kconfig, it'd be better to break it off into a separately packaged project. For the time being, the kernel makefiles can look for it in path, then fall back to its own copy which we can eventually drop.
That is _so_ not my call.
Right now, the version in linux-kernel is the master. I'm not saying that should be the case, I'm just saying it is. That's why I'm pushing patches that way rather than recommending anyone else use the version I cleaned up in toybox (which is currently fairly standalone).
If somebody wants to break it out and maintain it as a separate project, fine with me, just tell me where I should look and where to send patches. But if the linux kernel doesn't actually start _using_ said external version, and instead maintains its own, the external version will go the way of libsysfs when udev went "a shared library means we include it in our source tree and build our own copy".
Rob
Signature · 2 lines
"One of my most productive days was throwing away 1000 lines of code." - Ken Thompson.