From c0e150acde52e4661675539bf5323309270f2e83 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Thu, 8 Jun 2006 22:12:40 -0700 Subject: kconfig: remove SYMBOL_{YES,MOD,NO} The SYMBOL_{YES,MOD,NO} are not really used anymore (they were more used be the cml1 converter), so just remove them. Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- scripts/kconfig/expr.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'scripts/kconfig/expr.h') diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 1b36ef18c48d..52ea4df8e349 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -78,10 +78,7 @@ struct symbol { #define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) -#define SYMBOL_YES 0x0001 -#define SYMBOL_MOD 0x0002 -#define SYMBOL_NO 0x0004 -#define SYMBOL_CONST 0x0007 +#define SYMBOL_CONST 0x0001 #define SYMBOL_CHECK 0x0008 #define SYMBOL_CHOICE 0x0010 #define SYMBOL_CHOICEVAL 0x0020 -- cgit v1.2.3 From 0c1822e6991a10da6dc391f0a2e2cf5fb2e31238 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Thu, 8 Jun 2006 22:12:41 -0700 Subject: kconfig: allow multiple default values per symbol Extend struct symbol to allow storing multiple default values, which can be used to hold multiple configurations. Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- scripts/kconfig/expr.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/kconfig/expr.h') diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 52ea4df8e349..043859d426d7 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -63,12 +63,17 @@ enum symbol_type { S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER }; +enum { + S_DEF_USER, /* main user value */ +}; + struct symbol { struct symbol *next; char *name; char *help; enum symbol_type type; - struct symbol_value curr, user; + struct symbol_value curr; + struct symbol_value def[4]; tristate visible; int flags; struct property *prop; -- cgit v1.2.3 From 669bfad906522e74ee8d962801552a8c224c0d63 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Thu, 8 Jun 2006 22:12:42 -0700 Subject: kconfig: allow loading multiple configurations Extend conf_read_simple() so it can load multiple configurations. Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- scripts/kconfig/expr.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/kconfig/expr.h') diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 043859d426d7..998cf4f656b8 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -92,10 +92,14 @@ struct symbol { #define SYMBOL_OPTIONAL 0x0100 #define SYMBOL_WRITE 0x0200 #define SYMBOL_CHANGED 0x0400 -#define SYMBOL_NEW 0x0800 #define SYMBOL_AUTO 0x1000 #define SYMBOL_CHECKED 0x2000 #define SYMBOL_WARNED 0x8000 +#define SYMBOL_DEF 0x10000 +#define SYMBOL_DEF_USER 0x10000 +#define SYMBOL_DEF2 0x20000 +#define SYMBOL_DEF3 0x40000 +#define SYMBOL_DEF4 0x80000 #define SYMBOL_MAXLENGTH 256 #define SYMBOL_HASHSIZE 257 -- cgit v1.2.3 From 2e3646e51b2d6415549b310655df63e7e0d7a080 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Thu, 8 Jun 2006 22:12:42 -0700 Subject: kconfig: integrate split config into silentoldconfig Now that kconfig can load multiple configurations, it becomes simple to integrate the split config step, by simply comparing the new .config file with the old auto.conf (and then saving the new auto.conf). A nice side effect is that this saves a bit of disk space and cache, as no data needs to be read from or saved into the splitted config files anymore (e.g. include/config is now 648KB instead of 5.2MB). Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- scripts/kconfig/expr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/kconfig/expr.h') diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 998cf4f656b8..ffd42c7007ee 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -65,6 +65,7 @@ enum symbol_type { enum { S_DEF_USER, /* main user value */ + S_DEF_AUTO, }; struct symbol { @@ -97,7 +98,7 @@ struct symbol { #define SYMBOL_WARNED 0x8000 #define SYMBOL_DEF 0x10000 #define SYMBOL_DEF_USER 0x10000 -#define SYMBOL_DEF2 0x20000 +#define SYMBOL_DEF_AUTO 0x20000 #define SYMBOL_DEF3 0x40000 #define SYMBOL_DEF4 0x80000 -- cgit v1.2.3 From face4374e288372fba67c865eb0c92337f50d5a4 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Thu, 8 Jun 2006 22:12:45 -0700 Subject: kconfig: add defconfig_list/module option This makes it possible to change two options which were hardcoded sofar. 1. Any symbol can now take the role of CONFIG_MODULES 2. The more useful option is to change the list of default file names, which kconfig uses to load the base configuration if .config isn't available. Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- scripts/kconfig/expr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/kconfig/expr.h') diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index ffd42c7007ee..6084525f604b 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -156,6 +156,7 @@ struct file *lookup_file(const char *name); extern struct symbol symbol_yes, symbol_no, symbol_mod; extern struct symbol *modules_sym; +extern struct symbol *sym_defconfig_list; extern int cdebug; struct expr *expr_alloc_symbol(struct symbol *sym); struct expr *expr_alloc_one(enum expr_type type, struct expr *ce); -- cgit v1.2.3