save kernel version in .config file
PATCH 1/1 save kernel version in .config file
(from June/2004 email thread:
http://marc.theaimsgroup.com/?t=108753573200001&r=1&w=2
)
Several people found this useful, none opposed (afaik).
Saves kernel version in .config file, e.g.:
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.8-rc3
# Tue Aug 3 22:55:57 2004
#
Please merge.
---
Save kernel version info and date when writing .config file. Tested with 'make {menuconfig|xconfig|gconfig}'.
diffstat:=
scripts/kconfig/confdata.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-)
scripts/kconfig/confdata.c renamed from scripts/kconfig/confdata.c~config_version +15 -2
@@ -8,6 +8,7 @@#include <stdio.h> #include <stdlib.h> #include <string.h> +#include <time.h> #include <unistd.h> #define LKC_DIRECT_LINK
@@ -268,6 +269,7 @@ int conf_write(const char *name)char dirname[128 ], tmpname[128 ], newname[128 ];int type, l;const char *str; +time_t now; dirname[0 ] =0 ;if (name && name[0 ]) {
@@ -301,14 +303,25 @@ int conf_write(const char *name)if (!out_h)return 1 ; } + sym =sym_lookup ("KERNELRELEASE" ,0 ); +sym_calc_value (sym); +time (&now);fprintf (out,"#\n" "# Automatically generated make config: don't edit\n" -"#\n" ); +"# Linux kernel version: %s\n" +"# %s" +"#\n" , +sym_get_string_value (sym), +ctime (&now));if (out_h)fprintf (out_h,"/*\n" " * Automatically generated C config: don't edit\n" +" * Linux kernel version: %s\n" +" * %s" " */\n" -"#define AUTOCONF_INCLUDED\n" ); +"#define AUTOCONF_INCLUDED\n" , +sym_get_string_value (sym), +ctime (&now));if (!sym_change_count)sym_clear_all_valid ();
--
Quoted 9 lines · Randy.Dunlap
(from June/2004 email thread:
http://marc.theaimsgroup.com/?t=108753573200001&r=1&w=2
)Several people found this useful, none opposed (afaik).
Saves kernel version in .config file, e.g.:
Quoted 7 lines
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.8-rc3
# Tue Aug 3 22:55:57 2004
#Please merge.
Applied - thanks.
Sam
Quoted 14 lines · Randy.Dunlap
(from June/2004 email thread:
http://marc.theaimsgroup.com/?t=108753573200001&r=1&w=2
)Several people found this useful, none opposed (afaik).
Saves kernel version in .config file, e.g.:
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.8-rc3
# Tue Aug 3 22:55:57 2004
#
Quoted 5 lines
Please merge.
---Save kernel version info and date when writing .config file. Tested with 'make {menuconfig|xconfig|gconfig}'.
I don't see "oldconfig" here, I'm sure there are people who don't care because they want to roll every kernel fresh, but for the rest of us...
Quoted 2 lines
Signed-off-by Randy Dunlap <[email protected]>
Signature · 3 lines
-bill davidsen ([email protected]) "The secret to procrastination is to put things off until the last possible moment - but no longer" -me
On Mon, 09 Aug 2004 16:03:26 -0400 Bill Davidsen wrote:
| Randy.Dunlap wrote: | > (from June/2004 email thread: | > http://marc.theaimsgroup.com/?t=108753573200001&r=1&w=2 | > ) | > | > Several people found this useful, none opposed (afaik). | > | > Saves kernel version in .config file, e.g.: | > | > # | > # Automatically generated make config: don't edit | > # Linux kernel version: 2.6.8-rc3 | > # Tue Aug 3 22:55:57 2004 | > # | > | > Please merge. | > --- | > | > Save kernel version info and date when writing .config file. | > Tested with 'make {menuconfig|xconfig|gconfig}'. | | I don't see "oldconfig" here, I'm sure there are people who don't care | because they want to roll every kernel fresh, but for the rest of us...
OK, I'll change the description (above):
Tested with 'make {menuconfig|xconfig|gconfig|oldconfig}'.
In fact, what I posted in the email ('#' above) was from oldconfig.
--
~Randy
Quoted 6 lines · Randy.Dunlap
OK, I'll change the description (above):
Tested with 'make {menuconfig|xconfig|gconfig|oldconfig}'.
In fact, what I posted in the email ('#' above) was from oldconfig.
I have the patch in my local tree - but due to a few pending issues I not pushed it to linux-sam.bkbits.net/kbuild yet.
Will do so until next -mm
Sam