const char conf_def_filename[] = ".config";
-const char conf_defname[] = "arch/$ARCH/defconfig";
+const char conf_defname[] = "scripts/config/defconfig";
const char *conf_confnames[] = {
".config",
- "/lib/modules/$UNAME_RELEASE/.config",
- "/etc/kernel-config",
- "/boot/config-$UNAME_RELEASE",
conf_defname,
NULL,
};
return name;
}
+void conf_reset(void)
+{
+ struct symbol *sym;
+ int i;
+
+ for_all_symbols(i, sym) {
+ sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED;
+ if (sym_is_choice(sym))
+ sym->flags &= ~SYMBOL_NEW;
+ sym->flags &= ~SYMBOL_VALID;
+ switch (sym->type) {
+ case S_INT:
+ case S_HEX:
+ case S_STRING:
+ if (sym->user.val)
+ free(sym->user.val);
+ default:
+ sym->user.val = NULL;
+ sym->user.tri = no;
+ }
+ }
+}
+
int conf_read_simple(const char *name)
{
FILE *in = NULL;
if (!out_h)
return 1;
}
- sym = sym_lookup("KERNELVERSION", 0);
+ sym = sym_lookup("OPENWRTVERSION", 0);
sym_calc_value(sym);
time(&now);
env = getenv("KCONFIG_NOTIMESTAMP");
fprintf(out, _("#\n"
"# Automatically generated make config: don't edit\n"
- "# Linux kernel version: %s\n"
+ "# OpenWrt version: %s\n"
"%s%s"
"#\n"),
sym_get_string_value(sym),
if (out_h)
fprintf(out_h, "/*\n"
" * Automatically generated C config: don't edit\n"
- " * Linux kernel version: %s\n"
+ " * OpenWrt version: %s\n"
"%s%s"
" */\n"
"#define AUTOCONF_INCLUDED\n",
type = sym->type;
if (type == S_TRISTATE) {
sym_calc_value(modules_sym);
+/* tristate always enabled */
+#if 0
if (modules_sym->curr.tri == no)
type = S_BOOLEAN;
+#endif
}
switch (type) {
case S_BOOLEAN: