Sedat Dilek (11): kbuild: deb-pkg: Try to determine distribution kbuild: deb-pkg: Bump year in debian/copyright file kbuild: deb-pkg: Update git repository URL in debian/copyright file Merge tag 'next-20130426' of git://git.kernel.org/.../next/linux-next into Linux-Next-v20130426 Merge branch 'deb-pkg-fixes' into 3.9.0-rc8-next20130426-1-iniza-small Revert "kconfig: implement KCONFIG_PROBABILITY for randconfig" Revert "kconfig: allow specifying the seed for randconfig" Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" Revert "kconfig: do not override symbols already set" Revert "kconfig: fix randconfig tristate detection" Merge branch 'revert-kbuild-next' into 3.9.0-rc8-next20130426-1-iniza-small Documentation/kbuild/kconfig.txt | 36 ---------------------- scripts/kconfig/conf.c | 12 +------- scripts/kconfig/confdata.c | 66 +++++----------------------------------- scripts/package/builddeb | 19 ++++++++++-- 4 files changed, 24 insertions(+), 109 deletions(-) diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index 3f429ed..b8b77bb 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt @@ -90,42 +90,6 @@ disable the options that are explicitly listed in the specified mini-config files. ______________________________________________________________________ -Environment variables for 'randconfig' - -KCONFIG_SEED --------------------------------------------------- -You can set this to the integer value used to seed the RNG, if you want -to somehow debug the behaviour of the kconfig parser/frontends. -If not set, the current time will be used. - -KCONFIG_PROBABILITY --------------------------------------------------- -This variable can be used to skew the probabilities. This variable can -be unset or empty, or set to three different formats: - KCONFIG_PROBABILITY y:n split y:m:n split - ----------------------------------------------------------------- - unset or empty 50 : 50 33 : 33 : 34 - N N : 100-N N/2 : N/2 : 100-N - [1] N:M N+M : 100-(N+M) N : M : 100-(N+M) - [2] N:M:L N : 100-N M : L : 100-(M+L) - -where N, M and L are integers (in base 10) in the range [0,100], and so -that: - [1] N+M is in the range [0,100] - [2] M+L is in the range [0,100] - -Examples: - KCONFIG_PROBABILITY=10 - 10% of booleans will be set to 'y', 90% to 'n' - 5% of tristates will be set to 'y', 5% to 'm', 90% to 'n' - KCONFIG_PROBABILITY=15:25 - 40% of booleans will be set to 'y', 60% to 'n' - 15% of tristates will be set to 'y', 25% to 'm', 60% to 'n' - KCONFIG_PROBABILITY=10:15:15 - 10% of booleans will be set to 'y', 90% to 'n' - 15% of tristates will be set to 'y', 15% to 'm', 70% to 'n' - -______________________________________________________________________ Environment variables for 'silentoldconfig' KCONFIG_NOSILENTUPDATE diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index bde5b95..e39fcd8 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -13,7 +13,6 @@ #include #include #include -#include #include "lkc.h" @@ -515,23 +514,14 @@ int main(int ac, char **av) { struct timeval now; unsigned int seed; - char *seed_env; /* * Use microseconds derived seed, * compensate for systems where it may be zero */ gettimeofday(&now, NULL); - seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); - seed_env = getenv("KCONFIG_SEED"); - if( seed_env && *seed_env ) { - char *endp; - int tmp = (int)strtol(seed_env, &endp, 10); - if (*endp == '\0') { - seed = tmp; - } - } + seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); srand(seed); break; } diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index fc45fc1..13ddf11 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -288,6 +288,8 @@ load: for_all_symbols(i, sym) { sym->flags |= SYMBOL_CHANGED; sym->flags &= ~(def_flags|SYMBOL_VALID); + if (sym_is_choice(sym)) + sym->flags |= def_flags; switch (sym->type) { case S_INT: case S_HEX: @@ -377,13 +379,13 @@ setsym: case mod: if (cs->def[def].tri == yes) { conf_warning("%s creates inconsistent choice state", sym->name); + cs->flags &= ~def_flags; } break; case yes: if (cs->def[def].tri != no) conf_warning("override: %s changes choice state", sym->name); cs->def[def].val = sym; - cs->flags |= def_flags; break; } cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); @@ -789,8 +791,6 @@ int conf_write(const char *name) sym_calc_value(sym); if (!(sym->flags & SYMBOL_WRITE)) goto next; - if (sym_is_choice_value(sym) && !menu_is_visible(menu->parent)) - goto next; sym->flags &= ~SYMBOL_WRITE; conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); @@ -1077,7 +1077,6 @@ static void randomize_choice_values(struct symbol *csym) else { sym->def[S_DEF_USER].tri = no; } - sym->flags &= ~(SYMBOL_VALID); } csym->flags |= SYMBOL_DEF_USER; /* clear VALID to get value calculated */ @@ -1107,54 +1106,10 @@ static void set_all_choice_values(struct symbol *csym) void conf_set_all_new_symbols(enum conf_def_mode mode) { struct symbol *sym, *csym; - int i, cnt, pby, pty, ptm; /* pby: probability of boolean = y - * pty: probability of tristate = y - * ptm: probability of tristate = m - */ - - pby = 50; pty = ptm = 33; /* can't go as the default in switch-case - * below, otherwise gcc whines about - * -Wmaybe-uninitialized */ - if (mode == def_random) { - int n, p[3]; - char *env = getenv("KCONFIG_PROBABILITY"); - n = 0; - while( env && *env ) { - char *endp; - int tmp = strtol( env, &endp, 10 ); - if( tmp >= 0 && tmp <= 100 ) { - p[n++] = tmp; - } else { - errno = ERANGE; - perror( "KCONFIG_PROBABILITY" ); - exit( 1 ); - } - env = (*endp == ':') ? endp+1 : endp; - if( n >=3 ) { - break; - } - } - switch( n ) { - case 1: - pby = p[0]; ptm = pby/2; pty = pby-ptm; - break; - case 2: - pty = p[0]; ptm = p[1]; pby = pty + ptm; - break; - case 3: - pby = p[0]; pty = p[1]; ptm = p[2]; - break; - } - - if( pty+ptm > 100 ) { - errno = ERANGE; - perror( "KCONFIG_PROBABILITY" ); - exit( 1 ); - } - } + int i, cnt; for_all_symbols(i, sym) { - if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID)) + if (sym_has_value(sym)) continue; switch (sym_get_type(sym)) { case S_BOOLEAN: @@ -1170,15 +1125,8 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) sym->def[S_DEF_USER].tri = no; break; case def_random: - sym->def[S_DEF_USER].tri = no; - cnt = rand() % 100; - if (sym->type == S_TRISTATE) { - if (cnt < pty) - sym->def[S_DEF_USER].tri = yes; - else if (cnt < (pty+ptm)) - sym->def[S_DEF_USER].tri = mod; - } else if (cnt < pby) - sym->def[S_DEF_USER].tri = yes; + cnt = sym_get_type(sym) == S_TRISTATE ? 3 : 2; + sym->def[S_DEF_USER].tri = (tristate)(rand() % cnt); break; default: continue; diff --git a/scripts/package/builddeb b/scripts/package/builddeb index acb8650..7d7c9d8 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -172,9 +172,22 @@ else fi maintainer="$name <$email>" +# Try to determine distribution +if [ -e $(which lsb_release) ]; then + codename=$(lsb_release --codename --short) + if [ "$codename" != "" ]; then + distribution=$codename + else + distribution="UNRELEASED" + echo "WARNING: The distribution could NOT be determined!" + fi +else + echo "HINT: Install lsb_release binary, this helps to identify your distribution!" +fi + # Generate a simple changelog template cat < debian/changelog -linux-upstream ($packageversion) unstable; urgency=low +linux-upstream ($packageversion) $distribution; urgency=low * Custom built Linux kernel. @@ -188,10 +201,10 @@ This is a packacked upstream version of the Linux kernel. The sources may be found at most Linux ftp sites, including: ftp://ftp.kernel.org/pub/linux/kernel -Copyright: 1991 - 2009 Linus Torvalds and others. +Copyright: 1991 - 2013 Linus Torvalds and others. The git repository for mainline kernel development is at: -git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git +git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by