Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Support patching wifi drivers

Featured Replies

As far as I can tell, there is currently no hook to allow patching the out of tree wifi drivers, since they're merged into the kernel source after patching.

 

I was able to add the ability to patch these drivers with just a one line change:

 

Spoiler

diff --git a/lib/compilation.sh b/lib/compilation.sh
index 7bb90902..ddaf24a8 100644
--- a/lib/compilation.sh
+++ b/lib/compilation.sh
@@ -293,6 +293,8 @@ compile_kernel()
        # build 3rd party drivers
        compilation_prepare

+       advanced_patch "wifi" "$KERNELPATCHDIR" "$BOARD" "" "$BRANCH" "$LINUXFAMILY-$BRANCH"
+
        # create linux-source package - with already patched sources
        local sources_pkg_dir=$SRC

 

 

Would it be possible to add that (or something similar) to the build scripts, or let me know how I can currently add the patches if it's already possible?

 

Thanks!

Solution is simple and it works. But :) fragmenting patches further is not what we want to achieve. I would propose to keep this wifi / optional patches as a part of the kernel source and patch it the same way as everything else.

 

Perhaps this way - moving wifi up before major patching? Some wireless patches that are added as patches might need some adjustments. Major one (sunxi-current) is passing.
 

Spoiler

diff --git a/lib/compilation.sh b/lib/compilation.sh
index 7bb90902..1737d991 100644
--- a/lib/compilation.sh
+++ b/lib/compilation.sh
@@ -273,25 +273,18 @@ compile_kernel()
        fi
        cd "$kerneldir"
 
-       # this is a patch that Ubuntu Trusty compiler works
-       # TODO: Check if still required
-       if [[ $(patch --dry-run -t -p1 < $SRC/patch/misc/compiler.patch | grep Reversed) != "" ]]; then
-               display_alert "Patching kernel for compiler support"
-               patch --batch --silent -t -p1 < $SRC/patch/misc/compiler.patch >> $DEST/debug/output.log 2>&1
-       fi
-
-       advanced_patch "kernel" "$KERNELPATCHDIR" "$BOARD" "" "$BRANCH" "$LINUXFAMILY-$BRANCH"
+         if ! grep -qoE '^-rc[[:digit:]]+' <(grep "^EXTRAVERSION" Makefile | head -1 | awk '{print $(NF)}'); then
+                sed -i 's/EXTRAVERSION = .*/EXTRAVERSION = /' Makefile
+        fi
+        rm -f localversion
 
-       if ! grep -qoE '^-rc[[:digit:]]+' <(grep "^EXTRAVERSION" Makefile | head -1 | awk '{print $(NF)}'); then
-               sed -i 's/EXTRAVERSION = .*/EXTRAVERSION = /' Makefile
-       fi
-       rm -f localversion
-
-       # read kernel version
-       local version=$(grab_version "$kerneldir")
+        # read kernel version
+        local version=$(grab_version "$kerneldir")
 
        # build 3rd party drivers
-       compilation_prepare
+        compilation_prepare
+
+       advanced_patch "kernel" "$KERNELPATCHDIR" "$BOARD" "" "$BRANCH" "$LINUXFAMILY-$BRANCH"
 
        # create linux-source package - with already patched sources
        local sources_pkg_dir=$SRC/.tmp/${CHOSEN_KSRC}_${REVISION}_all

 


Patch includes some cleaning of unneeded code.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.