Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# shellcheck disable=SC1003
set -eEuo pipefail
# Converts a list of wildcard patterns, as defined by glob(7) and used
# by e.g. GNU find for the -path switch, to a single regular
# expression.
function ShellPatternsToRegex() {
local patterns=("$@")
@joanbm
joanbm / nvidia-fix-linux-5.9.patch
Last active October 16, 2020 10:27
NVIDIA 450.57/450.66 driver patch for Linux 5.9-rc1
Tentative patch for NVIDIA driver compatibility for Linux 5.9-rc1
NOTE: This allows the module to build and mostly work, but the nvidia-uvm
module won't load due to the new patch from Christoph Hellwig that
prevents modules to simultaneously link to GPL and proprietary symbols
(torvalds/linux commit 0fd9cc6b0c72245375520ffc8d97ce5857b63b94)
It seems to be non-trivial to fix this issue "for real" (workarounds not included)
---
@joanbm
joanbm / broadcom-wl-fix-linux-5.9.patch
Created August 16, 2020 22:46
Broadcom wireless driver patch for Linux 5.9-rc1
From e5630a5ff6de417f0df7cfb14fe9434487f3d815 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Fri, 14 Aug 2020 00:38:47 +0200
Subject: [PATCH] Fix build for Linux 5.9-rc1
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=428e2976a5bf7e7f5554286d7a5a33b8147b106a
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
---
src/wl/sys/wl_linux.c | 4 ++++
@joanbm
joanbm / broadcom-wl-fix-linux-5.10.patch
Last active September 17, 2023 17:06
Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10-rc1
From f3d652840f8dd959395065a1cf67ca40b04ec69b Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Tue, 13 Oct 2020 19:35:55 +0200
Subject: [PATCH] Get rid of get_fs/set_fs calls in Broadcom WL driver.
Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 5.10 (tested -rc1 up to 5.10.1)
Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-23 on Arch Linux.
NB: Some checks in wlc_ioctl_internal are likely superfluous,
@joanbm
joanbm / nvidia-fix-linux-5.10.patch
Last active November 5, 2020 13:01
Tentative fix for NVIDIA 455.28 driver for Linux 5.10-rc1
From 0c3e4c40305e78fd6d9899e43af6f0544a02fa6e Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Mon, 26 Oct 2020 04:44:33 +0100
Subject: [PATCH] Tentative fix for NVIDIA 455.28 driver for Linux 5.10-rc1
NOTE: This does not fix the licensing problem with nvidia-uvm which also affects Linux 5.9
---
common/inc/nv-linux.h | 6 ++++++
nvidia-drm/nvidia-drm-gem-user-memory.c | 7 +++++++
2 files changed, 13 insertions(+)
@joanbm
joanbm / lxc-workaround-linux-5.10.patch
Created October 31, 2020 01:09
Workaround for LXC 4.0.5 for Linux 5.10-rc1
From 77d66033cb0f497a217b7756f5e61de0f5e461ba Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Fri, 30 Oct 2020 07:19:10 +0100
Subject: [PATCH] Workaround for LXC 4.0.5 for Linux 5.10-rc1
Fixes launching a container like: sudo -i lxc-start -n talpine -F
Resulting in the error message: lxc-start: talpine: conf.c: turn_into_dependent_mounts: 3012 Invalid argument - Failed to copy "/proc/self/mountinfo"
Breaking commit in Linux: 36e2c7421f02a22f71c9283e55fdb672a9eb58e7
@joanbm
joanbm / nvidia-fix-linux-5.11.patch
Last active February 21, 2021 11:36
Tentative fix for NVIDIA 460.32.03 driver for Linux 5.11-rc2
From b6272b5b9eb2546383e4590ebf8d9578f3e2b947 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Thu, 7 Jan 2021 18:40:33 +0100
Subject: [PATCH] Tentative fix for NVIDIA 460.32.03 driver for Linux 5.11-rc2
---
conftest.sh | 17 ++++++++++++-
nvidia-drm/nvidia-drm-crtc.c | 17 +++++++++++++
nvidia-drm/nvidia-drm-drv.c | 15 ++++++++++++
nvidia-drm/nvidia-drm-gem-user-memory.c | 24 +++++++++++++++++++
@joanbm
joanbm / nvidia-fix-linux-5.12.patch
Created March 1, 2021 16:29
Tentative fix for NVIDIA 460.56 driver for Linux 5.12-rc1
From a2963d47c009bcbdc98907f70717d9d49425f6db Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Mon, 1 Mar 2021 17:25:15 +0100
Subject: [PATCH] Tentative fix for NVIDIA 460.56 driver for Linux 5.12-rc1
---
nvidia-drm/nvidia-drm-drv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
@joanbm
joanbm / nvidia-fix-linux-5.13.patch
Created May 9, 2021 22:12
Tentative fix for NVIDIA 465.27 driver for Linux 5.13-rc1
From 6c1d401600b76dd7d9c24ca4c6aa8d6e6b54fb05 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Fri, 16 Apr 2021 09:29:24 +0200
Subject: [PATCH] Tentative fix for NVIDIA 465.27 driver for Linux 5.13-rc1
---
nvidia-drm/nvidia-drm-crtc.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/nvidia-drm/nvidia-drm-crtc.c b/nvidia-drm/nvidia-drm-crtc.c
@joanbm
joanbm / nvidia-fix-linux-5.14.patch
Created July 12, 2021 19:03
Tentative fix for NVIDIA 465.31 driver for Linux 5.14-rc1
From f18c541edc5e122b06b0c1e65d0a422f0b8109e7 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Fri, 2 Jul 2021 02:09:58 +0200
Subject: [PATCH] Tentative fix for NVIDIA 465.31 driver for Linux 5.14-rc1
---
common/inc/nv-time.h | 6 ++++++
nvidia-drm/nvidia-drm-drv.c | 4 ++++
2 files changed, 10 insertions(+)