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 / 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 / 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 / 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.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 / 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 / broadcom-wl-fix-linux-5.17.patch
Last active May 10, 2022 16:40
Tentative fix for broadcom-wl 6.30.223.271 driver for Linux 5.17-rc1
From 31b7849092c43805c7fbaf7518b99874aa1b310c Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Wed, 12 Jan 2022 20:49:20 +0100
Subject: [PATCH] Tentative fix for broadcom-wl 6.30.223.271 driver for Linux 5.17-rc1
Set netdev->dev_addr through dev_addr_mod + PDE_DATA fix
Since Linux 5.17 netdev->dev_addr is const and must be changed through
dev_addr_mod, otherwise a warning is logged in dmesg and bad things may happen.
@joanbm
joanbm / nvidia-470xx-fix-linux-5.17.patch
Last active May 19, 2022 16:33
Tentative fix for NVIDIA 470.94 driver for Linux 5.17-rc1
From 026a2a54a234cdb7bf78c17be7ea29d8dcf9f390 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Sun, 23 Jan 2022 16:28:18 +0100
Subject: [PATCH] Tentative fix for NVIDIA 470.94 driver for Linux 5.17-rc1
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=359745d78351c6f5442435f81549f0207ece28aa
---
common/inc/nv-procfs-utils.h | 3 +++
1 file changed, 3 insertions(+)