Merge GSoC DRM changes to admin-update.sh
cover Merge GSoC DRM changes to admin-update.sh
Hi,
The patches below modifies the admin-update.sh script so that it accepts a variable-length last argument, namely network or/and drm, to selectively fetch specific subsystem codes into the tree.
The last 2 patches constitutes the work done so far for the my GSoC project.
This first attempt is mostly for getting some comments. For example, eventhough you fetch network and drm drivers, make will just build network drivers. I will either port the project to kconfig which will dynamically configure and build what's available or hack config.mk and Makefile to detect the availability of other drivers than the wireless ones.
I thank Luis R. Rodriguez, my mentor, for his helpful and highly responsive mentorship :)
Ozan Çağlayan (13):
compat-wireless: Clean up *.mod.c once after everything
compat-wireless: Isolate drivers into different groups
compat-wireless: List everything vertically without concatenating
compat-wireless: Add ability to enable/disable subsystems
compat-wireless: Add 2 convenience functions
compat-wireless: Conditionally build network drivers
compat-wireless: Put network patches into its directory
compat-wireless: No need to search for patches
compat-wireless: Fix cmdline parameter's name
compat-wireless: Selectively apply patches
compat-wireless: Move refresh logic into the loop
compat-wireless: Fetch in DRM drivers
compat-wireless: Add DRM patches
...-QCA-ethernet-driver-which-supercedes-atl.patch | 13498 ------------------- crap/0002-backport-alx.patch | 133 - crap/0003-remove-atl1c-devices-from-alx.patch | 19 - ...s-adds-the-802.11ad-60-GHz-wil6210-driver.patch | 5757 -------- ...-QCA-ethernet-driver-which-supercedes-atl.patch | 13498 +++++++++++++++++++ crap/network/0002-backport-alx.patch | 133 + .../0003-remove-atl1c-devices-from-alx.patch | 19 + ...s-adds-the-802.11ad-60-GHz-wil6210-driver.patch | 5757 ++++++++ patches/0001-netdev_ops.patch | 279 - patches/0002-net-misc.patch | 68 - patches/0003-netdev-needed_headroom_tailroom.patch | 36 - patches/0004-wext-namespace.patch | 58 - patches/02-ksize.patch | 69 - patches/03-rfkill.patch | 66 - patches/04-netns.patch | 149 - patches/05-usb.patch | 26 - patches/06-header-changes.patch | 117 - patches/07-change-default-rate-alg.patch | 34 - patches/08-rename-config-options.patch | 167 - patches/09-cfg80211-wext-padding.patch | 62 - patches/09-threaded-irq.patch | 129 - patches/10-add-wext-handlers-to-netdev.patch | 47 - patches/11-dev-pm-ops.patch | 403 - patches/12-iw_handler-changes.patch | 14 - patches/12-mac80211-disable-tx-status.patch | 24 - patches/14-device-type.patch | 56 - patches/15-symbol-export-conflicts.patch | 18 - patches/16-bluetooth.patch | 576 - patches/17-netdev-queue.patch | 47 - patches/18-rename-usb-net-symbols.patch | 53 - patches/21-capi-proc_fops.patch | 73 - patches/22-multiqueue.patch | 43 - patches/24-pcmcia.patch | 1414 -- patches/25-multicast-list_head.patch | 820 -- patches/26-sdio-quirks.patch | 32 - patches/27-hermes-read-pda-conflict.patch | 56 - patches/29-sdio_no_suspend.patch | 199 - patches/30-bridge-port.patch | 45 - patches/32-remove-ns-type.patch | 28 - patches/35-fix-makefile-includes.patch | 71 - patches/36-workqueue.patch | 16 - patches/37-vsnprintk.patch | 35 - patches/38-led-max-brightness.patch | 24 - patches/39-remove_blink_set.patch | 56 - patches/40-netdev-hw-features.patch | 372 - patches/42-netlink_seq.patch | 12 - patches/43-rename_pm_qos_request.patch | 14 - patches/44-deactivate-mac80211-tracing.patch | 15 - patches/45-remove-platform-id-table.patch | 23 - patches/46-use_other_workqueue.patch | 19 - patches/47-no_trans_start_on_netdev_queue.patch | 17 - patches/48-use_skb_get_queue_mapping.patch | 38 - patches/50-libertas-olpc-ec-wakeup.patch | 23 - patches/52-tty-dev.patch | 32 - patches/53-pr_fmt.patch | 821 -- patches/54-get_ts_info.patch | 39 - patches/55-iwlwifi-msg-trace-fix.patch | 70 - patches/56-mac80211-trace-fix.patch | 79 - patches/57-iwlwifi-debug-fix.patch | 19 - patches/61-netdev-addr_assign_type.patch | 53 - patches/62-usb_driver_lpm.patch | 276 - patches/63-tty-termios.patch | 49 - patches/64-b44-32bit-stats.patch | 54 - patches/65-ignore-dismantle.patch | 23 - patches/99-change-makefiles.patch | 100 - patches/drm/01-dma_buf_ops-addition.patch | 54 + patches/drm/02-revert-vm_mmap.patch | 100 + patches/drm/03-swiotlb.patch | 87 + patches/drm/04-revert-prime-support.patch | 384 + patches/drm/05-i915-define-acpi-video-class.patch | 18 + patches/drm/98-pr_fmt.patch | 199 + patches/drm/99-change-makefile.patch | 28 + patches/network/0001-netdev_ops.patch | 279 + patches/network/0002-net-misc.patch | 68 + .../0003-netdev-needed_headroom_tailroom.patch | 36 + patches/network/0004-wext-namespace.patch | 58 + patches/network/02-ksize.patch | 69 + patches/network/03-rfkill.patch | 66 + patches/network/04-netns.patch | 149 + patches/network/05-usb.patch | 26 + patches/network/06-header-changes.patch | 117 + patches/network/07-change-default-rate-alg.patch | 34 + patches/network/08-rename-config-options.patch | 167 + patches/network/09-cfg80211-wext-padding.patch | 62 + patches/network/09-threaded-irq.patch | 129 + .../network/10-add-wext-handlers-to-netdev.patch | 47 + patches/network/11-dev-pm-ops.patch | 403 + patches/network/12-iw_handler-changes.patch | 14 + .../network/12-mac80211-disable-tx-status.patch | 24 + patches/network/14-device-type.patch | 56 + patches/network/15-symbol-export-conflicts.patch | 18 + patches/network/16-bluetooth.patch | 576 + patches/network/17-netdev-queue.patch | 47 + patches/network/18-rename-usb-net-symbols.patch | 53 + patches/network/21-capi-proc_fops.patch | 73 + patches/network/22-multiqueue.patch | 43 + patches/network/24-pcmcia.patch | 1414 ++ patches/network/25-multicast-list_head.patch | 820 ++ patches/network/26-sdio-quirks.patch | 32 + patches/network/27-hermes-read-pda-conflict.patch | 56 + patches/network/29-sdio_no_suspend.patch | 199 + patches/network/30-bridge-port.patch | 45 + patches/network/32-remove-ns-type.patch | 28 + patches/network/35-fix-makefile-includes.patch | 71 + patches/network/36-workqueue.patch | 16 + patches/network/37-vsnprintk.patch | 35 + patches/network/38-led-max-brightness.patch | 24 + patches/network/39-remove_blink_set.patch | 56 + patches/network/40-netdev-hw-features.patch | 372 + patches/network/42-netlink_seq.patch | 12 + patches/network/43-rename_pm_qos_request.patch | 14 + .../network/44-deactivate-mac80211-tracing.patch | 15 + patches/network/45-remove-platform-id-table.patch | 23 + patches/network/46-use_other_workqueue.patch | 19 + .../47-no_trans_start_on_netdev_queue.patch | 17 + patches/network/48-use_skb_get_queue_mapping.patch | 38 + patches/network/50-libertas-olpc-ec-wakeup.patch | 23 + patches/network/52-tty-dev.patch | 32 + patches/network/53-pr_fmt.patch | 821 ++ patches/network/54-get_ts_info.patch | 39 + patches/network/55-iwlwifi-msg-trace-fix.patch | 70 + patches/network/56-mac80211-trace-fix.patch | 79 + patches/network/57-iwlwifi-debug-fix.patch | 19 + patches/network/61-netdev-addr_assign_type.patch | 53 + patches/network/62-usb_driver_lpm.patch | 276 + patches/network/63-tty-termios.patch | 49 + patches/network/64-b44-32bit-stats.patch | 54 + patches/network/65-ignore-dismantle.patch | 23 + patches/network/99-change-makefiles.patch | 100 + scripts/admin-update.sh | 573 +- 130 files changed, 28145 insertions(+), 27228 deletions(-) delete mode 100644 crap/0001-alx-add-new-QCA-ethernet-driver-which-supercedes-atl.patch delete mode 100644 crap/0002-backport-alx.patch delete mode 100644 crap/0003-remove-atl1c-devices-from-alx.patch delete mode 100644 crap/0004-wireless-adds-the-802.11ad-60-GHz-wil6210-driver.patch create mode 100644 crap/network/0001-alx-add-new-QCA-ethernet-driver-which-supercedes-atl.patch create mode 100644 crap/network/0002-backport-alx.patch create mode 100644 crap/network/0003-remove-atl1c-devices-from-alx.patch create mode 100644 crap/network/0004-wireless-adds-the-802.11ad-60-GHz-wil6210-driver.patch delete mode 100644 patches/0001-netdev_ops.patch delete mode 100644 patches/0002-net-misc.patch delete mode 100644 patches/0003-netdev-needed_headroom_tailroom.patch delete mode 100644 patches/0004-wext-namespace.patch delete mode 100644 patches/02-ksize.patch delete mode 100644 patches/03-rfkill.patch delete mode 100644 patches/04-netns.patch delete mode 100644 patches/05-usb.patch delete mode 100644 patches/06-header-changes.patch delete mode 100644 patches/07-change-default-rate-alg.patch delete mode 100644 patches/08-rename-config-options.patch delete mode 100644 patches/09-cfg80211-wext-padding.patch delete mode 100644 patches/09-threaded-irq.patch delete mode 100644 patches/10-add-wext-handlers-to-netdev.patch delete mode 100644 patches/11-dev-pm-ops.patch delete mode 100644 patches/12-iw_handler-changes.patch delete mode 100644 patches/12-mac80211-disable-tx-status.patch delete mode 100644 patches/14-device-type.patch delete mode 100644 patches/15-symbol-export-conflicts.patch delete mode 100644 patches/16-bluetooth.patch delete mode 100644 patches/17-netdev-queue.patch delete mode 100644 patches/18-rename-usb-net-symbols.patch delete mode 100644 patches/21-capi-proc_fops.patch delete mode 100644 patches/22-multiqueue.patch delete mode 100644 patches/24-pcmcia.patch delete mode 100644 patches/25-multicast-list_head.patch delete mode 100644 patches/26-sdio-quirks.patch delete mode 100644 patches/27-hermes-read-pda-conflict.patch delete mode 100644 patches/29-sdio_no_suspend.patch delete mode 100644 patches/30-bridge-port.patch delete mode 100644 patches/32-remove-ns-type.patch delete mode 100644 patches/35-fix-makefile-includes.patch delete mode 100644 patches/36-workqueue.patch delete mode 100644 patches/37-vsnprintk.patch delete mode 100644 patches/38-led-max-brightness.patch delete mode 100644 patches/39-remove_blink_set.patch delete mode 100644 patches/40-netdev-hw-features.patch delete mode 100644 patches/42-netlink_seq.patch delete mode 100644 patches/43-rename_pm_qos_request.patch delete mode 100644 patches/44-deactivate-mac80211-tracing.patch delete mode 100644 patches/45-remove-platform-id-table.patch delete mode 100644 patches/46-use_other_workqueue.patch delete mode 100644 patches/47-no_trans_start_on_netdev_queue.patch delete mode 100644 patches/48-use_skb_get_queue_mapping.patch delete mode 100644 patches/50-libertas-olpc-ec-wakeup.patch delete mode 100644 patches/52-tty-dev.patch delete mode 100644 patches/53-pr_fmt.patch delete mode 100644 patches/54-get_ts_info.patch delete mode 100644 patches/55-iwlwifi-msg-trace-fix.patch delete mode 100644 patches/56-mac80211-trace-fix.patch delete mode 100644 patches/57-iwlwifi-debug-fix.patch delete mode 100644 patches/61-netdev-addr_assign_type.patch delete mode 100644 patches/62-usb_driver_lpm.patch delete mode 100644 patches/63-tty-termios.patch delete mode 100644 patches/64-b44-32bit-stats.patch delete mode 100644 patches/65-ignore-dismantle.patch delete mode 100644 patches/99-change-makefiles.patch create mode 100644 patches/drm/01-dma_buf_ops-addition.patch create mode 100644 patches/drm/02-revert-vm_mmap.patch create mode 100644 patches/drm/03-swiotlb.patch create mode 100644 patches/drm/04-revert-prime-support.patch create mode 100644 patches/drm/05-i915-define-acpi-video-class.patch create mode 100644 patches/drm/98-pr_fmt.patch create mode 100644 patches/drm/99-change-makefile.patch create mode 100644 patches/network/0001-netdev_ops.patch create mode 100644 patches/network/0002-net-misc.patch create mode 100644 patches/network/0003-netdev-needed_headroom_tailroom.patch create mode 100644 patches/network/0004-wext-namespace.patch create mode 100644 patches/network/02-ksize.patch create mode 100644 patches/network/03-rfkill.patch create mode 100644 patches/network/04-netns.patch create mode 100644 patches/network/05-usb.patch create mode 100644 patches/network/06-header-changes.patch create mode 100644 patches/network/07-change-default-rate-alg.patch create mode 100644 patches/network/08-rename-config-options.patch create mode 100644 patches/network/09-cfg80211-wext-padding.patch create mode 100644 patches/network/09-threaded-irq.patch create mode 100644 patches/network/10-add-wext-handlers-to-netdev.patch create mode 100644 patches/network/11-dev-pm-ops.patch create mode 100644 patches/network/12-iw_handler-changes.patch create mode 100644 patches/network/12-mac80211-disable-tx-status.patch create mode 100644 patches/network/14-device-type.patch create mode 100644 patches/network/15-symbol-export-conflicts.patch create mode 100644 patches/network/16-bluetooth.patch create mode 100644 patches/network/17-netdev-queue.patch create mode 100644 patches/network/18-rename-usb-net-symbols.patch create mode 100644 patches/network/21-capi-proc_fops.patch create mode 100644 patches/network/22-multiqueue.patch create mode 100644 patches/network/24-pcmcia.patch create mode 100644 patches/network/25-multicast-list_head.patch create mode 100644 patches/network/26-sdio-quirks.patch create mode 100644 patches/network/27-hermes-read-pda-conflict.patch create mode 100644 patches/network/29-sdio_no_suspend.patch create mode 100644 patches/network/30-bridge-port.patch create mode 100644 patches/network/32-remove-ns-type.patch create mode 100644 patches/network/35-fix-makefile-includes.patch create mode 100644 patches/network/36-workqueue.patch create mode 100644 patches/network/37-vsnprintk.patch create mode 100644 patches/network/38-led-max-brightness.patch create mode 100644 patches/network/39-remove_blink_set.patch create mode 100644 patches/network/40-netdev-hw-features.patch create mode 100644 patches/network/42-netlink_seq.patch create mode 100644 patches/network/43-rename_pm_qos_request.patch create mode 100644 patches/network/44-deactivate-mac80211-tracing.patch create mode 100644 patches/network/45-remove-platform-id-table.patch create mode 100644 patches/network/46-use_other_workqueue.patch create mode 100644 patches/network/47-no_trans_start_on_netdev_queue.patch create mode 100644 patches/network/48-use_skb_get_queue_mapping.patch create mode 100644 patches/network/50-libertas-olpc-ec-wakeup.patch create mode 100644 patches/network/52-tty-dev.patch create mode 100644 patches/network/53-pr_fmt.patch create mode 100644 patches/network/54-get_ts_info.patch create mode 100644 patches/network/55-iwlwifi-msg-trace-fix.patch create mode 100644 patches/network/56-mac80211-trace-fix.patch create mode 100644 patches/network/57-iwlwifi-debug-fix.patch create mode 100644 patches/network/61-netdev-addr_assign_type.patch create mode 100644 patches/network/62-usb_driver_lpm.patch create mode 100644 patches/network/63-tty-termios.patch create mode 100644 patches/network/64-b44-32bit-stats.patch create mode 100644 patches/network/65-ignore-dismantle.patch create mode 100644 patches/network/99-change-makefiles.patch
Signature · 1 line
1.7.11.2
PATCH 1/13 compat-wireless: Clean up *.mod.c once after everything
Remove possible .mod.c leftovers at the end instead of after every copying operation.
--- scripts/admin-update.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
scripts/admin-update.sh +3 -6
@@ -412,7 +412,6 @@ for i in $NET_DIRS; do cp $GIT_TREE/net/$i/*.[ch] net/$i/ cp $GIT_TREE/net/$i/Makefile net/$i/ cp $GIT_TREE/net/$i/Kconfig net/$i/ - rm -f net/$i/*.mod.c done cp $GIT_TREE/MAINTAINERS ./
@@ -427,7 +426,6 @@ for i in $NET_BT_DIRS; do echo "Copying $GIT_TREE/net/$i/*.[ch]" cp $GIT_TREE/net/$i/*.[ch] net/$i/ cp $GIT_TREE/net/$i/Makefile net/$i/ - rm -f net/$i/*.mod.c done # Drivers in their own directory
@@ -448,7 +446,6 @@ for i in $DRIVERS; do if [ -f $GIT_TREE/$i/Kconfig ]; then cp $GIT_TREE/$i/Kconfig $i/ fi - rm -f $i/*.mod.c done # Staging drivers in their own directory
@@ -462,7 +459,6 @@ for i in $STAGING_DRIVERS; do echo -e "Copying ${RED}STAGING${NORMAL} $GIT_TREE/$i/*.[ch]" # staging drivers tend to have their own subdirs... cp -a $GIT_TREE/$i drivers/staging/ - rm -f $i/*.mod.c done for i in $DRIVERS_BT; do
@@ -470,7 +466,6 @@ for i in $DRIVERS_BT; do echo "Copying $GIT_TREE/$i/*.[ch]" cp $GIT_TREE/$i/*.[ch] $i/ cp $GIT_TREE/$i/Makefile $i/ - rm -f $i/*.mod.c done # For rndis_wlan, we need a new rndis_host.ko, cdc_ether.ko and usbnet.ko
@@ -515,7 +510,9 @@ cp -a $GIT_COMPAT_TREE/include/net/* include/net/ cp -a $GIT_COMPAT_TREE/include/trace/* include/trace/ cp -a $GIT_COMPAT_TREE/include/pcmcia/* include/pcmcia/ cp -a $GIT_COMPAT_TREE/include/crypto/* include/crypto/ -rm -f $COMPAT/*.mod.c + +# Clean up possible *.mod.c leftovers +find -type f -name "*.mod.c" -exec rm -f {} \; # files we suck in for wireless drivers export WSTABLE="
Signature · 1 line
1.7.11.2
PATCH 2/13 compat-wireless: Isolate drivers into different groups
In reply to Ozan ÇağlayanStart isolating wlan, bt, eth drivers into different variables for being able to selectively bring them in the near future.
--- scripts/admin-update.sh | 133 ++++++++++++++++++++++++++---------------------- 1 file changed, 71 insertions(+), 62 deletions(-)
scripts/admin-update.sh +71 -62
@@ -280,79 +280,88 @@ INCLUDE_LINUX_USB="usbnet.h rndis_host.h" INCLUDE_LINUX_SPI="libertas_spi.h" -# The good new yummy stuff -INCLUDE_NET="cfg80211.h ieee80211_radiotap.h cfg80211-wext.h" -INCLUDE_NET="$INCLUDE_NET mac80211.h lib80211.h regulatory.h" +# 802.11 related headers +INCLUDE_NET="cfg80211.h + cfg80211-wext.h + ieee80211_radiotap.h + lib80211.h + mac80211.h + regulatory.h" NET_DIRS="wireless mac80211 rfkill" -# Drivers that have their own directory -DRIVERS="drivers/net/wireless/ath" -DRIVERS="$DRIVERS drivers/net/wireless/ath/carl9170" -DRIVERS="$DRIVERS drivers/net/wireless/ath/ath5k" -DRIVERS="$DRIVERS drivers/net/wireless/ath/ath6kl" -DRIVERS="$DRIVERS drivers/net/wireless/ath/ath9k" -DRIVERS="$DRIVERS drivers/ssb" -DRIVERS="$DRIVERS drivers/bcma" -DRIVERS="$DRIVERS drivers/net/wireless/b43" -DRIVERS="$DRIVERS drivers/net/wireless/b43legacy" -DRIVERS="$DRIVERS drivers/net/wireless/brcm80211" -DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/brcmfmac" -DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/brcmsmac" -DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/brcmsmac/phy" -DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/brcmutil" -DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/include" -DRIVERS="$DRIVERS drivers/net/wireless/iwlegacy" -DRIVERS="$DRIVERS drivers/net/wireless/iwlwifi" -DRIVERS="$DRIVERS drivers/net/wireless/iwlwifi/pcie" -DRIVERS="$DRIVERS drivers/net/wireless/iwlwifi/dvm" -DRIVERS="$DRIVERS drivers/net/wireless/rt2x00" -DRIVERS="$DRIVERS drivers/net/wireless/zd1211rw" -DRIVERS="$DRIVERS drivers/net/wireless/libertas" -DRIVERS="$DRIVERS drivers/net/wireless/p54" -DRIVERS="$DRIVERS drivers/net/wireless/rtl818x" -DRIVERS="$DRIVERS drivers/net/wireless/rtl818x/rtl8180" -DRIVERS="$DRIVERS drivers/net/wireless/rtl818x/rtl8187" -DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi" -DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi/rtl8192c" -DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi/rtl8192ce" -DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi/rtl8192cu" -DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi/rtl8192se" -DRIVERS="$DRIVERS drivers/net/wireless/rtlwifi/rtl8192de" -DRIVERS="$DRIVERS drivers/net/wireless/libertas_tf" -DRIVERS="$DRIVERS drivers/net/wireless/ipw2x00" -DRIVERS="$DRIVERS drivers/net/wireless/ti" -DRIVERS="$DRIVERS drivers/net/wireless/ti/wl12xx" -DRIVERS="$DRIVERS drivers/net/wireless/ti/wl1251" -DRIVERS="$DRIVERS drivers/net/wireless/ti/wlcore" -DRIVERS="$DRIVERS drivers/net/wireless/ti/wl18xx" -DRIVERS="$DRIVERS drivers/net/wireless/orinoco" -DRIVERS="$DRIVERS drivers/net/wireless/mwifiex" - -# Staging drivers -STAGING_DRIVERS="" +# WLAN drivers that have their own directory +DRIVERS_WLAN="drivers/bcma" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath/carl9170" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath/ath5k" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath/ath6kl" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath/ath9k" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/b43" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/b43legacy" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/brcmfmac" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/brcmsmac" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/brcmsmac/phy" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/brcmutil" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/include" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/iwlegacy" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/iwlwifi" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/iwlwifi/pcie" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/iwlwifi/dvm" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rt2x00" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/zd1211rw" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/libertas" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/p54" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtl818x" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtl818x/rtl8180" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtl818x/rtl8187" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192c" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192ce" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192cu" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192se" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192de" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/libertas_tf" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ipw2x00" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti/wl12xx" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti/wl1251" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti/wlcore" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti/wl18xx" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/orinoco" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/mwifiex" +DRIVERS_WLAN="$DRIVERS_WLAN drivers/ssb" + +# WLAN drivers not having dedicated directories +DRIVERS_WLAN_FILES="adm8211.c + adm8211.h + at76c50x-usb.c + at76c50x-usb.h + mac80211_hwsim.c + mac80211_hwsim.h + mwl8k.c + rndis_wlan.c" # Ethernet drivers -DRIVERS="$DRIVERS drivers/net/ethernet/atheros" -DRIVERS="$DRIVERS drivers/net/ethernet/atheros/atl1c" -DRIVERS="$DRIVERS drivers/net/ethernet/atheros/atl1e" -DRIVERS="$DRIVERS drivers/net/ethernet/atheros/atlx" -DRIVERS="$DRIVERS drivers/net/ethernet/atheros/alx" +DRIVERS_ETH="drivers/net/ethernet/atheros + drivers/net/ethernet/atheros/atl1c + drivers/net/ethernet/atheros/atl1e + drivers/net/ethernet/atheros/atlx + drivers/net/ethernet/atheros/alx" # Bluetooth drivers DRIVERS_BT="drivers/bluetooth" -# Drivers that belong the the wireless directory -DRIVER_FILES="adm8211.c adm8211.h" -DRIVER_FILES="$DRIVER_FILES rndis_wlan.c" -DRIVER_FILES="$DRIVER_FILES mac80211_hwsim.c mac80211_hwsim.h" -DRIVER_FILES="$DRIVER_FILES at76c50x-usb.c at76c50x-usb.h" -DRIVER_FILES="$DRIVER_FILES mwl8k.c" +# Staging drivers if any +STAGING_DRIVERS="" + +# Select which drivers to build +DRIVERS="$DRIVERS_WLAN $DRIVERS_ETH" rm -rf drivers/ -mkdir -p include/linux/ \ - include/net/ \ +mkdir -p \ include/net/bluetooth \ include/linux/usb \ include/linux/unaligned \
@@ -489,7 +498,7 @@ cp $GIT_TREE/drivers/misc/eeprom/Makefile drivers/misc/eeprom/ DIR="drivers/net/wireless" # Drivers part of the wireless directory -for i in $DRIVER_FILES; do +for i in $DRIVERS_WLAN_FILES; do cp $GIT_TREE/$DIR/$i $DIR/ done
Signature · 1 line
1.7.11.2
PATCH 3/13 compat-wireless: List everything vertically without concatenating
In reply to Ozan ÇağlayanList everything vertically as it is much more readable. Also don't concat strings but list them sequentially in one variable.
--- scripts/admin-update.sh | 116 ++++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 49 deletions(-)
scripts/admin-update.sh +67 -49
@@ -266,14 +266,32 @@ else fi # Now define what files to copy from $GIT_URL -INCLUDE_NET_BT="hci_core.h l2cap.h bluetooth.h rfcomm.h hci.h hci_mon.h mgmt.h sco.h smp.h a2mp.h" -NET_BT_DIRS="bluetooth bluetooth/bnep bluetooth/cmtp bluetooth/rfcomm bluetooth/hidp" - -INCLUDE_LINUX="ieee80211.h nl80211.h" -INCLUDE_LINUX="$INCLUDE_LINUX pci_ids.h eeprom_93cx6.h" -INCLUDE_LINUX="$INCLUDE_LINUX ath9k_platform.h" -INCLUDE_LINUX="$INCLUDE_LINUX wl12xx.h" -INCLUDE_LINUX="$INCLUDE_LINUX rndis.h" +INCLUDE_NET_BT="hci_core.h + l2cap.h + bluetooth.h + rfcomm.h + hci.h + hci_mon.h + mgmt.h + sco.h + smp.h + a2mp.h" + +# Bluetooth related directories +NET_BT_DIRS="bluetooth + bluetooth/bnep + bluetooth/cmtp + bluetooth/rfcomm + bluetooth/hidp" + +# Required headers from include/linux +INCLUDE_LINUX="ieee80211.h + nl80211.h + pci_ids.h + eeprom_93cx6.h + ath9k_platform.h + wl12xx.h + rndis.h" # For rndis_wext INCLUDE_LINUX_USB="usbnet.h rndis_host.h"
@@ -291,47 +309,47 @@ INCLUDE_NET="cfg80211.h NET_DIRS="wireless mac80211 rfkill" # WLAN drivers that have their own directory -DRIVERS_WLAN="drivers/bcma" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath/carl9170" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath/ath5k" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath/ath6kl" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ath/ath9k" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/b43" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/b43legacy" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/brcmfmac" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/brcmsmac" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/brcmsmac/phy" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/brcmutil" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/brcm80211/include" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/iwlegacy" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/iwlwifi" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/iwlwifi/pcie" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/iwlwifi/dvm" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rt2x00" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/zd1211rw" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/libertas" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/p54" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtl818x" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtl818x/rtl8180" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtl818x/rtl8187" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192c" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192ce" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192cu" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192se" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/rtlwifi/rtl8192de" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/libertas_tf" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ipw2x00" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti/wl12xx" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti/wl1251" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti/wlcore" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/ti/wl18xx" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/orinoco" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/net/wireless/mwifiex" -DRIVERS_WLAN="$DRIVERS_WLAN drivers/ssb" +DRIVERS_WLAN="drivers/bcma + drivers/net/wireless/ath + drivers/net/wireless/ath/carl9170 + drivers/net/wireless/ath/ath5k + drivers/net/wireless/ath/ath6kl + drivers/net/wireless/ath/ath9k + drivers/net/wireless/b43 + drivers/net/wireless/b43legacy + drivers/net/wireless/brcm80211 + drivers/net/wireless/brcm80211/brcmfmac + drivers/net/wireless/brcm80211/brcmsmac + drivers/net/wireless/brcm80211/brcmsmac/phy + drivers/net/wireless/brcm80211/brcmutil + drivers/net/wireless/brcm80211/include + drivers/net/wireless/iwlegacy + drivers/net/wireless/iwlwifi + drivers/net/wireless/iwlwifi/pcie + drivers/net/wireless/iwlwifi/dvm + drivers/net/wireless/rt2x00 + drivers/net/wireless/zd1211rw + drivers/net/wireless/libertas + drivers/net/wireless/p54 + drivers/net/wireless/rtl818x + drivers/net/wireless/rtl818x/rtl8180 + drivers/net/wireless/rtl818x/rtl8187 + drivers/net/wireless/rtlwifi + drivers/net/wireless/rtlwifi/rtl8192c + drivers/net/wireless/rtlwifi/rtl8192ce + drivers/net/wireless/rtlwifi/rtl8192cu + drivers/net/wireless/rtlwifi/rtl8192se + drivers/net/wireless/rtlwifi/rtl8192de + drivers/net/wireless/libertas_tf + drivers/net/wireless/ipw2x00 + drivers/net/wireless/ti + drivers/net/wireless/ti/wl12xx + drivers/net/wireless/ti/wl1251 + drivers/net/wireless/ti/wlcore + drivers/net/wireless/ti/wl18xx + drivers/net/wireless/orinoco + drivers/net/wireless/mwifiex + drivers/ssb" # WLAN drivers not having dedicated directories DRIVERS_WLAN_FILES="adm8211.c
Signature · 1 line
1.7.11.2
PATCH 4/13 compat-wireless: Add ability to enable/disable subsystems
In reply to Ozan ÇağlayanPass wlan,bluetooth,ethernet or drm to the end of the cmdline to fetch the relevant drivers into the tree.
--- scripts/admin-update.sh | 94 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 61 insertions(+), 33 deletions(-)
scripts/admin-update.sh +61 -33
@@ -74,8 +74,10 @@ patchRefresh() { # usage() function ### usage() { - printf "Usage: $0 [refresh] [ --help | -h | -s | -n | -p | -c ]\n" + printf "Usage: $0 [refresh] [ --help | -h | -s | -n | -p | -c ] <subsystem1 subsystem2 ..>\n + Where subsystems are: wlan, bluetooth, ethernet and drm.\n" + printf "\n" printf "${GREEN}%10s${NORMAL} - Update all your patch offsets using quilt\n" "refresh" printf "${GREEN}%10s${NORMAL} - Get and apply pending-stable/ fixes purging old files there\n" "-s" printf "${GREEN}%10s${NORMAL} - Apply the patches from linux-next-cherry-picks directory\n" "-n"
@@ -178,12 +180,20 @@ nagometer() { # uses quilt to refresh the patches. This is useful if patches # can not be applied correctly after a code update in $GIT_URL. +# These switches determines which drivers to fetch in. +ENABLE_WLAN= +ENABLE_ETH= +ENABLE_DRM= +ENABLE_BT= + EXTRA_PATCHES="patches" REFRESH="n" GET_STABLE_PENDING="n" POSTFIX_RELEASE_TAG="" + +# Parse command line arguments if [ $# -ge 1 ]; then - if [ $# -gt 4 ]; then + if [ $# -gt 8 ]; then usage $0 exit fi
@@ -192,38 +202,56 @@ if [ $# -ge 1 ]; then exit fi while [ $# -ne 0 ]; do - if [[ "$1" = "-s" ]]; then - GET_STABLE_PENDING="y" - EXTRA_PATCHES="${EXTRA_PATCHES} pending-stable" - EXTRA_PATCHES="${EXTRA_PATCHES} pending-stable/backports/" - POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}s" - shift; continue; - fi - if [[ "$1" = "-n" ]]; then - EXTRA_PATCHES="${EXTRA_PATCHES} linux-next-cherry-picks" - POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}n" - shift; continue; - fi - if [[ "$1" = "-p" ]]; then - EXTRA_PATCHES="${EXTRA_PATCHES} linux-next-pending" - POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}p" - shift; continue; - fi - if [[ "$1" = "-c" ]]; then - EXTRA_PATCHES="${EXTRA_PATCHES} crap" - POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}c" - shift; continue; - fi - if [[ "$1" = "refresh" ]]; then - REFRESH="y" - shift; continue; - fi - - echo "Unexpected argument passed: $1" - usage $0 - exit + case $1 in + "-s") + GET_STABLE_PENDING="y" + EXTRA_PATCHES="${EXTRA_PATCHES} pending-stable" + EXTRA_PATCHES="${EXTRA_PATCHES} pending-stable/backports/" + POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}s" + shift + ;; + "-n") + EXTRA_PATCHES="${EXTRA_PATCHES} linux-next-cherry-picks" + POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}n" + shift + ;; + "-p") + EXTRA_PATCHES="${EXTRA_PATCHES} linux-next-pending" + POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}p" + shift + ;; + "-c") + EXTRA_PATCHES="${EXTRA_PATCHES} crap" + POSTFIX_RELEASE_TAG="${POSTFIX_RELEASE_TAG}c" + shift + ;; + "refresh") + REFRESH="y" + shift + ;; + "wlan") + ENABLE_WLAN=1 + shift + ;; + "bluetooth") + ENABLE_BT=1 + shift + ;; + "ethernet") + ENABLE_ETH=1 + shift + ;; + "drm") + ENABLE_DRM=1 + shift + ;; + *) + echo "Unexpected argument passed: $1" + usage $0 + exit + ;; + esac done - fi # User exported this variable
Signature · 1 line
1.7.11.2
PATCH 5/13 compat-wireless: Add 2 convenience functions
In reply to Ozan ÇağlayanAdd copyFiles and copyDirectories for not repeating same code snippets again and again.
--- scripts/admin-update.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
scripts/admin-update.sh +18 -0
@@ -165,6 +165,24 @@ nagometer() { } +# Copy each file in $1 into $2 +copyFiles() { + FILES=$1 + TARGET=$2 + for file in $FILES; do + echo "Copying $GIT_TREE/$TARGET/$file" + cp "$GIT_TREE/$TARGET/$file" $TARGET/ + done +} + +copyDirectories() { + DIRS=$1 + for dir in $DIRS; do + echo "Copying $GIT_TREE/$dir/*.[ch]" + cp $GIT_TREE/$dir/{Kconfig,Makefile,*.[ch]} $dir/ &> /dev/null + done +} + # First check cmdline args to understand # which patches to apply and which release tag to set. #
Signature · 1 line
1.7.11.2
PATCH 6/13 compat-wireless: Conditionally build network drivers
In reply to Ozan ÇağlayanSeparate building of network drivers into its own conditional block.
Pass network as the last cmdline argument to mimic older compat-wireless behaviour.
--- scripts/admin-update.sh | 254 ++++++++++++++++++------------------------------ 1 file changed, 92 insertions(+), 162 deletions(-)
scripts/admin-update.sh +92 -162
@@ -75,7 +75,7 @@ patchRefresh() { ### usage() { printf "Usage: $0 [refresh] [ --help | -h | -s | -n | -p | -c ] <subsystem1 subsystem2 ..>\n - Where subsystems are: wlan, bluetooth, ethernet and drm.\n" + Where subsystems are: network and drm.\n" printf "\n" printf "${GREEN}%10s${NORMAL} - Update all your patch offsets using quilt\n" "refresh"
@@ -199,10 +199,8 @@ copyDirectories() { # can not be applied correctly after a code update in $GIT_URL. # These switches determines which drivers to fetch in. -ENABLE_WLAN= -ENABLE_ETH= +ENABLE_NETWORK= ENABLE_DRM= -ENABLE_BT= EXTRA_PATCHES="patches" REFRESH="n"
@@ -247,16 +245,8 @@ if [ $# -ge 1 ]; then REFRESH="y" shift ;; - "wlan") - ENABLE_WLAN=1 - shift - ;; - "bluetooth") - ENABLE_BT=1 - shift - ;; - "ethernet") - ENABLE_ETH=1 + "net") + ENABLE_NETWORK=1 shift ;; "drm")
@@ -323,26 +313,26 @@ INCLUDE_NET_BT="hci_core.h smp.h a2mp.h" -# Bluetooth related directories -NET_BT_DIRS="bluetooth - bluetooth/bnep - bluetooth/cmtp - bluetooth/rfcomm - bluetooth/hidp" - # Required headers from include/linux -INCLUDE_LINUX="ieee80211.h - nl80211.h - pci_ids.h - eeprom_93cx6.h - ath9k_platform.h - wl12xx.h - rndis.h" +INCLUDE_LINUX_WLAN="ieee80211.h + nl80211.h + eeprom_93cx6.h + ath9k_platform.h + wl12xx.h + rndis.h" # For rndis_wext -INCLUDE_LINUX_USB="usbnet.h rndis_host.h" +INCLUDE_LINUX_USB_WLAN="usbnet.h + rndis_host.h" -INCLUDE_LINUX_SPI="libertas_spi.h" +# For rndis_wlan, we need a new rndis_host.ko, cdc_ether.ko and usbnet.ko +RNDIS_REQUIREMENTS="Makefile + rndis_host.c + cdc_ether.c + usbnet.c" + +# For libertas +INCLUDE_LINUX_LIBERTAS_WLAN="libertas_spi.h" # 802.11 related headers INCLUDE_NET="cfg80211.h
@@ -352,7 +342,17 @@ INCLUDE_NET="cfg80211.h mac80211.h regulatory.h" -NET_DIRS="wireless mac80211 rfkill" +# Core 802.11 and rfkill code +NET_WLAN_DIRS="net/wireless + net/mac80211 + net/rfkill" + +# Bluetooth related directories +NET_BT_DIRS="net/bluetooth + net/bluetooth/bnep + net/bluetooth/cmtp + net/bluetooth/rfcomm + net/bluetooth/hidp" # WLAN drivers that have their own directory DRIVERS_WLAN="drivers/bcma
@@ -433,97 +433,58 @@ mkdir -p \ include/trace \ include/pcmcia \ include/crypto \ - net/mac80211/ \ - net/wireless/ \ - net/rfkill/ \ - drivers/ssb/ \ - drivers/bcma/ \ - drivers/net/usb/ \ - drivers/net/wireless/ \ - drivers/net/ethernet/atheros \ - drivers/net/ethernet/broadcom - -# include/linux -DIR="include/linux" -for i in $INCLUDE_LINUX; do - echo "Copying $GIT_TREE/$DIR/$i" - cp "$GIT_TREE/$DIR/$i" $DIR/ -done - -cp -a $GIT_TREE/include/linux/ssb include/linux/ -cp -a $GIT_TREE/include/linux/bcma include/linux/ -cp -a $GIT_TREE/include/linux/rfkill.h include/linux/rfkill_backport.h - -# include/net -DIR="include/net" -for i in $INCLUDE_NET; do - echo "Copying $GIT_TREE/$DIR/$i" - cp "$GIT_TREE/$DIR/$i" $DIR/ -done - -DIR="include/net/bluetooth" -for i in $INCLUDE_NET_BT; do - echo "Copying $GIT_TREE/$DIR/$i" - cp $GIT_TREE/$DIR/$i $DIR/ -done - -DIR="include/linux/usb" -for i in $INCLUDE_LINUX_USB; do - echo "Copying $GIT_TREE/$DIR/$i" - cp $GIT_TREE/$DIR/$i $DIR/ -done - -DIR="include/linux/spi" -for i in $INCLUDE_LINUX_SPI; do - echo "Copying $GIT_TREE/$DIR/$i" - cp $GIT_TREE/$DIR/$i $DIR/ -done - -# net/wireless and net/mac80211 -for i in $NET_DIRS; do - echo "Copying $GIT_TREE/net/$i/*.[ch]" - cp $GIT_TREE/net/$i/*.[ch] net/$i/ - cp $GIT_TREE/net/$i/Makefile net/$i/ - cp $GIT_TREE/net/$i/Kconfig net/$i/ -done - -cp $GIT_TREE/MAINTAINERS ./ - -# Copy files needed for statically compiled regulatory rules database -cp $GIT_TREE/net/wireless/db.txt net/wireless/ -cp $GIT_TREE/net/wireless/genregdb.awk net/wireless/ - -# net/bluetooth -for i in $NET_BT_DIRS; do - mkdir -p net/$i - echo "Copying $GIT_TREE/net/$i/*.[ch]" - cp $GIT_TREE/net/$i/*.[ch] net/$i/ - cp $GIT_TREE/net/$i/Makefile net/$i/ -done - -# Drivers in their own directory -for i in $DRIVERS; do - mkdir -p $i - - # -print -quit will just print once, so we don't burden - # this script with searching for further files if one is - # found - FILES_FOUND=$(find $GIT_TREE/$i/ -maxdepth 1 -type f -name \*.[ch] -print -quit | wc -l) - if [ $FILES_FOUND -eq 1 ]; then - echo "Copying $GIT_TREE/$i/*.[ch]" - cp $GIT_TREE/$i/*.[ch] $i/ - fi - if [ -f $GIT_TREE/$i/Makefile ]; then - cp $GIT_TREE/$i/Makefile $i/ - fi - if [ -f $GIT_TREE/$i/Kconfig ]; then - cp $GIT_TREE/$i/Kconfig $i/ - fi -done + drivers/bcma \ + drivers/misc/eeprom \ + drivers/net/usb \ + drivers/net/ethernet/broadcom \ + drivers/ssb \ + drivers/staging \ + $NET_WLAN_DIRS \ + $NET_BT_DIRS \ + $DRIVERS_WLAN \ + $DRIVERS_ETH \ + $DRIVERS_BT + +# Copy pci_ids.h for every situation +cp $GIT_TREE/include/linux/pci_ids.h include/linux + +if [[ -n "$ENABLE_NETWORK" ]]; then + # WLAN and bluetooth files + copyFiles "$INCLUDE_LINUX_WLAN" "include/linux" + copyFiles "$INCLUDE_NET" "include/net" + copyFiles "$INCLUDE_NET_BT" "include/net/bluetooth" + copyFiles "$INCLUDE_LINUX_USB_WLAN" "include/linux/usb" + copyFiles "$INCLUDE_LINUX_LIBERTAS_WLAN" "include/linux/spi" + copyFiles "$DRIVERS_WLAN_FILES" "drivers/net/wireless" + copyFiles "$RNDIS_REQUIREMENTS" "drivers/net/usb" + + copyDirectories "$NET_WLAN_DIRS" + copyDirectories "$NET_BT_DIRS" + copyDirectories "$DRIVERS_BT" + copyDirectories "$DRIVERS_WLAN" + copyDirectories "$DRIVERS_ETH" + + cp -a $GIT_TREE/include/linux/ssb include/linux/ + cp -a $GIT_TREE/include/linux/bcma include/linux/ + cp -a $GIT_TREE/include/linux/rfkill.h include/linux/rfkill_backport.h + + # Misc + cp $GIT_TREE/drivers/misc/eeprom/{Makefile,eeprom_93cx6.c} drivers/misc/eeprom/ + + # Copy files needed for statically compiled regulatory rules database + cp $GIT_TREE/net/wireless/{db.txt,genregdb.awk} net/wireless/ + + # Top level wireless driver Makefile + cp $GIT_TREE/drivers/net/wireless/Makefile drivers/net/wireless + + # Broadcom case + DIR="drivers/net/ethernet/broadcom" + cp $GIT_TREE/$DIR/b44.[ch] drivers/net/ethernet/broadcom + # Not yet + echo "obj-\$(CONFIG_B44) += b44.o" > drivers/net/ethernet/broadcom/Makefile +fi # Staging drivers in their own directory -rm -rf drivers/staging/ -mkdir -p drivers/staging/ for i in $STAGING_DRIVERS; do if [ ! -d $GIT_TREE/$i ]; then continue
@@ -534,59 +495,28 @@ for i in $STAGING_DRIVERS; do cp -a $GIT_TREE/$i drivers/staging/ done -for i in $DRIVERS_BT; do - mkdir -p $i - echo "Copying $GIT_TREE/$i/*.[ch]" - cp $GIT_TREE/$i/*.[ch] $i/ - cp $GIT_TREE/$i/Makefile $i/ -done - -# For rndis_wlan, we need a new rndis_host.ko, cdc_ether.ko and usbnet.ko -RNDIS_REQS="Makefile rndis_host.c cdc_ether.c usbnet.c" -DIR="drivers/net/usb" -for i in $RNDIS_REQS; do - echo "Copying $GIT_TREE/$DIR/$i" - cp $GIT_TREE/$DIR/$i $DIR/ -done - -DIR="drivers/net/ethernet/broadcom" -echo > $DIR/Makefile -cp $GIT_TREE/$DIR/b44.[ch] $DIR -# Not yet -echo "obj-\$(CONFIG_B44) += b44.o" >> $DIR/Makefile - -# Misc -mkdir -p drivers/misc/eeprom/ -cp $GIT_TREE/drivers/misc/eeprom/eeprom_93cx6.c drivers/misc/eeprom/ -cp $GIT_TREE/drivers/misc/eeprom/Makefile drivers/misc/eeprom/ - -DIR="drivers/net/wireless" -# Drivers part of the wireless directory -for i in $DRIVERS_WLAN_FILES; do - cp $GIT_TREE/$DIR/$i $DIR/ -done - -# Top level wireless driver Makefile -cp $GIT_TREE/$DIR/Makefile $DIR +########################### +# Suck in compat.git tree # +########################### -# Compat stuff COMPAT="compat" mkdir -p $COMPAT echo "Copying $GIT_COMPAT_TREE/ files..." -cp $GIT_COMPAT_TREE/compat/*.[ch] $COMPAT/ -cp $GIT_COMPAT_TREE/compat/Makefile $COMPAT/ cp -a $GIT_COMPAT_TREE/udev . cp -a $GIT_COMPAT_TREE/scripts $COMPAT/ cp $GIT_COMPAT_TREE/bin/ckmake $COMPAT/ -cp -a $GIT_COMPAT_TREE/include/linux/* include/linux/ -cp -a $GIT_COMPAT_TREE/include/net/* include/net/ -cp -a $GIT_COMPAT_TREE/include/trace/* include/trace/ -cp -a $GIT_COMPAT_TREE/include/pcmcia/* include/pcmcia/ -cp -a $GIT_COMPAT_TREE/include/crypto/* include/crypto/ +cp $GIT_COMPAT_TREE/compat/{Makefile,*.[ch]} $COMPAT/ +DIRS="linux net trace crypto pcmcia" +for dir in $DIRS; do + cp -a $GIT_COMPAT_TREE/include/$dir/* include/$dir/ +done # Clean up possible *.mod.c leftovers find -type f -name "*.mod.c" -exec rm -f {} \; +# Finally copy MAINTAINERS file +cp $GIT_TREE/MAINTAINERS ./ + # files we suck in for wireless drivers export WSTABLE=" net/wireless/
Signature · 1 line
1.7.11.2
Re: [PATCH 06/13] compat-wireless: Conditionally build network drivers
Quoted 15 lines · Ozan Çağlayan
Separate building of network drivers into its own conditional block.
Pass network as the last cmdline argument to mimic older compat-wireless behaviour.
Signed-off-by Ozan Çağlayan <[email protected]>--- scripts/admin-update.sh | 254 ++++++++++++++++++------------------------------ 1 file changed, 92 insertions(+), 162 deletions(-)scripts/admin-update.sh +0
-0
scripts/admin-update.sh patchRefresh() { · line 78
Quoted 5 lines
scripts/admin-update.sh +1
-1@@ -75,7 +75,7 @@ patchRefresh() { ### usage() { printf "Usage: $0 [refresh] [ --help | -h | -s | -n | -p | -c ] <subsystem1 subsystem2 ..>\n - Where subsystems are: wlan, bluetooth, ethernet and drm.\n" + Where subsystems are: network and drm.\n"
Why are you adding the subsystems "wlan, bluetooth, ethernet" in a previous patch and now remove them? If you reverted your original plan to add these three subsystems and now came to the conclusion it would need some more work, this is no problem, but you should modify your first patch and add only that one network subsystem in the first patch and just add drm in this one.
Quoted 315 lines
scripts/admin-update.sh +91
-161printf "\n" printf "${GREEN}%10s${NORMAL} - Update all your patch offsets using quilt\n" "refresh"@@ -199,10 +199,8 @@ copyDirectories() { # can not be applied correctly after a code update in $GIT_URL. # These switches determines which drivers to fetch in. -ENABLE_WLAN= -ENABLE_ETH= +ENABLE_NETWORK= ENABLE_DRM= -ENABLE_BT= EXTRA_PATCHES="patches" REFRESH="n"@@ -247,16 +245,8 @@ if [ $# -ge 1 ]; then REFRESH="y" shift ;; - "wlan") - ENABLE_WLAN=1 - shift - ;; - "bluetooth") - ENABLE_BT=1 - shift - ;; - "ethernet") - ENABLE_ETH=1 + "net") + ENABLE_NETWORK=1 shift ;; "drm")@@ -323,26 +313,26 @@ INCLUDE_NET_BT="hci_core.h smp.h a2mp.h" -# Bluetooth related directories -NET_BT_DIRS="bluetooth - bluetooth/bnep - bluetooth/cmtp - bluetooth/rfcomm - bluetooth/hidp" - # Required headers from include/linux -INCLUDE_LINUX="ieee80211.h - nl80211.h - pci_ids.h - eeprom_93cx6.h - ath9k_platform.h - wl12xx.h - rndis.h" +INCLUDE_LINUX_WLAN="ieee80211.h + nl80211.h + eeprom_93cx6.h + ath9k_platform.h + wl12xx.h + rndis.h" # For rndis_wext -INCLUDE_LINUX_USB="usbnet.h rndis_host.h" +INCLUDE_LINUX_USB_WLAN="usbnet.h + rndis_host.h" -INCLUDE_LINUX_SPI="libertas_spi.h" +# For rndis_wlan, we need a new rndis_host.ko, cdc_ether.ko and usbnet.ko +RNDIS_REQUIREMENTS="Makefile + rndis_host.c + cdc_ether.c + usbnet.c" + +# For libertas +INCLUDE_LINUX_LIBERTAS_WLAN="libertas_spi.h" # 802.11 related headers INCLUDE_NET="cfg80211.h@@ -352,7 +342,17 @@ INCLUDE_NET="cfg80211.h mac80211.h regulatory.h" -NET_DIRS="wireless mac80211 rfkill" +# Core 802.11 and rfkill code +NET_WLAN_DIRS="net/wireless + net/mac80211 + net/rfkill" + +# Bluetooth related directories +NET_BT_DIRS="net/bluetooth + net/bluetooth/bnep + net/bluetooth/cmtp + net/bluetooth/rfcomm + net/bluetooth/hidp" # WLAN drivers that have their own directory DRIVERS_WLAN="drivers/bcma@@ -433,97 +433,58 @@ mkdir -p \ include/trace \ include/pcmcia \ include/crypto \ - net/mac80211/ \ - net/wireless/ \ - net/rfkill/ \ - drivers/ssb/ \ - drivers/bcma/ \ - drivers/net/usb/ \ - drivers/net/wireless/ \ - drivers/net/ethernet/atheros \ - drivers/net/ethernet/broadcom - -# include/linux -DIR="include/linux" -for i in $INCLUDE_LINUX; do - echo "Copying $GIT_TREE/$DIR/$i" - cp "$GIT_TREE/$DIR/$i" $DIR/ -done - -cp -a $GIT_TREE/include/linux/ssb include/linux/ -cp -a $GIT_TREE/include/linux/bcma include/linux/ -cp -a $GIT_TREE/include/linux/rfkill.h include/linux/rfkill_backport.h - -# include/net -DIR="include/net" -for i in $INCLUDE_NET; do - echo "Copying $GIT_TREE/$DIR/$i" - cp "$GIT_TREE/$DIR/$i" $DIR/ -done - -DIR="include/net/bluetooth" -for i in $INCLUDE_NET_BT; do - echo "Copying $GIT_TREE/$DIR/$i" - cp $GIT_TREE/$DIR/$i $DIR/ -done - -DIR="include/linux/usb" -for i in $INCLUDE_LINUX_USB; do - echo "Copying $GIT_TREE/$DIR/$i" - cp $GIT_TREE/$DIR/$i $DIR/ -done - -DIR="include/linux/spi" -for i in $INCLUDE_LINUX_SPI; do - echo "Copying $GIT_TREE/$DIR/$i" - cp $GIT_TREE/$DIR/$i $DIR/ -done - -# net/wireless and net/mac80211 -for i in $NET_DIRS; do - echo "Copying $GIT_TREE/net/$i/*.[ch]" - cp $GIT_TREE/net/$i/*.[ch] net/$i/ - cp $GIT_TREE/net/$i/Makefile net/$i/ - cp $GIT_TREE/net/$i/Kconfig net/$i/ -done - -cp $GIT_TREE/MAINTAINERS ./ - -# Copy files needed for statically compiled regulatory rules database -cp $GIT_TREE/net/wireless/db.txt net/wireless/ -cp $GIT_TREE/net/wireless/genregdb.awk net/wireless/ - -# net/bluetooth -for i in $NET_BT_DIRS; do - mkdir -p net/$i - echo "Copying $GIT_TREE/net/$i/*.[ch]" - cp $GIT_TREE/net/$i/*.[ch] net/$i/ - cp $GIT_TREE/net/$i/Makefile net/$i/ -done - -# Drivers in their own directory -for i in $DRIVERS; do - mkdir -p $i - - # -print -quit will just print once, so we don't burden - # this script with searching for further files if one is - # found - FILES_FOUND=$(find $GIT_TREE/$i/ -maxdepth 1 -type f -name \*.[ch] -print -quit | wc -l) - if [ $FILES_FOUND -eq 1 ]; then - echo "Copying $GIT_TREE/$i/*.[ch]" - cp $GIT_TREE/$i/*.[ch] $i/ - fi - if [ -f $GIT_TREE/$i/Makefile ]; then - cp $GIT_TREE/$i/Makefile $i/ - fi - if [ -f $GIT_TREE/$i/Kconfig ]; then - cp $GIT_TREE/$i/Kconfig $i/ - fi -done + drivers/bcma \ + drivers/misc/eeprom \ + drivers/net/usb \ + drivers/net/ethernet/broadcom \ + drivers/ssb \ + drivers/staging \ + $NET_WLAN_DIRS \ + $NET_BT_DIRS \ + $DRIVERS_WLAN \ + $DRIVERS_ETH \ + $DRIVERS_BT + +# Copy pci_ids.h for every situation +cp $GIT_TREE/include/linux/pci_ids.h include/linux + +if [[ -n "$ENABLE_NETWORK" ]]; then + # WLAN and bluetooth files + copyFiles "$INCLUDE_LINUX_WLAN" "include/linux" + copyFiles "$INCLUDE_NET" "include/net" + copyFiles "$INCLUDE_NET_BT" "include/net/bluetooth" + copyFiles "$INCLUDE_LINUX_USB_WLAN" "include/linux/usb" + copyFiles "$INCLUDE_LINUX_LIBERTAS_WLAN" "include/linux/spi" + copyFiles "$DRIVERS_WLAN_FILES" "drivers/net/wireless" + copyFiles "$RNDIS_REQUIREMENTS" "drivers/net/usb" + + copyDirectories "$NET_WLAN_DIRS" + copyDirectories "$NET_BT_DIRS" + copyDirectories "$DRIVERS_BT" + copyDirectories "$DRIVERS_WLAN" + copyDirectories "$DRIVERS_ETH" + + cp -a $GIT_TREE/include/linux/ssb include/linux/ + cp -a $GIT_TREE/include/linux/bcma include/linux/ + cp -a $GIT_TREE/include/linux/rfkill.h include/linux/rfkill_backport.h + + # Misc + cp $GIT_TREE/drivers/misc/eeprom/{Makefile,eeprom_93cx6.c} drivers/misc/eeprom/ + + # Copy files needed for statically compiled regulatory rules database + cp $GIT_TREE/net/wireless/{db.txt,genregdb.awk} net/wireless/ + + # Top level wireless driver Makefile + cp $GIT_TREE/drivers/net/wireless/Makefile drivers/net/wireless + + # Broadcom case + DIR="drivers/net/ethernet/broadcom" + cp $GIT_TREE/$DIR/b44.[ch] drivers/net/ethernet/broadcom + # Not yet + echo "obj-\$(CONFIG_B44) += b44.o" > drivers/net/ethernet/broadcom/Makefile +fi # Staging drivers in their own directory -rm -rf drivers/staging/ -mkdir -p drivers/staging/ for i in $STAGING_DRIVERS; do if [ ! -d $GIT_TREE/$i ]; then continue@@ -534,59 +495,28 @@ for i in $STAGING_DRIVERS; do cp -a $GIT_TREE/$i drivers/staging/ done -for i in $DRIVERS_BT; do - mkdir -p $i - echo "Copying $GIT_TREE/$i/*.[ch]" - cp $GIT_TREE/$i/*.[ch] $i/ - cp $GIT_TREE/$i/Makefile $i/ -done - -# For rndis_wlan, we need a new rndis_host.ko, cdc_ether.ko and usbnet.ko -RNDIS_REQS="Makefile rndis_host.c cdc_ether.c usbnet.c" -DIR="drivers/net/usb" -for i in $RNDIS_REQS; do - echo "Copying $GIT_TREE/$DIR/$i" - cp $GIT_TREE/$DIR/$i $DIR/ -done - -DIR="drivers/net/ethernet/broadcom" -echo > $DIR/Makefile -cp $GIT_TREE/$DIR/b44.[ch] $DIR -# Not yet -echo "obj-\$(CONFIG_B44) += b44.o" >> $DIR/Makefile - -# Misc -mkdir -p drivers/misc/eeprom/ -cp $GIT_TREE/drivers/misc/eeprom/eeprom_93cx6.c drivers/misc/eeprom/ -cp $GIT_TREE/drivers/misc/eeprom/Makefile drivers/misc/eeprom/ - -DIR="drivers/net/wireless" -# Drivers part of the wireless directory -for i in $DRIVERS_WLAN_FILES; do - cp $GIT_TREE/$DIR/$i $DIR/ -done - -# Top level wireless driver Makefile -cp $GIT_TREE/$DIR/Makefile $DIR +########################### +# Suck in compat.git tree # +########################### -# Compat stuff COMPAT="compat" mkdir -p $COMPAT echo "Copying $GIT_COMPAT_TREE/ files..." -cp $GIT_COMPAT_TREE/compat/*.[ch] $COMPAT/ -cp $GIT_COMPAT_TREE/compat/Makefile $COMPAT/ cp -a $GIT_COMPAT_TREE/udev . cp -a $GIT_COMPAT_TREE/scripts $COMPAT/ cp $GIT_COMPAT_TREE/bin/ckmake $COMPAT/ -cp -a $GIT_COMPAT_TREE/include/linux/* include/linux/ -cp -a $GIT_COMPAT_TREE/include/net/* include/net/ -cp -a $GIT_COMPAT_TREE/include/trace/* include/trace/ -cp -a $GIT_COMPAT_TREE/include/pcmcia/* include/pcmcia/ -cp -a $GIT_COMPAT_TREE/include/crypto/* include/crypto/ +cp $GIT_COMPAT_TREE/compat/{Makefile,*.[ch]} $COMPAT/ +DIRS="linux net trace crypto pcmcia" +for dir in $DIRS; do + cp -a $GIT_COMPAT_TREE/include/$dir/* include/$dir/ +done # Clean up possible *.mod.c leftovers find -type f -name "*.mod.c" -exec rm -f {} \; +# Finally copy MAINTAINERS file +cp $GIT_TREE/MAINTAINERS ./ + # files we suck in for wireless drivers export WSTABLE=" net/wireless/
Re: [PATCH 06/13] compat-wireless: Conditionally build network drivers
Quoted 6 lines
Why are you adding the subsystems "wlan, bluetooth, ethernet" in a previous patch and now remove them? If you reverted your original plan to add these three subsystems and now came to the conclusion it would need some more work, this is no problem, but you should modify your first patch and add only that one network subsystem in the first patch and just add drm in this one.
Yep you're right. I was actually going to ask about it and then I decided to send these patches mainly for getting comments so I didn't take my time to merge the incremental changes.
Thanks.
PATCH 8/13 compat-wireless: No need to search for patches
In reply to Ozan ÇağlayanDon't search for patches with find. Just silent ls errors.
--- scripts/admin-update.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
scripts/admin-update.sh +1 -5
@@ -613,11 +613,7 @@ for dir in $EXTRA_PATCHES; do patchRefresh $dir fi - FOUND=$(find $dir/ -maxdepth 1 -name \*.patch | wc -l) - if [ $FOUND -eq 0 ]; then - continue - fi - for i in $(ls -v $dir/*.patch); do + for i in $(ls -v $dir/*.patch &> /dev/null); do echo -e "${GREEN}Applying backport patch${NORMAL}: ${BLUE}$i${NORMAL}" patch -p1 -N -t < $i RET=$?
Signature · 1 line
1.7.11.2
PATCH 9/13 compat-wireless: Fix cmdline parameter's name
In reply to Ozan ÇağlayanCorrect one is network not net.
--- scripts/admin-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/admin-update.sh +1 -1
@@ -245,7 +245,7 @@ if [ $# -ge 1 ]; then REFRESH="y" shift ;; - "net") + "network") ENABLE_NETWORK=1 shift ;;
Signature · 1 line
1.7.11.2
PATCH 10/13 compat-wireless: Selectively apply patches
In reply to Ozan ÇağlayanPatches are now structured in network/ and drm/ subfolders. Apply them only if the relevant subsystem is enabled.
--- scripts/admin-update.sh | 49 +++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-)
scripts/admin-update.sh +31 -18
@@ -143,7 +143,7 @@ nagometer() { let CHANGES=$ADD+$DEL - case $1 in + case `dirname $1` in "patches") brag_backport $ORIG_CODE $CHANGES $ADD $DEL ;;
@@ -201,6 +201,7 @@ copyDirectories() { # These switches determines which drivers to fetch in. ENABLE_NETWORK= ENABLE_DRM= +SUBSYSTEMS= EXTRA_PATCHES="patches" REFRESH="n"
@@ -262,6 +263,15 @@ if [ $# -ge 1 ]; then done fi +# SUBSYSTEMS is used to select which patches to apply +if [[ -n "$ENABLE_NETWORK" ]]; then + SUBSYSTEMS="network" +fi + +if [[ -n "$ENABLE_DRM" ]]; then + SUBSYSTEMS+=" drm" +fi + # User exported this variable if [ -z $GIT_TREE ]; then GIT_TREE="$HOME/linux-next"
@@ -604,25 +614,28 @@ for dir in $EXTRA_PATCHES; do LAST_ELEM=$dir done -for dir in $EXTRA_PATCHES; do - if [[ ! -d $dir ]]; then - echo -e "${RED}Patches: $dir empty, skipping...${NORMAL}\n" - continue - fi - if [[ $LAST_ELEM = $dir && "$REFRESH" = y ]]; then - patchRefresh $dir - fi - - for i in $(ls -v $dir/*.patch &> /dev/null); do - echo -e "${GREEN}Applying backport patch${NORMAL}: ${BLUE}$i${NORMAL}" - patch -p1 -N -t < $i - RET=$? - if [[ $RET -ne 0 ]]; then - echo -e "${RED}Patching $i failed${NORMAL}, update it" - exit $RET +for subsystem in $SUBSYSTEMS; do + for dir in $EXTRA_PATCHES; do + PATCHDIR="$dir/$subsystem" + if [[ ! -d $PATCHDIR ]]; then + echo -e "${RED}Patches: $PATCHDIR empty, skipping...${NORMAL}\n" + continue + fi + if [[ $LAST_ELEM = $dir && "$REFRESH" = y ]]; then + patchRefresh $dir fi + + for i in $(ls -v $PATCHDIR/*.patch 2> /dev/null); do + echo -e "${GREEN}Applying backport patch${NORMAL}: ${BLUE}$i${NORMAL}" + patch -p1 -N -t < $i + RET=$? + if [[ $RET -ne 0 ]]; then + echo -e "${RED}Patching $i failed${NORMAL}, update it" + exit $RET + fi + done + nagometer $PATCHDIR $ORIG_CODE >> $CODE_METRICS done - nagometer $dir $ORIG_CODE >> $CODE_METRICS done DIR="$PWD"
Signature · 1 line
1.7.11.2
Re: [PATCH 10/13] compat-wireless: Selectively apply patches
Quoted 58 lines · Ozan Çağlayan
Patches are now structured in network/ and drm/ subfolders. Apply them only if the relevant subsystem is enabled.
Signed-off-by Ozan Çağlayan <[email protected]>--- scripts/admin-update.sh | 49 +++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-)scripts/admin-update.sh +11
-10@@ -143,7 +143,7 @@ nagometer() { let CHANGES=$ADD+$DEL - case $1 in + case `dirname $1` in "patches") brag_backport $ORIG_CODE $CHANGES $ADD $DEL ;;@@ -201,6 +201,7 @@ copyDirectories() { # These switches determines which drivers to fetch in. ENABLE_NETWORK= ENABLE_DRM= +SUBSYSTEMS= EXTRA_PATCHES="patches" REFRESH="n"@@ -262,6 +263,15 @@ if [ $# -ge 1 ]; then done fi +# SUBSYSTEMS is used to select which patches to apply +if [[ -n "$ENABLE_NETWORK" ]]; then + SUBSYSTEMS="network" +fi + +if [[ -n "$ENABLE_DRM" ]]; then + SUBSYSTEMS+=" drm" +fi + # User exported this variable if [ -z $GIT_TREE ]; then GIT_TREE="$HOME/linux-next"@@ -604,25 +614,28 @@ for dir in $EXTRA_PATCHES; do LAST_ELEM=$dir done -for dir in $EXTRA_PATCHES; do - if [[ ! -d $dir ]]; then - echo -e "${RED}Patches: $dir empty, skipping...${NORMAL}\n" - continue - fi - if [[ $LAST_ELEM = $dir && "$REFRESH" = y ]]; then - patchRefresh $dir - fi -
scripts/admin-update.sh for dir in $EXTRA_PATCHES; do · line 619
Quoted 10 lines
scripts/admin-update.sh +3
-7- for i in $(ls -v $dir/*.patch &> /dev/null); do - echo -e "${GREEN}Applying backport patch${NORMAL}: ${BLUE}$i${NORMAL}" - patch -p1 -N -t < $i - RET=$? - if [[ $RET -ne 0 ]]; then - echo -e "${RED}Patching $i failed${NORMAL}, update it" - exit $RET +for subsystem in $SUBSYSTEMS; do + for dir in $EXTRA_PATCHES; do + PATCHDIR="$dir/$subsystem"
The folder network does not exists in this patch, this will break git bisect. Could you add the move of the patches from patches to network in this commit.
I do not like the name network for the folder containing the patches, because it could easily be to mixed up with the net folder. What about patches-net as the folder name?
Quoted 24 lines
scripts/admin-update.sh +17
-1+ if [[ ! -d $PATCHDIR ]]; then + echo -e "${RED}Patches: $PATCHDIR empty, skipping...${NORMAL}\n" + continue + fi + if [[ $LAST_ELEM = $dir && "$REFRESH" = y ]]; then + patchRefresh $dir fi + + for i in $(ls -v $PATCHDIR/*.patch 2> /dev/null); do + echo -e "${GREEN}Applying backport patch${NORMAL}: ${BLUE}$i${NORMAL}" + patch -p1 -N -t < $i + RET=$? + if [[ $RET -ne 0 ]]; then + echo -e "${RED}Patching $i failed${NORMAL}, update it" + exit $RET + fi + done + nagometer $PATCHDIR $ORIG_CODE >> $CODE_METRICS done - nagometer $dir $ORIG_CODE >> $CODE_METRICS done DIR="$PWD"
Re: [PATCH 10/13] compat-wireless: Selectively apply patches
Quoted 3 lines · Hauke Mehrtens
The folder network does not exists in this patch, this will break git bisect. Could you add the move of the patches from patches to network in this commit.
Ah, Okay.
Quoted 4 lines
I do not like the name network for the folder containing the patches, because it could easily be to mixed up with the net folder. What about patches-net as the folder name?
It is already under patches/, e.g. patches/network and patches/drm.
Signature · 1 line
Ozan Çağlayan
PATCH 11/13 compat-wireless: Move refresh logic into the loop
In reply to Ozan Çağlayan--- scripts/admin-update.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
scripts/admin-update.sh +6 -5
@@ -610,11 +610,12 @@ ORIG_CODE=$(find ./ -type f -name \*.[ch] | printf "\n${CYAN}compat-drivers code metrics${NORMAL}\n\n" > $CODE_METRICS printf "${PURPLE}%10s${NORMAL} - Total upstream lines of code being pulled\n" $ORIG_CODE >> $CODE_METRICS -for dir in $EXTRA_PATCHES; do - LAST_ELEM=$dir -done - for subsystem in $SUBSYSTEMS; do + + for dir in $EXTRA_PATCHES; do + LAST_ELEM=$dir + done + for dir in $EXTRA_PATCHES; do PATCHDIR="$dir/$subsystem" if [[ ! -d $PATCHDIR ]]; then
@@ -622,7 +623,7 @@ for subsystem in $SUBSYSTEMS; do continue fi if [[ $LAST_ELEM = $dir && "$REFRESH" = y ]]; then - patchRefresh $dir + patchRefresh $PATCHDIR fi for i in $(ls -v $PATCHDIR/*.patch 2> /dev/null); do
Signature · 1 line
1.7.11.2
PATCH 12/13 compat-wireless: Fetch in DRM drivers
In reply to Ozan ÇağlayanDRM drivers can now be sucked in when 'drm' is given as the command line parameter.
--- scripts/admin-update.sh | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-)
scripts/admin-update.sh +41 -4
@@ -427,12 +427,26 @@ DRIVERS_ETH="drivers/net/ethernet/atheros # Bluetooth drivers DRIVERS_BT="drivers/bluetooth" +# DRM drivers +DRIVERS_DRM="drivers/gpu/drm/ast + drivers/gpu/drm/cirrus + drivers/gpu/drm/gma500 + drivers/gpu/drm/i2c + drivers/gpu/drm/i810 + drivers/gpu/drm/i915 + drivers/gpu/drm/mgag200 + drivers/gpu/drm/nouveau + drivers/gpu/drm/radeon + drivers/gpu/drm/ttm + drivers/gpu/drm/via + drivers/gpu/drm/vmwgfx" + +# UDL uses the new dma-buf API, let's disable this for now +#DRIVERS="$DRIVERS drivers/gpu/drm/udl" + # Staging drivers if any STAGING_DRIVERS="" -# Select which drivers to build -DRIVERS="$DRIVERS_WLAN $DRIVERS_ETH" - rm -rf drivers/ mkdir -p \
@@ -444,6 +458,7 @@ mkdir -p \ include/pcmcia \ include/crypto \ drivers/bcma \ + drivers/platform/x86 \ drivers/misc/eeprom \ drivers/net/usb \ drivers/net/ethernet/broadcom \
@@ -453,7 +468,8 @@ mkdir -p \ $NET_BT_DIRS \ $DRIVERS_WLAN \ $DRIVERS_ETH \ - $DRIVERS_BT + $DRIVERS_BT \ + $DRIVERS_DRM # Copy pci_ids.h for every situation cp $GIT_TREE/include/linux/pci_ids.h include/linux
@@ -494,6 +510,27 @@ if [[ -n "$ENABLE_NETWORK" ]]; then echo "obj-\$(CONFIG_B44) += b44.o" > drivers/net/ethernet/broadcom/Makefile fi +if [[ -n "$ENABLE_DRM" ]]; then + # DRM drivers + copyDirectories "$DRIVERS_DRM" + + # Copy standalone drivers + echo "Copying $GIT_TREE/drivers/gpu/drm/*.[ch]" + cp $GIT_TREE/drivers/gpu/drm/{Makefile,*.[ch]} drivers/gpu/drm/ + + # Copy DRM headers + cp -a $GIT_TREE/include/drm include/ + + # drivers/gpu/drm/i915/intel_pm.c requires this + cp $GIT_TREE/drivers/platform/x86/intel_ips.h drivers/platform/x86 + + # Copy radeon reg_srcs for hostprogs + cp -a $GIT_TREE/drivers/gpu/drm/radeon/reg_srcs drivers/gpu/drm/radeon + + # Finally get the DRM top-level makefile + cp $GIT_TREE/drivers/gpu/drm/Makefile drivers/gpu/drm +fi + # Staging drivers in their own directory for i in $STAGING_DRIVERS; do if [ ! -d $GIT_TREE/$i ]; then
Signature · 1 line
1.7.11.2
PATCH 13/13 compat-wireless: Add DRM patches
In reply to Ozan ÇağlayanBring DRM patches from compat-drm GSoC tree.
--- patches/drm/01-dma_buf_ops-addition.patch | 54 +++ patches/drm/02-revert-vm_mmap.patch | 100 ++++++ patches/drm/03-swiotlb.patch | 87 +++++ patches/drm/04-revert-prime-support.patch | 384 ++++++++++++++++++++++ patches/drm/05-i915-define-acpi-video-class.patch | 18 + patches/drm/98-pr_fmt.patch | 199 +++++++++++ patches/drm/99-change-makefile.patch | 28 ++ 7 files changed, 870 insertions(+) create mode 100644 patches/drm/01-dma_buf_ops-addition.patch create mode 100644 patches/drm/02-revert-vm_mmap.patch create mode 100644 patches/drm/03-swiotlb.patch create mode 100644 patches/drm/04-revert-prime-support.patch create mode 100644 patches/drm/05-i915-define-acpi-video-class.patch create mode 100644 patches/drm/98-pr_fmt.patch create mode 100644 patches/drm/99-change-makefile.patch
patches/drm/01-dma_buf_ops-addition.patch new file +54 -0
@@ -0,0 +1,54 @@ +Assign vmap, vunmap and mmap fields in dma_buf_ops structs only +if kernel version >= 3.5.0 as they are added in 3.5. + +Note that the dma-buf itself was added with 3.4. It is not available +on kernels < 3.4. + +Index: compat-drm/drivers/gpu/drm/i915/i915_gem_dmabuf.c +=================================================================== +--- compat-drm.orig/drivers/gpu/drm/i915/i915_gem_dmabuf.c ++++ compat-drm/drivers/gpu/drm/i915/i915_gem_dmabuf.c +@@ -159,9 +159,11 @@ static const struct dma_buf_ops i915_dma + .kmap_atomic = i915_gem_dmabuf_kmap_atomic, + .kunmap = i915_gem_dmabuf_kunmap, + .kunmap_atomic = i915_gem_dmabuf_kunmap_atomic, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .mmap = i915_gem_dmabuf_mmap, + .vmap = i915_gem_dmabuf_vmap, + .vunmap = i915_gem_dmabuf_vunmap, ++#endif + }; + + struct dma_buf *i915_gem_prime_export(struct drm_device *dev, +Index: compat-drm/drivers/gpu/drm/nouveau/nouveau_prime.c +=================================================================== +--- compat-drm.orig/drivers/gpu/drm/nouveau/nouveau_prime.c ++++ compat-drm/drivers/gpu/drm/nouveau/nouveau_prime.c +@@ -111,9 +111,11 @@ static const struct dma_buf_ops nouveau_ + .kmap_atomic = nouveau_gem_kmap_atomic, + .kunmap = nouveau_gem_kunmap, + .kunmap_atomic = nouveau_gem_kunmap_atomic, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .mmap = nouveau_gem_prime_mmap, + .vmap = nouveau_gem_prime_vmap, + .vunmap = nouveau_gem_prime_vunmap, ++#endif + }; + + static int +Index: compat-drm/drivers/gpu/drm/radeon/radeon_prime.c +=================================================================== +--- compat-drm.orig/drivers/gpu/drm/radeon/radeon_prime.c ++++ compat-drm/drivers/gpu/drm/radeon/radeon_prime.c +@@ -134,9 +134,11 @@ const static struct dma_buf_ops radeon_d + .kmap_atomic = radeon_gem_kmap_atomic, + .kunmap = radeon_gem_kunmap, + .kunmap_atomic = radeon_gem_kunmap_atomic, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) + .mmap = radeon_gem_prime_mmap, + .vmap = radeon_gem_prime_vmap, + .vunmap = radeon_gem_prime_vunmap, ++#endif + }; + + static int radeon_prime_create(struct drm_device *dev,
patches/drm/02-revert-vm_mmap.patch new file +100 -0
100 lines not on this page · raw message
patches/drm/03-swiotlb.patch new file +87 -0
87 lines not on this page · raw message
patches/drm/04-revert-prime-support.patch new file +384 -0
384 lines not on this page · raw message
patches/drm/05-i915-define-acpi-video-class.patch new file +18 -0
@@ -0,0 +1,18 @@ +The definition of ACPI_VIDEO_CLASS was moved from video.c +to video.h in 3.1. Define it here to fix build for kernels older +than 3.1. + +Index: compat-drm/drivers/gpu/drm/i915/intel_opregion.c +=================================================================== +--- compat-drm.orig/drivers/gpu/drm/i915/intel_opregion.c ++++ compat-drm/drivers/gpu/drm/i915/intel_opregion.c +@@ -307,6 +307,9 @@ static int intel_opregion_video_event(st + struct acpi_bus_event *event = data; + int ret = NOTIFY_OK; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) ++#define ACPI_VIDEO_CLASS "video" ++#endif + if (strcmp(event->device_class, ACPI_VIDEO_CLASS) != 0) + return NOTIFY_DONE; +
patches/drm/98-pr_fmt.patch new file +199 -0
199 lines not on this page · raw message
patches/drm/99-change-makefile.patch new file +28 -0
@@ -0,0 +1,28 @@ +Remove drivers that we do not want to build from gpu/drm/Makefile + +Index: compat-drm/drivers/gpu/drm/Makefile +=================================================================== +--- compat-drm.orig/drivers/gpu/drm/Makefile ++++ compat-drm/drivers/gpu/drm/Makefile +@@ -28,21 +28,14 @@ CFLAGS_drm_trace_points.o := -I$(src) + obj-$(CONFIG_DRM) += drm.o + obj-$(CONFIG_DRM_USB) += drm_usb.o + obj-$(CONFIG_DRM_TTM) += ttm/ +-obj-$(CONFIG_DRM_TDFX) += tdfx/ +-obj-$(CONFIG_DRM_R128) += r128/ + obj-$(CONFIG_DRM_RADEON)+= radeon/ +-obj-$(CONFIG_DRM_MGA) += mga/ + obj-$(CONFIG_DRM_I810) += i810/ + obj-$(CONFIG_DRM_I915) += i915/ + obj-$(CONFIG_DRM_MGAG200) += mgag200/ + obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/ +-obj-$(CONFIG_DRM_SIS) += sis/ +-obj-$(CONFIG_DRM_SAVAGE)+= savage/ + obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/ + obj-$(CONFIG_DRM_VIA) +=via/ + obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/ +-obj-$(CONFIG_DRM_EXYNOS) +=exynos/ + obj-$(CONFIG_DRM_GMA500) += gma500/ +-obj-$(CONFIG_DRM_UDL) += udl/ + obj-$(CONFIG_DRM_AST) += ast/ + obj-y += i2c/
Signature · 1 line
1.7.11.2
Quoted 19 lines · Ozan Çağlayan
Hi,
The patches below modifies the
admin-update.shscript so that it accepts a variable-length last argument, namely network or/and drm, to selectively fetch specific subsystem codes into the tree.The last 2 patches constitutes the work done so far for the my GSoC project.
This first attempt is mostly for getting some comments. For example, eventhough you fetch network and drm drivers, make will just build network drivers. I will either port the project to kconfig which will dynamically configure and build what's available or hack config.mk and
Makefileto detect the availability of other drivers than the wireless ones.I thank Luis R. Rodriguez, my mentor, for his helpful and highly responsive mentorship :)
Quoted 15 lines
Ozan Çağlayan (13):
compat-wireless: Clean up *.mod.c once after everything
compat-wireless: Isolate drivers into different groups
compat-wireless: List everything vertically without concatenating
compat-wireless: Add ability to enable/disable subsystems
compat-wireless: Add 2 convenience functions
compat-wireless: Conditionally build network drivers
compat-wireless: Put network patches into its directory
compat-wireless: No need to search for patches
compat-wireless: Fix cmdline parameter's name
compat-wireless: Selectively apply patches
compat-wireless: Move refresh logic into the loop
compat-wireless: Fetch in DRM drivers
compat-wireless: Add DRM patches
Am I the only one missing 07/13 in series?
On [1] I do not see, too.
- "Birinci" Sedat -
[1] http://marc.info/?l=linux-wireless&r=1&b=201208&w=2
- Sedat -
Quoted 36 lines · Sedat Dilek
Quoted 19 lines · Ozan Çağlayan
Hi,
The patches below modifies the
admin-update.shscript so that it accepts a variable-length last argument, namely network or/and drm, to selectively fetch specific subsystem codes into the tree.The last 2 patches constitutes the work done so far for the my GSoC project.
This first attempt is mostly for getting some comments. For example, eventhough you fetch network and drm drivers, make will just build network drivers. I will either port the project to kconfig which will dynamically configure and build what's available or hack config.mk and
Makefileto detect the availability of other drivers than the wireless ones.I thank Luis R. Rodriguez, my mentor, for his helpful and highly responsive mentorship :)
Quoted 15 lines
Ozan Çağlayan (13):
compat-wireless: Clean up *.mod.c once after everything
compat-wireless: Isolate drivers into different groups
compat-wireless: List everything vertically without concatenating
compat-wireless: Add ability to enable/disable subsystems
compat-wireless: Add 2 convenience functions
compat-wireless: Conditionally build network drivers
compat-wireless: Put network patches into its directory
compat-wireless: No need to search for patches
compat-wireless: Fix cmdline parameter's name
compat-wireless: Selectively apply patches
compat-wireless: Move refresh logic into the loop
compat-wireless: Fetch in DRM drivers
compat-wireless: Add DRM patches
Quoted 7 lines
Am I the only one missing 07/13 in series?
On [1] I do not see, too.- "Birinci" Sedat -
Looks like "compat-wireless: Put network patches into its directory" is the missing one.
- Sedat -
Quoted 42 lines · Sedat Dilek
Quoted 41 lines · Sedat Dilek
Quoted 19 lines · Ozan Çağlayan
Hi,
The patches below modifies the
admin-update.shscript so that it accepts a variable-length last argument, namely network or/and drm, to selectively fetch specific subsystem codes into the tree.The last 2 patches constitutes the work done so far for the my GSoC project.
This first attempt is mostly for getting some comments. For example, eventhough you fetch network and drm drivers, make will just build network drivers. I will either port the project to kconfig which will dynamically configure and build what's available or hack config.mk and
Makefileto detect the availability of other drivers than the wireless ones.I thank Luis R. Rodriguez, my mentor, for his helpful and highly responsive mentorship :)
Quoted 15 lines
Ozan Çağlayan (13):
compat-wireless: Clean up *.mod.c once after everything
compat-wireless: Isolate drivers into different groups
compat-wireless: List everything vertically without concatenating
compat-wireless: Add ability to enable/disable subsystems
compat-wireless: Add 2 convenience functions
compat-wireless: Conditionally build network drivers
compat-wireless: Put network patches into its directory
compat-wireless: No need to search for patches
compat-wireless: Fix cmdline parameter's name
compat-wireless: Selectively apply patches
compat-wireless: Move refresh logic into the loop
compat-wireless: Fetch in DRM drivers
compat-wireless: Add DRM patchesAm I the only one missing 07/13 in series?
On [1] I do not see, too.- "Birinci" Sedat -
Quoted 7 lines
Quoted 2 lines
Looks like "compat-wireless: Put network patches into its directory" is the missing one.
- Sedat -
The patch was probably too big for the mailing list. Ozan do you have a git tree to pull from or could you put it on some web server.
Hauke