backports: kernel integration support
Subsystems (3)
cover backports: kernel integration support
From: "Luis R. Rodriguez" <[email protected]>
Here's my first batch if changes I've been grooming so far in order to support kernel integration for backports, that is in oder to allow folks to use backports to place drivers from future kernels backported for target specific older kernel source trees.
We got away with not doing much modifications on backports for external module packages by relying on the CPTCFG hack which in itself relies on the fact that kconfig internally uses CONFIG_ as a macro for a getenv(), for kernel integration relying on this doesn't work well, so we either diverge for kernel integration or try to find a unified solution. Since we have to address built-in support it seems best to just address unifying the solution so I went with a CONFIG_BACKPORT prefix instead of CPTCFG. This requires quite a bit of changes on the Kconfig entries but also on the Makefiles.
Another set of changes required for kernel integration is to ensure we provide a full path to the directory where we have our backport sources, for an external package this is all relateive to the parent directory but for kernel integration I've stuffed all backport code on the backports/ directory of the kernel source, this meant having to specify a variable for our paths so that we can use the same Makefiles for both packages / kernel integration.
This bit of changes are just the first step, but since this is also a major change I think its best we start reviewing this now. So far things look OK and I just have to address what went wrong with compilation on older kernels:
mcgrof@drvbp1 ~/build/next-20141023 $ cat ckmake-report.log
1 3.0.101 [ FAIL ] 2 3.1.10 [ FAIL ] 3 3.2.62 [ FAIL ] 4 3.3.8 [ FAIL ] 5 3.4.104 [ FAIL ] 6 3.5.7 [ FAIL ] 7 3.6.11 [ FAIL ] 8 3.7.10 [ FAIL ] 9 3.8.13 [ FAIL ] 10 3.9.11 [ FAIL ] 11 3.10.58 [ OK ] 12 3.11.10 [ OK ] 13 3.12.31 [ OK ] 14 3.13.11 [ OK ] 15 3.14.22 [ OK ] 16 3.15.10 [ OK ] 17 3.16.6 [ OK ] 18 3.17.1 [ OK ] 19 3.18-rc1 [ OK ]
Once this is address the next steps to take to finish kernel integration shouldn't be too hard. The real difficulty here is actually the logic behind what we should do for symbols on the kconfig entries once backported. I've stuffed most of that logic on the kconfig library we have, it is OK but with time I think we might want something a bit more well refined.
If this looks OK I'll continue to chug on. Let me know.
Luis R. Rodriguez (3):
backports: replace CPTCFG prefix for CONFIG_BACKPORT
backports: replace BACKPORT_PWD with BACKPORT_DIR
backports: use BACKPORT_DIR prefix on kconfig sources
backport/Kconfig | 43 +- backport/Makefile | 6 +- backport/Makefile.build | 4 +- backport/Makefile.kernel | 36 +- backport/Makefile.real | 4 +- backport/backport-include/asm/dma-mapping.h | 4 +- backport/backport-include/backport/backport.h | 1 - backport/backport-include/backport/checks.h | 12 - backport/backport-include/backport/leds-disabled.h | 2 +- backport/backport-include/net/net_namespace.h | 4 +- backport/compat/Makefile | 38 +- backport/compat/backport-3.15.c | 4 +- backport/compat/backports.h | 4 +- backport/defconfigs/alx | 2 +- backport/defconfigs/ar5523 | 16 +- backport/defconfigs/ath10k | 22 +- backport/defconfigs/ath5k | 16 +- backport/defconfigs/ath6kl | 14 +- backport/defconfigs/ath9k | 18 +- backport/defconfigs/ath9k-debug | 38 +- backport/defconfigs/b43 | 40 +- backport/defconfigs/b43legacy | 24 +- backport/defconfigs/brcmfmac | 14 +- backport/defconfigs/brcmsmac | 18 +- backport/defconfigs/carl9170 | 16 +- backport/defconfigs/cw1200 | 18 +- backport/defconfigs/hwsim | 24 +- backport/defconfigs/ieee802154 | 16 +- backport/defconfigs/igb | 4 +- backport/defconfigs/iwlwifi | 34 +- backport/defconfigs/media | 1026 ++++++++++---------- backport/defconfigs/nfc | 40 +- backport/defconfigs/rtlwifi | 46 +- backport/defconfigs/wcn36xx | 26 +- backport/defconfigs/wifi | 232 ++--- backport/defconfigs/wil6210 | 10 +- backport/defconfigs/wwan | 12 +- backport/scripts/uninstall.sh | 4 +- devel/ckmake | 4 +- devel/doc/kconfig-operation | 22 +- gentree.py | 30 +- lib/kconfig.py | 126 ++- patches/backport-adjustments/devcoredump.patch | 4 +- 43 files changed, 1092 insertions(+), 986 deletions(-) delete mode 100644 backport/backport-include/backport/checks.h
Signature · 1 line
2.1.1
RFC 1/3 backports: replace CPTCFG prefix for CONFIG_BACKPORT
From: "Luis R. Rodriguez" <[email protected]>
In order to support built-in kernel integration we want to use a more generic approach to defining symbols, CPTCFG was nice as it was short and relied on the fact that kconfig can work with a getenv(CONFIG_) but for kernel integration this doesn't work so well. Instead let's just stick to the regular CONFIG_ namespace and add the BACKPORT prefix to it.
Apart from these expected changes:
for i in $(find ./ | grep -v "\.git"); do perl -pi -e'$_ =~ s|CPTCFG|CONFIG_BACKPORT|gs;' $i; done
we also had to modify Makefiles and Kconfig entries quite a bit in order to accomplish the same goal. This means extending our kconfig parser. This adds some initial code for integration, this doesn't run yet.
Since we have to really understand what is in your kernel, what we carry over, and deal with this on the Kconfig parser we can now easily just ensure that whenever we backport a solution that the user doesn't have this built-in. We previously had a checks.h file for this but with these new changes this is no longer needed.
--- backport/Kconfig | 6 +- backport/Makefile.kernel | 36 +- backport/Makefile.real | 2 +- backport/backport-include/asm/dma-mapping.h | 4 +- backport/backport-include/backport/backport.h | 1 - backport/backport-include/backport/checks.h | 12 - backport/backport-include/backport/leds-disabled.h | 2 +- backport/backport-include/net/net_namespace.h | 4 +- backport/compat/Makefile | 38 +- backport/compat/backport-3.15.c | 4 +- backport/compat/backports.h | 4 +- backport/defconfigs/alx | 2 +- backport/defconfigs/ar5523 | 16 +- backport/defconfigs/ath10k | 22 +- backport/defconfigs/ath5k | 16 +- backport/defconfigs/ath6kl | 14 +- backport/defconfigs/ath9k | 18 +- backport/defconfigs/ath9k-debug | 38 +- backport/defconfigs/b43 | 40 +- backport/defconfigs/b43legacy | 24 +- backport/defconfigs/brcmfmac | 14 +- backport/defconfigs/brcmsmac | 18 +- backport/defconfigs/carl9170 | 16 +- backport/defconfigs/cw1200 | 18 +- backport/defconfigs/hwsim | 24 +- backport/defconfigs/ieee802154 | 16 +- backport/defconfigs/igb | 4 +- backport/defconfigs/iwlwifi | 34 +- backport/defconfigs/media | 1026 ++++++++++---------- backport/defconfigs/nfc | 40 +- backport/defconfigs/rtlwifi | 46 +- backport/defconfigs/wcn36xx | 26 +- backport/defconfigs/wifi | 232 ++--- backport/defconfigs/wil6210 | 10 +- backport/defconfigs/wwan | 12 +- devel/ckmake | 4 +- devel/doc/kconfig-operation | 22 +- gentree.py | 30 +- lib/kconfig.py | 79 +- patches/backport-adjustments/devcoredump.patch | 4 +- 40 files changed, 1028 insertions(+), 950 deletions(-) delete mode 100644 backport/backport-include/backport/checks.h
backport/Kconfig +5 -1
@@ -14,11 +14,15 @@ config BACKPORTED_KERNEL_NAME source Kconfig.kernel source Kconfig.versions -# some hacks ... +# some hacks for when we use backports to generate a package +# to build modules out of tree. +#ignore-parser-package config WIRELESS def_bool y +#ignore-parser-package config NET_CORE def_bool y +#ignore-parser-package config EXPERT def_bool y
backport/Makefile.kernel +18 -18
@@ -20,23 +20,23 @@ export backport_srctree = $(M) obj-y += compat/ -obj-$(CPTCFG_CFG80211) += net/wireless/ -obj-$(CPTCFG_MAC80211) += net/mac80211/ -obj-$(CPTCFG_WLAN) += drivers/net/wireless/ -obj-$(CPTCFG_BT) += net/bluetooth/ -obj-$(CPTCFG_BT) += drivers/bluetooth/ -obj-$(CPTCFG_SSB) += drivers/ssb/ -obj-$(CPTCFG_BCMA) += drivers/bcma/ -obj-$(CPTCFG_ETHERNET) += drivers/net/ethernet/ -obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/ -obj-$(CPTCFG_NFC) += net/nfc/ -obj-$(CPTCFG_NFC) += drivers/nfc/ -obj-$(CPTCFG_MEDIA_SUPPORT) += drivers/media/ +obj-$(CONFIG_BACKPORT_CFG80211) += net/wireless/ +obj-$(CONFIG_BACKPORT_MAC80211) += net/mac80211/ +obj-$(CONFIG_BACKPORT_WLAN) += drivers/net/wireless/ +obj-$(CONFIG_BACKPORT_BT) += net/bluetooth/ +obj-$(CONFIG_BACKPORT_BT) += drivers/bluetooth/ +obj-$(CONFIG_BACKPORT_SSB) += drivers/ssb/ +obj-$(CONFIG_BACKPORT_BCMA) += drivers/bcma/ +obj-$(CONFIG_BACKPORT_ETHERNET) += drivers/net/ethernet/ +obj-$(CONFIG_BACKPORT_USB_NET_RNDIS_WLAN) += drivers/net/usb/ +obj-$(CONFIG_BACKPORT_NFC) += net/nfc/ +obj-$(CONFIG_BACKPORT_NFC) += drivers/nfc/ +obj-$(CONFIG_BACKPORT_MEDIA_SUPPORT) += drivers/media/ -obj-$(CPTCFG_IEEE802154) += net/ieee802154/ -obj-$(CPTCFG_BT) += net/ieee802154/ -obj-$(CPTCFG_MAC802154) += net/mac802154/ -obj-$(CPTCFG_IEEE802154) += drivers/net/ieee802154/ +obj-$(CONFIG_BACKPORT_IEEE802154) += net/ieee802154/ +obj-$(CONFIG_BACKPORT_BT) += net/ieee802154/ +obj-$(CONFIG_BACKPORT_MAC802154) += net/mac802154/ +obj-$(CONFIG_BACKPORT_IEEE802154) += drivers/net/ieee802154/ -obj-$(CPTCFG_USB_WDM) += drivers/usb/class/ -obj-$(CPTCFG_USB_USBNET) += drivers/net/usb/ +obj-$(CONFIG_BACKPORT_USB_WDM) += drivers/usb/class/ +obj-$(CONFIG_BACKPORT_USB_USBNET) += drivers/net/usb/
backport/Makefile.real +1 -1
@@ -9,7 +9,7 @@ endif # disable built-in rules for this file .SUFFIXES: -export CONFIG_=CPTCFG_ +#export CONFIG_=CONFIG_BACKPORT_ .PHONY: menuconfig menuconfig:
backport/backport-include/asm/dma-mapping.h +2 -2
@@ -3,12 +3,12 @@#include_next <asm/dma-mapping.h>#include <linux/version.h> -#if defined(CPTCFG_BACKPORT_BUILD_DMA_SHARED_HELPERS ) +#if defined(CONFIG_BACKPORT_BUILD_DMA_SHARED_HELPERS )#define dma_common_get_sgtable LINUX_BACKPORT(dma_common_get_sgtable)int dma_common_get_sgtable (struct device *dev,struct sg_table *sgt,void *cpu_addr,dma_addr_t dma_addr,size_t size); -#endif /* defined(CPTCFG_BACKPORT_BUILD_DMA_SHARED_HELPERS) */ +#endif /* defined(CONFIG_BACKPORT_BUILD_DMA_SHARED_HELPERS) */ #if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,6 ,0 )
backport/backport-include/backport/backport.h +0 -1
@@ -5,7 +5,6 @@#ifndef __ASSEMBLY__#define LINUX_BACKPORT (__sym) backport_ ##__sym -#include <backport/checks.h> #endif #endif /* __BACKPORT_H */
backport/backport-include/backport/checks.h deleted +0 -12
@@ -1,12 +0,0 @@ -#ifndef __BACKPORT_CHECKS -#define __BACKPORT_CHECKS - -#if defined(CONFIG_MAC80211 ) && defined(CPTCFG_MAC80211 ) -#error "You must not have mac80211 built into your kernel if you want to enable it" -#endif - -#if defined(CONFIG_CFG80211 ) && defined(CPTCFG_CFG80211 ) -#error "You must not have cfg80211 built into your kernel if you want to enable it" -#endif - -#endif /* __BACKPORT_CHECKS */
backport/backport-include/backport/leds-disabled.h +1 -1
@@ -8,7 +8,7 @@* allows compilation. */ -#ifdef CPTCFG_BACKPORT_BUILD_LEDS +#ifdef CONFIG_BACKPORT_BUILD_LEDS #include <linux/list.h> #include <linux/spinlock.h> #include <linux/rwsem.h>
backport/backport-include/net/net_namespace.h +2 -2
@@ -3,7 +3,7 @@#include_next <net/net_namespace.h> -#if IS_ENABLED (CPTCFG_IEEE802154_6LOWPAN ) +#if IS_ENABLED (CONFIG_BACKPORT_IEEE802154_6LOWPAN )#include <linux/version.h> #include <net/netns/ieee802154_6lowpan.h>
@@ -22,6 +22,6 @@ net_ieee802154_lowpan(struct net *net)return &net->ieee802154_lowpan; }#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) */ -#endif /* CPTCFG_IEEE802154_6LOWPAN */ +#endif /* CONFIG_BACKPORT_IEEE802154_6LOWPAN */ #endif /* _COMPAT_NET_NET_NAMESPACE_H */
backport/compat/Makefile +19 -19
@@ -3,23 +3,23 @@ obj-m += compat.o compat-y += main.o # Kernel backport compatibility code -compat-$(CPTCFG_BACKPORT_KERNEL_3_0) += compat-3.0.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_1) += compat-3.1.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_2) += backport-3.2.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_3) += compat-3.3.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_4) += compat-3.4.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_5) += compat-3.5.o user_namespace.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_6) += compat-3.6.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_7) += compat-3.7.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_8) += compat-3.8.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_9) += compat-3.9.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_10) += backport-3.10.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_12) += backport-3.12.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_13) += backport-3.13.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_14) += backport-3.14.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_15) += backport-3.15.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_17) += backport-3.17.o -compat-$(CPTCFG_BACKPORT_KERNEL_3_18) += backport-3.18.o +compat-$(CONFIG_BACKPORT_KERNEL_3_0) += compat-3.0.o +compat-$(CONFIG_BACKPORT_KERNEL_3_1) += compat-3.1.o +compat-$(CONFIG_BACKPORT_KERNEL_3_2) += backport-3.2.o +compat-$(CONFIG_BACKPORT_KERNEL_3_3) += compat-3.3.o +compat-$(CONFIG_BACKPORT_KERNEL_3_4) += compat-3.4.o +compat-$(CONFIG_BACKPORT_KERNEL_3_5) += compat-3.5.o user_namespace.o +compat-$(CONFIG_BACKPORT_KERNEL_3_6) += compat-3.6.o +compat-$(CONFIG_BACKPORT_KERNEL_3_7) += compat-3.7.o +compat-$(CONFIG_BACKPORT_KERNEL_3_8) += compat-3.8.o +compat-$(CONFIG_BACKPORT_KERNEL_3_9) += compat-3.9.o +compat-$(CONFIG_BACKPORT_KERNEL_3_10) += backport-3.10.o +compat-$(CONFIG_BACKPORT_KERNEL_3_12) += backport-3.12.o +compat-$(CONFIG_BACKPORT_KERNEL_3_13) += backport-3.13.o +compat-$(CONFIG_BACKPORT_KERNEL_3_14) += backport-3.14.o +compat-$(CONFIG_BACKPORT_KERNEL_3_15) += backport-3.15.o +compat-$(CONFIG_BACKPORT_KERNEL_3_17) += backport-3.17.o +compat-$(CONFIG_BACKPORT_KERNEL_3_18) += backport-3.18.o -compat-$(CPTCFG_BACKPORT_BUILD_CRYPTO_CCM) += crypto-ccm.o -compat-$(CPTCFG_BACKPORT_BUILD_DMA_SHARED_HELPERS) += dma-shared-helpers.o +compat-$(CONFIG_BACKPORT_BUILD_CRYPTO_CCM) += crypto-ccm.o +compat-$(CONFIG_BACKPORT_BUILD_DMA_SHARED_HELPERS) += dma-shared-helpers.o
backport/compat/backport-3.15.c +2 -2
@@ -15,7 +15,7 @@#include <linux/string.h> #include <net/net_namespace.h> -#if IS_ENABLED (CPTCFG_IEEE802154_6LOWPAN ) +#if IS_ENABLED (CONFIG_BACKPORT_IEEE802154_6LOWPAN )#if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,15 ,0 )/* the above kernel dependency is set to match the dependencies file */ struct netns_ieee802154_lowpan ieee802154_lowpan;
@@ -27,7 +27,7 @@ struct netns_ieee802154_lowpan *net_ieee802154_lowpan(struct net *net) }EXPORT_SYMBOL_GPL (net_ieee802154_lowpan);#endif -#endif /* CPTCFG_IEEE802154_6LOWPAN */ +#endif /* CONFIG_BACKPORT_IEEE802154_6LOWPAN */ /** * devm_kstrdup - Allocate resource managed space and
backport/compat/backports.h +2 -2
@@ -3,7 +3,7 @@#include <linux/version.h> -#ifdef CPTCFG_BACKPORT_BUILD_CRYPTO_CCM +#ifdef CONFIG_BACKPORT_BUILD_CRYPTO_CCM int crypto_ccm_module_init (void );void crypto_ccm_module_exit (void );#else
@@ -13,7 +13,7 @@ static inline void crypto_ccm_module_exit(void) {}#endif -#ifdef CPTCFG_BACKPORT_BUILD_WANT_DEV_COREDUMP +#ifdef CONFIG_BACKPORT_BUILD_WANT_DEV_COREDUMP int devcoredump_init (void );void devcoredump_exit (void );#else
backport/defconfigs/alx +1 -1
@@ -1 +1 @@ -CPTCFG_ALX=m +CONFIG_BACKPORT_ALX=m
backport/defconfigs/ar5523 +8 -8
@@ -1,8 +1,8 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_LEDS=y -CPTCFG_MAC80211_MESH=y -CPTCFG_WLAN=y -CPTCFG_ATH_CARDS=m -CPTCFG_AR5523=m +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_MAC80211_MESH=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_ATH_CARDS=m +CONFIG_BACKPORT_AR5523=m
backport/defconfigs/ath10k +11 -11
@@ -1,11 +1,11 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_LEDS=y -CPTCFG_MAC80211_MESH=y -CPTCFG_WLAN=y -CPTCFG_ATH_CARDS=m -CPTCFG_ATH10K_PCI=m -CPTCFG_ATH10K=m -CPTCFG_ATH10K_DEBUG=y -CPTCFG_ATH10K_DEBUGFS=y +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_MAC80211_MESH=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_ATH_CARDS=m +CONFIG_BACKPORT_ATH10K_PCI=m +CONFIG_BACKPORT_ATH10K=m +CONFIG_BACKPORT_ATH10K_DEBUG=y +CONFIG_BACKPORT_ATH10K_DEBUGFS=y
backport/defconfigs/ath5k +8 -8
@@ -1,8 +1,8 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_LEDS=y -CPTCFG_MAC80211_MESH=y -CPTCFG_WLAN=y -CPTCFG_ATH_CARDS=m -CPTCFG_ATH5K=m +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_MAC80211_MESH=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_ATH_CARDS=m +CONFIG_BACKPORT_ATH5K=m
backport/defconfigs/ath6kl +7 -7
@@ -1,7 +1,7 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_WLAN=y -CPTCFG_ATH_CARDS=m -CPTCFG_ATH6KL=m -CPTCFG_ATH6KL_SDIO=m -CPTCFG_ATH6KL_USB=m +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_ATH_CARDS=m +CONFIG_BACKPORT_ATH6KL=m +CONFIG_BACKPORT_ATH6KL_SDIO=m +CONFIG_BACKPORT_ATH6KL_USB=m
backport/defconfigs/ath9k +9 -9
@@ -1,9 +1,9 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_LEDS=y -CPTCFG_MAC80211_MESH=y -CPTCFG_WLAN=y -CPTCFG_ATH_CARDS=m -CPTCFG_ATH9K=m -CPTCFG_ATH9K_HTC=m +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_MAC80211_MESH=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_ATH_CARDS=m +CONFIG_BACKPORT_ATH9K=m +CONFIG_BACKPORT_ATH9K_HTC=m
backport/defconfigs/ath9k-debug +19 -19
@@ -1,19 +1,19 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_LEDS=y -CPTCFG_MAC80211_MESH=y -CPTCFG_MAC80211_DEBUGFS=y -CPTCFG_MAC80211_DEBUG_MENU=y -CPTCFG_MAC80211_VERBOSE_DEBUG=y -CPTCFG_MAC80211_MLME_DEBUG=y -CPTCFG_MAC80211_STA_DEBUG=y -CPTCFG_MAC80211_HT_DEBUG=y -CPTCFG_MAC80211_IBSS_DEBUG=y -CPTCFG_MAC80211_PS_DEBUG=y -CPTCFG_WLAN=y -CPTCFG_ATH_CARDS=m -CPTCFG_ATH9K=m -CPTCFG_ATH9K_HTC=m -CPTCFG_ATH_DEBUG=y -CPTCFG_ATH9K_DEBUGFS=y +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_MAC80211_MESH=y +CONFIG_BACKPORT_MAC80211_DEBUGFS=y +CONFIG_BACKPORT_MAC80211_DEBUG_MENU=y +CONFIG_BACKPORT_MAC80211_VERBOSE_DEBUG=y +CONFIG_BACKPORT_MAC80211_MLME_DEBUG=y +CONFIG_BACKPORT_MAC80211_STA_DEBUG=y +CONFIG_BACKPORT_MAC80211_HT_DEBUG=y +CONFIG_BACKPORT_MAC80211_IBSS_DEBUG=y +CONFIG_BACKPORT_MAC80211_PS_DEBUG=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_ATH_CARDS=m +CONFIG_BACKPORT_ATH9K=m +CONFIG_BACKPORT_ATH9K_HTC=m +CONFIG_BACKPORT_ATH_DEBUG=y +CONFIG_BACKPORT_ATH9K_DEBUGFS=y
backport/defconfigs/b43 +20 -20
@@ -1,20 +1,20 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_MESH=y -CPTCFG_MAC80211_LEDS=y -CPTCFG_WLAN=y -CPTCFG_B43=m -CPTCFG_B43_BCMA=y -CPTCFG_B43_PCMCIA=y -CPTCFG_B43_SDIO=y -CPTCFG_B43_PHY_N=y -CPTCFG_B43_PHY_LP=y -CPTCFG_B43_PHY_HT=y -CPTCFG_BCMA=m -CPTCFG_BCMA_HOST_PCI=y -CPTCFG_SSB=m -CPTCFG_SSB_PCIHOST=y -CPTCFG_SSB_PCMCIAHOST=y -CPTCFG_SSB_SDIOHOST=y -CPTCFG_SSB_DRIVER_PCICORE=y +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_MESH=y +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_B43=m +CONFIG_BACKPORT_B43_BCMA=y +CONFIG_BACKPORT_B43_PCMCIA=y +CONFIG_BACKPORT_B43_SDIO=y +CONFIG_BACKPORT_B43_PHY_N=y +CONFIG_BACKPORT_B43_PHY_LP=y +CONFIG_BACKPORT_B43_PHY_HT=y +CONFIG_BACKPORT_BCMA=m +CONFIG_BACKPORT_BCMA_HOST_PCI=y +CONFIG_BACKPORT_SSB=m +CONFIG_BACKPORT_SSB_PCIHOST=y +CONFIG_BACKPORT_SSB_PCMCIAHOST=y +CONFIG_BACKPORT_SSB_SDIOHOST=y +CONFIG_BACKPORT_SSB_DRIVER_PCICORE=y
backport/defconfigs/b43legacy +12 -12
@@ -1,12 +1,12 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_MESH=y -CPTCFG_MAC80211_LEDS=y -CPTCFG_WLAN=y -CPTCFG_B43LEGACY=m -CPTCFG_SSB=m -CPTCFG_SSB_PCIHOST=y -CPTCFG_SSB_PCMCIAHOST=y -CPTCFG_SSB_SDIOHOST=y -CPTCFG_SSB_DRIVER_PCICORE=y +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_MESH=y +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_B43LEGACY=m +CONFIG_BACKPORT_SSB=m +CONFIG_BACKPORT_SSB_PCIHOST=y +CONFIG_BACKPORT_SSB_PCMCIAHOST=y +CONFIG_BACKPORT_SSB_SDIOHOST=y +CONFIG_BACKPORT_SSB_DRIVER_PCICORE=y
backport/defconfigs/brcmfmac +7 -7
@@ -1,7 +1,7 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_WLAN=y -CPTCFG_BRCMFMAC=m -CPTCFG_BRCMFMAC_SDIO=y -CPTCFG_BRCMFMAC_USB=y -CPTCFG_BRCMFMAC_PCIE=y +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_BRCMFMAC=m +CONFIG_BACKPORT_BRCMFMAC_SDIO=y +CONFIG_BACKPORT_BRCMFMAC_USB=y +CONFIG_BACKPORT_BRCMFMAC_PCIE=y
backport/defconfigs/brcmsmac +9 -9
@@ -1,9 +1,9 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_LEDS=y -CPTCFG_WLAN=y -CPTCFG_BRCMSMAC=m -CPTCFG_BCMA=m -CPTCFG_BCMA_HOST_PCI=y -CPTCFG_BCMA_DRIVER_GPIO=y +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_BRCMSMAC=m +CONFIG_BACKPORT_BCMA=m +CONFIG_BACKPORT_BCMA_HOST_PCI=y +CONFIG_BACKPORT_BCMA_DRIVER_GPIO=y
backport/defconfigs/carl9170 +8 -8
@@ -1,8 +1,8 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_LEDS=y -CPTCFG_MAC80211_MESH=y -CPTCFG_WLAN=y -CPTCFG_ATH_CARDS=m -CPTCFG_CARL9170=m +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_MAC80211_MESH=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_ATH_CARDS=m +CONFIG_BACKPORT_CARL9170=m
backport/defconfigs/cw1200 +9 -9
@@ -1,9 +1,9 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -CPTCFG_MAC80211_LEDS=y -CPTCFG_MAC80211_MESH=y -CPTCFG_WLAN=y -CPTCFG_CW1200=m -CPTCFG_CW1200_WLAN_SDIO=m -CPTCFG_CW1200_WLAN_SPI=m +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_LEDS=y +CONFIG_BACKPORT_MAC80211_MESH=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_CW1200=m +CONFIG_BACKPORT_CW1200_WLAN_SDIO=m +CONFIG_BACKPORT_CW1200_WLAN_SPI=m
backport/defconfigs/hwsim +12 -12
@@ -1,12 +1,12 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_DEFAULT_PS=y -CPTCFG_CFG80211_DEBUGFS=y -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -# CPTCFG_MAC80211_RC_PID is not set -# CPTCFG_MAC80211_RC_MINSTREL is not set -# CPTCFG_MAC80211_RC_DEFAULT_MINSTREL is not set -CPTCFG_MAC80211_DEBUGFS=y -CPTCFG_MAC80211_MESSAGE_TRACING=y -CPTCFG_WLAN=y -CPTCFG_MAC80211_HWSIM=m +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_DEFAULT_PS=y +CONFIG_BACKPORT_CFG80211_DEBUGFS=y +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +# CONFIG_BACKPORT_MAC80211_RC_PID is not set +# CONFIG_BACKPORT_MAC80211_RC_MINSTREL is not set +# CONFIG_BACKPORT_MAC80211_RC_DEFAULT_MINSTREL is not set +CONFIG_BACKPORT_MAC80211_DEBUGFS=y +CONFIG_BACKPORT_MAC80211_MESSAGE_TRACING=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_MAC80211_HWSIM=m
backport/defconfigs/ieee802154 +8 -8
@@ -1,8 +1,8 @@ -CPTCFG_IEEE802154_DRIVERS=m -CPTCFG_IEEE802154_FAKEHARD=m -CPTCFG_IEEE802154_FAKELB=m -CPTCFG_IEEE802154_AT86RF230=m -CPTCFG_IEEE802154_MRF24J40=m -CPTCFG_IEEE802154=m -CPTCFG_IEEE802154_6LOWPAN=m -CPTCFG_MAC802154=m +CONFIG_BACKPORT_IEEE802154_DRIVERS=m +CONFIG_BACKPORT_IEEE802154_FAKEHARD=m +CONFIG_BACKPORT_IEEE802154_FAKELB=m +CONFIG_BACKPORT_IEEE802154_AT86RF230=m +CONFIG_BACKPORT_IEEE802154_MRF24J40=m +CONFIG_BACKPORT_IEEE802154=m +CONFIG_BACKPORT_IEEE802154_6LOWPAN=m +CONFIG_BACKPORT_MAC802154=m
backport/defconfigs/igb +2 -2
@@ -1,2 +1,2 @@ -CPTCFG_NET_VENDOR_INTEL=y -CPTCFG_IGB=m +CONFIG_BACKPORT_NET_VENDOR_INTEL=y +CONFIG_BACKPORT_IGB=m
backport/defconfigs/iwlwifi +17 -17
@@ -1,17 +1,17 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_DEFAULT_PS=y -CPTCFG_CFG80211_DEBUGFS=y -CPTCFG_CFG80211_WEXT=y -CPTCFG_MAC80211=m -# CPTCFG_MAC80211_RC_PID is not set -# CPTCFG_MAC80211_RC_MINSTREL is not set -# CPTCFG_MAC80211_RC_DEFAULT_MINSTREL is not set -CPTCFG_MAC80211_DEBUGFS=y -CPTCFG_MAC80211_MESSAGE_TRACING=y -CPTCFG_WLAN=y -CPTCFG_IWLWIFI=m -CPTCFG_IWLDVM=m -CPTCFG_IWLMVM=m -CPTCFG_IWLWIFI_DEBUG=y -CPTCFG_IWLWIFI_DEBUGFS=y -CPTCFG_IWLWIFI_DEVICE_TRACING=y +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_DEFAULT_PS=y +CONFIG_BACKPORT_CFG80211_DEBUGFS=y +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_MAC80211=m +# CONFIG_BACKPORT_MAC80211_RC_PID is not set +# CONFIG_BACKPORT_MAC80211_RC_MINSTREL is not set +# CONFIG_BACKPORT_MAC80211_RC_DEFAULT_MINSTREL is not set +CONFIG_BACKPORT_MAC80211_DEBUGFS=y +CONFIG_BACKPORT_MAC80211_MESSAGE_TRACING=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_IWLWIFI=m +CONFIG_BACKPORT_IWLDVM=m +CONFIG_BACKPORT_IWLMVM=m +CONFIG_BACKPORT_IWLWIFI_DEBUG=y +CONFIG_BACKPORT_IWLWIFI_DEBUGFS=y +CONFIG_BACKPORT_IWLWIFI_DEVICE_TRACING=y
backport/defconfigs/media +513 -513
1,026 lines not on this page · raw message
backport/defconfigs/nfc +20 -20
@@ -1,20 +1,20 @@ -CPTCFG_NFC=m -CPTCFG_NFC_DIGITAL=m -CPTCFG_NFC_HCI=m -CPTCFG_NFC_MEI_PHY=m -CPTCFG_NFC_MICROREAD=m -CPTCFG_NFC_MICROREAD_I2C=m -CPTCFG_NFC_MICROREAD_MEI=m -CPTCFG_NFC_MRVL=m -CPTCFG_NFC_MRVL_USB=m -CPTCFG_NFC_NCI=m -CPTCFG_NFC_NCI_SPI=y -CPTCFG_NFC_PN533=m -CPTCFG_NFC_PN544=m -CPTCFG_NFC_PN544_I2C=m -CPTCFG_NFC_PN544_MEI=m -CPTCFG_NFC_PORT100=m -CPTCFG_NFC_SHDLC=y -CPTCFG_NFC_SIM=m -CPTCFG_NFC_TRF7970A=m -CPTCFG_NFC_WILINK=m +CONFIG_BACKPORT_NFC=m +CONFIG_BACKPORT_NFC_DIGITAL=m +CONFIG_BACKPORT_NFC_HCI=m +CONFIG_BACKPORT_NFC_MEI_PHY=m +CONFIG_BACKPORT_NFC_MICROREAD=m +CONFIG_BACKPORT_NFC_MICROREAD_I2C=m +CONFIG_BACKPORT_NFC_MICROREAD_MEI=m +CONFIG_BACKPORT_NFC_MRVL=m +CONFIG_BACKPORT_NFC_MRVL_USB=m +CONFIG_BACKPORT_NFC_NCI=m +CONFIG_BACKPORT_NFC_NCI_SPI=y +CONFIG_BACKPORT_NFC_PN533=m +CONFIG_BACKPORT_NFC_PN544=m +CONFIG_BACKPORT_NFC_PN544_I2C=m +CONFIG_BACKPORT_NFC_PN544_MEI=m +CONFIG_BACKPORT_NFC_PORT100=m +CONFIG_BACKPORT_NFC_SHDLC=y +CONFIG_BACKPORT_NFC_SIM=m +CONFIG_BACKPORT_NFC_TRF7970A=m +CONFIG_BACKPORT_NFC_WILINK=m
backport/defconfigs/rtlwifi +23 -23
46 lines not on this page · raw message
backport/defconfigs/wcn36xx +13 -13
@@ -1,13 +1,13 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_DEFAULT_PS=y -CPTCFG_CFG80211_DEBUGFS=y -CPTCFG_MAC80211=m -# CPTCFG_MAC80211_RC_PID is not set -# CPTCFG_MAC80211_RC_MINSTREL is not set -# CPTCFG_MAC80211_RC_DEFAULT_MINSTREL is not set -CPTCFG_MAC80211_DEBUGFS=y -CPTCFG_MAC80211_MESSAGE_TRACING=y -CPTCFG_WLAN=y -CPTCFG_ATH_CARDS=m -CPTCFG_WCN36XX=m -CPTCFG_WCN36XX_DEBUGFS=y +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_DEFAULT_PS=y +CONFIG_BACKPORT_CFG80211_DEBUGFS=y +CONFIG_BACKPORT_MAC80211=m +# CONFIG_BACKPORT_MAC80211_RC_PID is not set +# CONFIG_BACKPORT_MAC80211_RC_MINSTREL is not set +# CONFIG_BACKPORT_MAC80211_RC_DEFAULT_MINSTREL is not set +CONFIG_BACKPORT_MAC80211_DEBUGFS=y +CONFIG_BACKPORT_MAC80211_MESSAGE_TRACING=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_ATH_CARDS=m +CONFIG_BACKPORT_WCN36XX=m +CONFIG_BACKPORT_WCN36XX_DEBUGFS=y
backport/defconfigs/wifi +116 -116
232 lines not on this page · raw message
backport/defconfigs/wil6210 +5 -5
@@ -1,5 +1,5 @@ -CPTCFG_CFG80211=m -CPTCFG_CFG80211_WEXT=y -CPTCFG_WLAN=y -CPTCFG_ATH_CARDS=m -CPTCFG_WIL6210=m +CONFIG_BACKPORT_CFG80211=m +CONFIG_BACKPORT_CFG80211_WEXT=y +CONFIG_BACKPORT_WLAN=y +CONFIG_BACKPORT_ATH_CARDS=m +CONFIG_BACKPORT_WIL6210=m
backport/defconfigs/wwan +6 -6
@@ -1,6 +1,6 @@ -CPTCFG_USB_USBNET=m -CPTCFG_USB_NET_CDC_NCM=m -CPTCFG_USB_NET_CDC_MBIM=m -CPTCFG_USB_NET_QMI_WWAN=m -CPTCFG_USB_SIERRA_NET=m -CPTCFG_USB_WDM=m +CONFIG_BACKPORT_USB_USBNET=m +CONFIG_BACKPORT_USB_NET_CDC_NCM=m +CONFIG_BACKPORT_USB_NET_CDC_MBIM=m +CONFIG_BACKPORT_USB_NET_QMI_WWAN=m +CONFIG_BACKPORT_USB_SIERRA_NET=m +CONFIG_BACKPORT_USB_WDM=m
devel/ckmake +2 -2
@@ -164,7 +164,7 @@ def process_kernel(num, kset, cmdline_args): all_config_name = os.path.join(work_dir, 'all.config') all_config = open(all_config_name, 'w') - all_config.write("CPTCFG_CFG80211_INTERNAL_REGDB=n\n") + all_config.write("CONFIG_BACKPORT_CFG80211_INTERNAL_REGDB=n\n") config_name = 'allnoconfig' if cmdline_args.allyesconfig: config_name = 'allyesconfig'
@@ -172,7 +172,7 @@ def process_kernel(num, kset, cmdline_args): all_config.write( open(os.path.join(work_dir, 'defconfigs', cmdline_args.defconfig)).read()) else: - all_config.write("CPTCFG_BACKPORT_USERSEL_BUILD_ALL=y\n") + all_config.write("CONFIG_BACKPORT_USERSEL_BUILD_ALL=y\n") all_config.close() all_config_env = os.environ.copy()
devel/doc/kconfig-operation +11 -11
@@ -64,16 +64,16 @@ being compiled against is older than X. All together, this allows the correct options to be selected by the user. There's one more caveat: At backport configuration time, the CONFIG_ -environment variable is set to CPTCFG_ ("compat config", but also chosen -because it has the same length as CONFIG_). This shows up in the .config -file and other places, and in fact in all makefiles and in the code. The -reason for this is that it must be possible to distinguish between kernel -and backport options (even though we sort of port over kernel options). -This allows code to, for example, have "#ifdef CONFIG_PM" which can only -be set or cleared in the kernel, not in the backport configuration. Since -this is needed, a transformation step is done at backport creation time. - +environment variable is always replaced with CONFIG_BACKPORT_ for things +we backport. +This shows up in the .config file and other places, and in fact in all +makefiles and in the code. The reason for this is that it must be possible +to distinguish between kernel and backport options (even though we sort +of port over kernel options). This allows code to, for example, have +"#ifdef CONFIG_PM" which can only be set or cleared in the kernel, not +in the backport configuration. Since this is needed, a transformation +step is done at backport creation time. Backport creation for Kconfig -------------------------------
@@ -82,9 +82,9 @@ In order to achieve correct operation with all the above, multiple steps are necessary during the backport creation process. These are the problems and their solutions: - 1) As just mentioned, all symbols are now named CPTCFG_* instead of the + 1) As just mentioned, all symbols are now named CONFIG_BACKPORT_* instead of the original CONFIG_*. This requires that all code files (and makefiles) - are updated to use CPTCFG_* and CPTCFG_*_MODULE instead of the CONFIG_ + are updated to use CONFIG_BACKPORT_* and CONFIG_BACKPORT_*_MODULE instead of the CONFIG_ versions of the same. However, not *all* CONFIG_* usage may be changed since some options must come from the kernel still. More importantly, kernel options "leak" into the backport build and the rename avoids
gentree.py +20 -10
@@ -228,9 +228,9 @@ def add_automatic_backports(args): raise Exception('backporting a module requires a #module-name') for of in o_files: mf.write('%s-objs += %s\n' % (module_name, of)) - mf.write('obj-$(CPTCFG_%s) += %s.o\n' % (sym, module_name)) + mf.write('obj-$(CONFIG_BACKPORT_%s) += %s.o\n' % (sym, module_name)) elif symtype == 'bool': - mf.write('compat-$(CPTCFG_%s) += %s\n' % (sym, ' '.join(o_files))) + mf.write('compat-$(CONFIG_BACKPORT_%s) += %s\n' % (sym, ' '.join(o_files))) # finally create the include file syms = []
@@ -243,14 +243,14 @@ def add_automatic_backports(args): for f in h_files: outf = open(os.path.join(args.outdir, 'include', f), 'w') outf.write('/* Automatically created during backport process */\n') - outf.write('#ifndef CPTCFG_%s\n' % sym) + outf.write('#ifndef CONFIG_BACKPORT_%s\n' % sym) outf.write('#include_next <%s>\n' % f) outf.write('#else\n'); for s in syms: outf.write('#undef %s\n' % s) outf.write('#define %s LINUX_BACKPORT(%s)\n' % (s, s)) outf.write('#include <%s>\n' % (os.path.dirname(f) + '/backport-' + os.path.basename(f), )) - outf.write('#endif /* CPTCFG_%s */\n' % sym) + outf.write('#endif /* CONFIG_BACKPORT_%s */\n' % sym) return disable_list def git_debug_init(args):
@@ -552,6 +552,7 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, gitdebug, verbose, extra_driver, kup, kup_test, test_cocci, profile_cocci) rel_prep = None + integrate = False # start processing ... if (args.kup or args.kup_test):
@@ -758,11 +759,19 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, # some post-processing is required configtree = kconfig.ConfigTree(os.path.join(args.outdir, 'Kconfig')) + orig_symbols = configtree.symbols() + logwrite('Modify Kconfig tree ...') configtree.prune_sources(ignore=['Kconfig.kernel', 'Kconfig.versions']) git_debug_snapshot(args, "prune Kconfig tree") - configtree.force_tristate_modular() - git_debug_snapshot(args, "force tristate options modular") + + configtree.adjust_backported_configs(integrate, orig_symbols) + git_debug_snapshot(args, "adjust backports config symbols we port") + + if (not integrate): + configtree.force_tristate_modular() + git_debug_snapshot(args, "force tristate options modular") + configtree.modify_selects() git_debug_snapshot(args, "convert select to depends on")
@@ -819,8 +828,9 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, # rewrite Makefile and source symbols regexes = [] - for some_symbols in [symbols[i:i + 50] for i in range(0, len(symbols), 50)]: - r = 'CONFIG_((' + '|'.join([s + '(_MODULE)?' for s in some_symbols]) + ')([^A-Za-z0-9_]|$))' + all_symbols = orig_symbols + symbols + for some_symbols in [all_symbols[i:i + 50] for i in range(0, len(all_symbols), 50)]: + r = 'CONFIG_((?!BACKPORT)(' + '|'.join([s + '(_MODULE)?' for s in some_symbols]) + ')([^A-Za-z0-9_]|$))' regexes.append(re.compile(r, re.MULTILINE)) for root, dirs, files in os.walk(args.outdir): # don't go into .git dir (possible debug thing)
@@ -829,7 +839,7 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, for f in files: data = open(os.path.join(root, f), 'r').read() for r in regexes: - data = r.sub(r'CPTCFG_\1', data) + data = r.sub(r'CONFIG_BACKPORT_\1', data) data = re.sub(r'\$\(srctree\)', '$(backport_srctree)', data) data = re.sub(r'-Idrivers', '-I$(backport_srctree)/drivers', data) fo = open(os.path.join(root, f), 'w')
@@ -875,7 +885,7 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, # groups -- 50 seemed safer and is still fast) regexes = [] for some_symbols in [disable_makefile[i:i + 50] for i in range(0, len(disable_makefile), 50)]: - r = '^([^#].*((CPTCFG|CONFIG)_(' + '|'.join([s for s in some_symbols]) + ')))' + r = '^([^#].*((CONFIG_BACKPORT|CONFIG)_(' + '|'.join([s for s in some_symbols]) + ')))' regexes.append(re.compile(r, re.MULTILINE)) for f in maketree.get_makefiles(): data = open(f, 'r').read()
lib/kconfig.py +78 -1
93 lines not on this page · raw message
patches/backport-adjustments/devcoredump.patch +2 -2
@@ -107,7 +107,7 @@ index c0a360e99f64..da20e61f6c06 100644 #include <linux/vmalloc.h> -#ifdef CONFIG_DEV_COREDUMP -+#ifdef CPTCFG_BACKPORT_BUILD_WANT_DEV_COREDUMP ++#ifdef CONFIG_BACKPORT_BUILD_WANT_DEV_COREDUMP void dev_coredumpv(struct device *dev, const void *data, size_t datalen, gfp_t gfp);
@@ -116,6 +116,6 @@ index c0a360e99f64..da20e61f6c06 100644 free(data); } -#endif /* CONFIG_DEV_COREDUMP */ -+#endif /* CPTCFG_BACKPORT_BUILD_WANT_DEV_COREDUMP */ ++#endif /* CONFIG_BACKPORT_BUILD_WANT_DEV_COREDUMP */ #endif /* __DEVCOREDUMP_H */
Signature · 1 line
2.1.1
RFC 2/3 backports: replace BACKPORT_PWD with BACKPORT_DIR
In reply to Luis R. RodriguezFrom: "Luis R. Rodriguez" <[email protected]>
This will also be used for built-in kernel integration, by using this we can share more code with the built-in kernel approach.
--- backport/Makefile | 6 +++--- backport/Makefile.build | 4 ++-- backport/Makefile.real | 2 +- backport/scripts/uninstall.sh | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
backport/Makefile +3 -3
@@ -6,7 +6,7 @@ ifeq ($(KERNELRELEASE),) MAKEFLAGS += --no-print-directory SHELL := /bin/bash -BACKPORT_PWD := $(shell pwd) +BACKPORT_DIR := $(shell pwd) KMODDIR ?= updates ifneq ($(origin KLIB), undefined)
@@ -20,7 +20,7 @@ KERNEL_CONFIG := $(KLIB_BUILD)/.config KERNEL_MAKEFILE := $(KLIB_BUILD)/Makefile CONFIG_MD5 := $(shell md5sum $(KERNEL_CONFIG) 2>/dev/null | sed 's/\s.*//') -export KLIB KLIB_BUILD BACKPORT_PWD KMODDIR KMODPATH_ARG +export KLIB KLIB_BUILD BACKPORT_DIR KMODDIR KMODPATH_ARG # disable built-in rules for this file .SUFFIXES:
@@ -159,5 +159,5 @@ help: defconfig-help @echo "" @echo "Execute "make" or "make all" to build all targets marked with [*]" else -include $(BACKPORT_PWD)/Makefile.kernel +include $(BACKPORT_DIR)/Makefile.kernel endif
backport/Makefile.build +2 -2
@@ -3,8 +3,8 @@ export .PHONY: modules modules: - @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_PWD) modules + @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) modules .PHONY: clean clean: - @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_PWD) clean + @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) clean
backport/Makefile.real +1 -1
@@ -89,7 +89,7 @@ modules: backport-include/backport/autoconf.h .PHONY: install install: modules - @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_PWD) \ + @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \ INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG) \ modules_install @./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR)
backport/scripts/uninstall.sh +2 -2
@@ -10,8 +10,8 @@ else compr="" fi -for driver in $(find ${BACKPORT_PWD} -type f -name *.ko); do - mod_name=${driver/${BACKPORT_PWD}/${KLIB}${KMODDIR}}${compr} +for driver in $(find ${BACKPORT_DIR} -type f -name *.ko); do + mod_name=${driver/${BACKPORT_DIR}/${KLIB}${KMODDIR}}${compr} echo " uninstall" $mod_name rm -f $mod_name done
Signature · 1 line
2.1.1
RFC 3/3 backports: use BACKPORT_DIR prefix on kconfig sources
In reply to Luis R. RodriguezFrom: "Luis R. Rodriguez" <[email protected]>
This will allow us to do less work for built-in integration support. This requires a bit of self evaluation of the variable within our kconfig library, ideally we'd have support for groking all variables defined within the Kconfig setup but that requires quite a lot more work as it means also parsing Makefiles and inheriting these definitions within config symbols when used. Since we only define one right now and its used for built-in support we deal with it ourselves for now.
Please consider the complexity of adding others, it doesn't seem like there would be much need for others though. If others wanted to use a different BACKPORT_DIR path other than 'backports' that would require tweaking here, but we'll start by assuming no one will want to do that.
--- backport/Kconfig | 37 ++++++++++++++++++++----------------- lib/kconfig.py | 47 ++++++++++++++++++++++++++++++++++++----------- 2 files changed, 56 insertions(+), 28 deletions(-)
backport/Kconfig +20 -17
@@ -1,5 +1,8 @@ mainmenu "Linux Backports from $BACKPORTED_KERNEL_NAME $BACKPORTED_KERNEL_VERSION (with backports $BACKPORTS_VERSION)" +config BACKPORT_DIR + string + option env="BACKPORT_DIR" config BACKPORTS_VERSION string option env="BACKPORTS_VERSION"
@@ -11,8 +14,8 @@ config BACKPORTED_KERNEL_NAME option env="BACKPORTED_KERNEL_NAME" # these will be generated -source Kconfig.kernel -source Kconfig.versions +source "$BACKPORT_DIR/Kconfig.kernel" +source "$BACKPORT_DIR/Kconfig.versions" # some hacks for when we use backports to generate a package # to build modules out of tree.
@@ -27,25 +30,25 @@ config EXPERT def_bool y # this has the configuration for the backport code -source compat/Kconfig +source "$BACKPORT_DIR/compat/Kconfig" # these are copied from the kernel -source net/wireless/Kconfig -source net/mac80211/Kconfig -source net/bluetooth/Kconfig -source drivers/net/wireless/Kconfig -source drivers/net/ethernet/Kconfig -source drivers/net/usb/Kconfig +source "$BACKPORT_DIR/net/wireless/Kconfig" +source "$BACKPORT_DIR/net/mac80211/Kconfig" +source "$BACKPORT_DIR/net/bluetooth/Kconfig" +source "$BACKPORT_DIR/drivers/net/wireless/Kconfig" +source "$BACKPORT_DIR/drivers/net/ethernet/Kconfig" +source "$BACKPORT_DIR/drivers/net/usb/Kconfig" -source drivers/ssb/Kconfig -source drivers/bcma/Kconfig +source "$BACKPORT_DIR/drivers/ssb/Kconfig" +source "$BACKPORT_DIR/drivers/bcma/Kconfig" -source net/nfc/Kconfig +source "$BACKPORT_DIR/net/nfc/Kconfig" -source drivers/media/Kconfig +source "$BACKPORT_DIR/drivers/media/Kconfig" -source net/ieee802154/Kconfig -source net/mac802154/Kconfig -source drivers/net/ieee802154/Kconfig +source "$BACKPORT_DIR/net/ieee802154/Kconfig" +source "$BACKPORT_DIR/net/mac802154/Kconfig" +source "$BACKPORT_DIR/drivers/net/ieee802154/Kconfig" -source drivers/usb/class/Kconfig +source "$BACKPORT_DIR/drivers/usb/class/Kconfig"
lib/kconfig.py +36 -11
65 lines not on this page · raw message
Signature · 1 line
2.1.1