OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.7 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../linux26/12-conf-hacks.patch
  5. # Copyright (C) 2008 - 2010 The OpenSDE Project
  6. # Copyright (C) 2004 - 2008 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 ROCK Linux Project
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. # --- SDE-COPYRIGHT-NOTE-END ---
  18. Set all unset options to module. Needed by the OpenSDE Linux kernel
  19. auto configuration.
  20. diff -ruN linux-2.6.32.10-orig/scripts/kconfig/Makefile linux-2.6.32.10/scripts/kconfig/Makefile
  21. --- linux-2.6.32.10-orig/scripts/kconfig/Makefile 2009-12-03 04:51:21.000000000 +0100
  22. +++ linux-2.6.32.10/scripts/kconfig/Makefile 2010-03-25 10:15:26.297247478 +0100
  23. @@ -3,7 +3,7 @@
  24. # These targets are used from top-level makefile
  25. PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
  26. - localmodconfig localyesconfig
  27. + localmodconfig localyesconfig no2modconfig
  28. ifdef KBUILD_KCONFIG
  29. Kconfig := $(KBUILD_KCONFIG)
  30. @@ -81,7 +81,7 @@
  31. $(Q)rm -f arch/um/Kconfig.arch
  32. $(Q)rm -f $(obj)/config.pot
  33. -PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
  34. +PHONY += randconfig allyesconfig allnoconfig allmodconfig no2modconfig defconfig
  35. randconfig: $(obj)/conf
  36. $< -r $(Kconfig)
  37. @@ -95,6 +95,9 @@
  38. allmodconfig: $(obj)/conf
  39. $< -m $(Kconfig)
  40. +no2modconfig: $(obj)/conf
  41. + $< -M $(Kconfig)
  42. +
  43. defconfig: $(obj)/conf
  44. ifeq ($(KBUILD_DEFCONFIG),)
  45. $< -d $(Kconfig)
  46. @@ -119,6 +122,7 @@
  47. @echo ' randconfig - New config with random answer to all options'
  48. @echo ' defconfig - New config with default answer to all options'
  49. @echo ' allmodconfig - New config selecting modules when possible'
  50. + @echo ' no2modconfig - New config selecting modules for disabled options'
  51. @echo ' allyesconfig - New config where all options are accepted with yes'
  52. @echo ' allnoconfig - New config where all options are answered with no'
  53. diff -ruN linux-2.6.32.10-orig/scripts/kconfig/conf.c linux-2.6.32.10/scripts/kconfig/conf.c
  54. --- linux-2.6.32.10-orig/scripts/kconfig/conf.c 2009-12-03 04:51:21.000000000 +0100
  55. +++ linux-2.6.32.10/scripts/kconfig/conf.c 2010-03-25 10:04:47.777577480 +0100
  56. @@ -23,6 +23,7 @@
  57. ask_all,
  58. ask_new,
  59. ask_silent,
  60. + set_no2mod,
  61. set_default,
  62. set_yes,
  63. set_mod,
  64. @@ -439,7 +440,7 @@
  65. bindtextdomain(PACKAGE, LOCALEDIR);
  66. textdomain(PACKAGE);
  67. - while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
  68. + while ((opt = getopt(ac, av, "osdD:nmMyrh")) != -1) {
  69. switch (opt) {
  70. case 'o':
  71. input_mode = ask_silent;
  72. @@ -461,6 +462,9 @@
  73. case 'm':
  74. input_mode = set_mod;
  75. break;
  76. + case 'M':
  77. + input_mode = set_no2mod;
  78. + break;
  79. case 'y':
  80. input_mode = set_yes;
  81. break;
  82. @@ -548,6 +552,9 @@
  83. else if (!stat("all.config", &tmpstat))
  84. conf_read_simple("all.config", S_DEF_USER);
  85. break;
  86. + case set_no2mod:
  87. + conf_read_simple(".config", S_DEF_USER);
  88. + break;
  89. default:
  90. break;
  91. }
  92. @@ -574,6 +581,9 @@
  93. case set_mod:
  94. conf_set_all_new_symbols(def_mod);
  95. break;
  96. + case set_no2mod:
  97. + conf_set_all_new_symbols(def_no2mod);
  98. + break;
  99. case set_random:
  100. conf_set_all_new_symbols(def_random);
  101. break;
  102. diff -ruN linux-2.6.32.10-orig/scripts/kconfig/confdata.c linux-2.6.32.10/scripts/kconfig/confdata.c
  103. --- linux-2.6.32.10-orig/scripts/kconfig/confdata.c 2009-12-03 04:51:21.000000000 +0100
  104. +++ linux-2.6.32.10/scripts/kconfig/confdata.c 2010-03-25 10:04:47.781566395 +0100
  105. @@ -828,6 +828,17 @@
  106. for_all_symbols(i, sym) {
  107. if (sym_has_value(sym))
  108. continue;
  109. + if ((mode == def_no2mod) && (sym_get_type(sym) == S_TRISTATE)) {
  110. + if (sym_get_tristate_value(sym) == no)
  111. + fprintf(stderr, "Setting %s to 'm'.\n", sym->name);
  112. + if (sym_get_tristate_value(sym) == mod)
  113. + fprintf(stderr, "Keep %s as 'm'.\n", sym->name);
  114. + if (sym_get_tristate_value(sym) != yes)
  115. + sym->def[S_DEF_USER].tri = mod;
  116. + if (!sym_is_choice(sym))
  117. + sym->flags |= SYMBOL_DEF_USER;
  118. + continue;
  119. + }
  120. switch (sym_get_type(sym)) {
  121. case S_BOOLEAN:
  122. case S_TRISTATE:
  123. diff -ruN linux-2.6.32.10-orig/scripts/kconfig/lkc.h linux-2.6.32.10/scripts/kconfig/lkc.h
  124. --- linux-2.6.32.10-orig/scripts/kconfig/lkc.h 2009-12-03 04:51:21.000000000 +0100
  125. +++ linux-2.6.32.10/scripts/kconfig/lkc.h 2010-03-25 10:04:47.777577480 +0100
  126. @@ -46,6 +46,7 @@
  127. def_default,
  128. def_yes,
  129. def_mod,
  130. + def_no2mod,
  131. def_no,
  132. def_random
  133. };