34 lines
865 B
Markdown
34 lines
865 B
Markdown
|
# Patching the audio driver on rocky linux 9 kernel 5
|
||
|
|
||
|
|
||
|
```
|
||
|
yumdownloader --source kernel-modules
|
||
|
rpm -ivh kernel-5.14.0-284.11.1.el9_2.src.rpm
|
||
|
|
||
|
# get topdir
|
||
|
rpm --showrc | grep topdir
|
||
|
# $HOME/rpmbuild
|
||
|
|
||
|
cd $HOME/rpmbuild/SOURCES
|
||
|
unxz linux-5.14.0-284.11.1.el9_2.tar.xz
|
||
|
tar xvf linux-5.14.0-284.11.1.el9_2.tar
|
||
|
cd linux-5.14.0-284.11.1.el9_2/sound/pci/hda
|
||
|
|
||
|
kdiff3 patch_realtek.c \
|
||
|
/usr/src/kernels/audiopatch/linux-5.14.0-162.12.1.el9_1/sound/pci/hda/patch_realtek.c \
|
||
|
-o patch_realtek.c.new
|
||
|
|
||
|
|
||
|
#create patch file
|
||
|
diff -Naur patch_realtek.c.orig patch_realtek.c.new > patch_realtek.c.patch
|
||
|
# patch the file
|
||
|
cp patch_realtek.c patch_realtek.c.orig
|
||
|
patch -p0 patch_realtek.c < patch_realtek.c.patch
|
||
|
|
||
|
# compile and install the driver
|
||
|
make -C /lib/modules/`uname -r`/build M=$PWD
|
||
|
make -C /lib/modules/`uname -r`/build M=$PWD modules_install
|
||
|
```
|
||
|
|
||
|
|