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.

131 lines
5.0 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../linux/12-conf-hacks.patch
  5. # Copyright (C) 2008 - 2011 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 -up linux-2.6.36/scripts/kconfig/conf.c.conf_hack linux-2.6.36/scripts/kconfig/conf.c
  21. --- linux-2.6.36/scripts/kconfig/conf.c.conf_hack 2010-12-10 11:05:25.584361328 +0100
  22. +++ linux-2.6.36/scripts/kconfig/conf.c 2010-12-10 11:23:04.154359980 +0100
  23. @@ -33,6 +33,7 @@ enum input_mode {
  24. savedefconfig,
  25. listnewconfig,
  26. oldnoconfig,
  27. + no2modconfig,
  28. } input_mode = oldaskconfig;
  29. char *defconfig_file;
  30. @@ -453,6 +454,7 @@ static struct option long_opts[] = {
  31. {"randconfig", no_argument, NULL, randconfig},
  32. {"listnewconfig", no_argument, NULL, listnewconfig},
  33. {"oldnoconfig", no_argument, NULL, oldnoconfig},
  34. + {"no2modconfig", no_argument, NULL, no2modconfig},
  35. {NULL, 0, NULL, 0}
  36. };
  37. @@ -562,6 +564,9 @@ int main(int ac, char **av)
  38. else if (!stat("all.config", &tmpstat))
  39. conf_read_simple("all.config", S_DEF_USER);
  40. break;
  41. + case no2modconfig:
  42. + conf_read_simple(".config", S_DEF_USER);
  43. + break;
  44. default:
  45. break;
  46. }
  47. @@ -597,6 +602,9 @@ int main(int ac, char **av)
  48. case defconfig:
  49. conf_set_all_new_symbols(def_default);
  50. break;
  51. + case no2modconfig:
  52. + conf_set_all_new_symbols(def_no2mod);
  53. + break;
  54. case savedefconfig:
  55. break;
  56. case oldaskconfig:
  57. diff -up linux-2.6.36/scripts/kconfig/confdata.c.conf_hack linux-2.6.36/scripts/kconfig/confdata.c
  58. --- linux-2.6.36/scripts/kconfig/confdata.c.conf_hack 2010-12-10 11:10:30.434361827 +0100
  59. +++ linux-2.6.36/scripts/kconfig/confdata.c 2010-12-10 11:05:25.622361376 +0100
  60. @@ -991,6 +991,17 @@ void conf_set_all_new_symbols(enum conf_
  61. for_all_symbols(i, sym) {
  62. if (sym_has_value(sym))
  63. continue;
  64. + if ((mode == def_no2mod) && (sym_get_type(sym) == S_TRISTATE)) {
  65. + if (sym_get_tristate_value(sym) == no)
  66. + fprintf(stderr, "Setting %s to 'm'.\n", sym->name);
  67. + if (sym_get_tristate_value(sym) == mod)
  68. + fprintf(stderr, "Keep %s as 'm'.\n", sym->name);
  69. + if (sym_get_tristate_value(sym) != yes)
  70. + sym->def[S_DEF_USER].tri = mod;
  71. + if (!sym_is_choice(sym))
  72. + sym->flags |= SYMBOL_DEF_USER;
  73. + continue;
  74. + }
  75. switch (sym_get_type(sym)) {
  76. case S_BOOLEAN:
  77. case S_TRISTATE:
  78. diff -up linux-2.6.36/scripts/kconfig/lkc.h.conf_hack linux-2.6.36/scripts/kconfig/lkc.h
  79. --- linux-2.6.36/scripts/kconfig/lkc.h.conf_hack 2010-12-10 11:10:46.819361946 +0100
  80. +++ linux-2.6.36/scripts/kconfig/lkc.h 2010-12-10 11:05:25.623361366 +0100
  81. @@ -46,6 +46,7 @@ enum conf_def_mode {
  82. def_default,
  83. def_yes,
  84. def_mod,
  85. + def_no2mod,
  86. def_no,
  87. def_random
  88. };
  89. diff -up linux-2.6.36/scripts/kconfig/Makefile.conf_hack linux-2.6.36/scripts/kconfig/Makefile
  90. --- linux-2.6.36/scripts/kconfig/Makefile.conf_hack 2010-10-20 22:30:22.000000000 +0200
  91. +++ linux-2.6.36/scripts/kconfig/Makefile 2010-12-10 11:23:35.187362246 +0100
  92. @@ -3,7 +3,7 @@
  93. # These targets are used from top-level makefile
  94. PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
  95. - localmodconfig localyesconfig
  96. + localmodconfig localyesconfig no2modconfig
  97. ifdef KBUILD_KCONFIG
  98. Kconfig := $(KBUILD_KCONFIG)
  99. @@ -95,7 +95,7 @@ update-po-config: $(obj)/kxgettext $(obj
  100. $(Q)rm -f arch/um/Kconfig.arch
  101. $(Q)rm -f $(obj)/config.pot
  102. -PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
  103. +PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig no2modconfig
  104. allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
  105. $< --$@ $(Kconfig)
  106. @@ -108,6 +108,9 @@ listnewconfig oldnoconfig: $(obj)/conf
  107. savedefconfig: $(obj)/conf
  108. $< --$@=defconfig $(Kconfig)
  109. +no2modconfig: $(obj)/conf
  110. + $< --$@ $(Kconfig)
  111. +
  112. defconfig: $(obj)/conf
  113. ifeq ($(KBUILD_DEFCONFIG),)
  114. $< --defconfig $(Kconfig)
  115. @@ -135,6 +138,7 @@ help:
  116. @echo ' allnoconfig - New config where all options are answered with no'
  117. @echo ' allyesconfig - New config where all options are accepted with yes'
  118. @echo ' allmodconfig - New config selecting modules when possible'
  119. + @echo ' no2modconfig - New config selecting modules for disabled options'
  120. @echo ' alldefconfig - New config with all symbols set to default'
  121. @echo ' randconfig - New config with random answer to all options'
  122. @echo ' listnewconfig - List new options'