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.

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