Is there a better way to add patches to the kernel package? #60317
-
|
Hi, i need 2 patches added to the kernel for my vr headset to work, and im wondering if there is a better way to do it? currently i made a copy of the 6.18 kernel package with a different name and patches added (also had to disable the no patches check) in my local diff -r -u linux6.18 linux6.18-bsb-fix
Only in linux6.18-bsb-fix/patches: 0001-Change-device-uvc_version-check-on-dwMaxVideoFrameSi.patch
Only in linux6.18-bsb-fix/patches: amd-bsb-dsc-fix.patch
Only in linux6.18-bsb-fix/patches: bigscreen-beyond-kernel.patch
diff --color --color -r -u linux6.18/template linux6.18-bsb-fix/template
--- linux6.18/template 2026-04-29 19:24:45.307669350 +0300
+++ linux6.18-bsb-fix/template 2026-05-01 01:42:05.805582149 +0300
@@ -1,5 +1,5 @@
# Template file for 'linux6.18'
-pkgname=linux6.18
+pkgname=linux6.18-bsb-fix
version=6.18.25
revision=1
short_desc="Linux kernel and modules (${version%.*} series)"
@@ -64,9 +64,9 @@
# doing this in post_extract instead of *_patch, so that ./xbps-src extract
# will have the actual kernel release source code and additional patches
# can be applied with ./xbps-src patch in the next step.
- if [ ! -f $XBPS_SRCDISTDIR/$pkgname-$version/patch-${version}.xz ]; then
- return
- fi
+ # if [ ! -f $XBPS_SRCDISTDIR/$pkgname-$version/patch-${version}.xz ]; then
+ # return
+ # fi
xzcat $XBPS_SRCDISTDIR/$pkgname-$version/patch-${version}.xz |
patch -sNp1 -F0
}
@@ -334,7 +334,7 @@
rm -f ${DESTDIR}/lib
}
-linux6.18-headers_package() {
+linux6.18-bsb-fix-headers_package() {
preserve=yes
nostrip=yes
noshlibprovides=yes
@@ -345,7 +345,7 @@
}
}
-linux6.18-dbg_package() {
+linux6.18-bsb-fix-dbg_package() {
preserve=yes
nostrip=yes
noverifyrdeps=yesthe patches themselves are from the Linux VR Adventure wiki page on the big screen beyond (i only added the patches for amd cuz thats what i run on): https://wiki.vronlinux.org/docs/hardware/bigscreen-beyond/ so uhhh, is there a better way to do this? cuz i keep forgetting to update the package template to be in sync with the 6.18 kernel package xd |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
don't copy the whole template, just drop your patches in |
Beta Was this translation helpful? Give feedback.
-
|
If you remove the |
Beta Was this translation helpful? Give feedback.
-
|
just out of curiosity, and for completeness: if someone wants to have multiple kernels, then is there anything beyond what @okawo80085 did? |
Beta Was this translation helpful? Give feedback.
don't copy the whole template, just drop your patches in
srcpkgs/linux6.18/patches, build the package, install it, and repolock linux6.18 and any subpackages