restore RHEL 6 configuration selections
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 2 Apr 2013 17:02:14 +0000 (19:02 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Tue, 2 Apr 2013 17:02:14 +0000 (19:02 +0200)
This was trickier in the previous compat, but I think
this restores the required options for RHEL6.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
compat/compat/Kconfig
plumbing/Makefile

index c473897402a443063de5c9d102d236a1b9ac8dab..2bb1196377494316ea8361bffb303477a9e4afe9 100644 (file)
@@ -38,6 +38,8 @@
 
 config BACKPORT_BUILD_FW_LOADER
        tristate
+       # RHEL6, starting from 6.0, backports the FW loader already
+       depends on !BACKPORT_RHEL_KERNEL_6_0
        default m if BACKPORT_FW_LOADER && (!FW_LOADER || BACKPORT_KERNEL_2_6_33)
 
 config BACKPORT_FW_LOADER
@@ -57,7 +59,8 @@ config BACKPORT_USERSEL_NET_SCH_FQ_CODEL
 
 config BACKPORT_BUILD_KFIFO
        def_bool y
-       # FIXME: REDHAT_6_1 also includes this
+       # RHEL6, starting from 6.1, backports kfifo already
+       depends on !BACKPORT_RHEL_KERNEL_6_1
        depends on BACKPORT_KERNEL_2_6_36
 
 config BACKPORT_BUILD_CORDIC
@@ -80,8 +83,8 @@ config BACKPORT_BUILD_GENERIC_ATOMIC64
 
 config BACKPORT_OPTION_BT_SOCK_CREATE_NEEDS_KERN
        bool
-       # FIXME: REDHAT_6_0 also requires this
-       default y if !BACKPORT_KERNEL_2_6_33
+       # in RHEL6 (starting from 6.0), the function needs the argument
+       default y if !BACKPORT_KERNEL_2_6_33 || BACKPORT_RHEL_KERNEL_6_0
 
 config BACKPORT_BUILD_AVERAGE
        bool
index 55f7562818926f7c1945a843b56782e62a96ee8b..5fb7863ab6c291546cf9bfe9c0bbf1a15de5707e 100644 (file)
@@ -10,6 +10,7 @@ BACKPORT_PWD := $(shell pwd)
 
 KLIB_BUILD ?= /lib/modules/$(shell uname -r)/build/
 KERNEL_CONFIG := $(KLIB_BUILD)/.config
+KERNEL_MAKEFILE := $(KLIB_BUILD)/Makefile
 CONFIG_MD5 := $(shell md5sum $(KERNEL_CONFIG) | sed 's/\s.*//')
 
 export KLIB_BUILD BACKPORT_PWD
@@ -60,6 +61,15 @@ default:
                        fi                                                              ;\
                        if [ "$$v" = "$$kver" ] ; then print=1 ; fi                     ;\
                done > Kconfig.versions                                                 ;\
+               # RHEL as well, sadly we need to grep for it                            ;\
+               RHEL_MAJOR=$$(grep '^RHEL_MAJOR' $(KERNEL_MAKEFILE) |                   \
+                                       sed 's/.*=\s*\([0-9]*\)/\1/;t;d')               ;\
+               RHEL_MINOR=$$(grep '^RHEL_MINOR' $(KERNEL_MAKEFILE) |                   \
+                                       sed 's/.*=\s*\([0-9]*\)/\1/;t;d')               ;\
+               for v in $$(seq 0 $$RHEL_MINOR) ; do                                    \
+                       echo config BACKPORT_RHEL_KERNEL_$${RHEL_MAJOR}_$$v             ;\
+                       echo "    def_bool y"                                           ;\
+               done >> Kconfig.versions                                                ;\
                echo " done."                                                           ;\
        fi                                                                              ;\
        echo "$(CONFIG_MD5)" > .kernel_config_md5