The officially official Devuan Forum!

You are not logged in.

#1 Today 02:06:21

deepforest
Member
Registered: 2020-03-24
Posts: 506  

how apply patch to kernel?

Hi again:)

I need apply patch to my current kernel 6.12.107 and after install patched kernel
How do that please help.

here patches to allow remove hdmi clock limit at radeon old cards (pre Southern Islands (GCN 1, released in 2012))

https://gitlab.freedesktop.org/xorg/dri … ote_306722

https://github.com/Swell61/radeon-kernel-module

PS
why this patch still not included at officially at kernel?
i tried use such kernel parameter
radeon.hdmimhz=250
but nothing happens

Last edited by deepforest (Today 02:29:56)


linux/bsd at desktop its sado-mazo game/toy for geeks/nerds with absolutely no warranty and antifool protection ©
smile
linux have unprofessional bazar type of development by amators and to amators smile
pyzNi 3.14zDa! smile

Online

#2 Today 15:38:14

blackhole
Member
Registered: 2020-03-16
Posts: 294  

Re: how apply patch to kernel?

Looks like a few modified files from 6 years ago, rather than a patch file.

You would need to create your own patch from those files - e.g. using diff(1), then apply the patch to kernel source using the patch(1) command, then compile the kernel.

As the patched files are 6 years old, there's no guarantee any of this would work with a modern kernel however.

Offline

#3 Today 17:29:03

deepforest
Member
Registered: 2020-03-24
Posts: 506  

Re: how apply patch to kernel?

blackhole
huh, thanks, its so hard way,
overall process is understood,
but how exactly build kernel from source at Devuan i do not find any good instructions.


linux/bsd at desktop its sado-mazo game/toy for geeks/nerds with absolutely no warranty and antifool protection ©
smile
linux have unprofessional bazar type of development by amators and to amators smile
pyzNi 3.14zDa! smile

Online

#4 Today 17:48:01

blackhole
Member
Registered: 2020-03-16
Posts: 294  

Re: how apply patch to kernel?

I suggest you search the web. There are numerous articles on compiling a kernel out there.

I don't think compiling is going to be the main concern however. You have some source code changes from 6 years ago. You'd need to find out what was changed and apply that to newer kernel sources and recompile.

Offline

#5 Today 17:56:30

dzz
Member
From: Exmouth, South West England
Registered: 2016-12-01
Posts: 137  

Re: how apply patch to kernel?

Tried a backport kernel yet? Maybe it's been fixed already.

Offline

#6 Today 19:57:30

deepforest
Member
Registered: 2020-03-24
Posts: 506  

Re: how apply patch to kernel?

suggest you search the web. There are numerous articles on compiling a kernel out there.

I don't think compiling is going to be the main concern however. You have some source code changes from 6 years ago. You'd need to find out what was changed and apply that to newer kernel sources and recompile.

failed at applying patch, may be patch too old for this kernel

root@devuan:/home/freeartist-devuan/Downloads/linux-6.12.107/linux/linux-6.12.117# patch -p1 < 0001-Added-hdmimhz-and-dvi-override.patch
patching file drivers/gpu/drm/radeon/radeon.h
Hunk #1 FAILED at 117.
1 out of 1 hunk FAILED -- saving rejects to file drivers/gpu/drm/radeon/radeon.h.rej
patching file drivers/gpu/drm/radeon/radeon_connectors.c
Hunk #1 FAILED at 1490.
1 out of 1 hunk FAILED -- saving rejects to file drivers/gpu/drm/radeon/radeon_connectors.c.rej
patching file drivers/gpu/drm/radeon/radeon_drv.c
Hunk #1 FAILED at 197.
Hunk #2 succeeded at 235 with fuzz 2 (offset -55 lines).
1 out of 2 hunks FAILED -- saving rejects to file drivers/gpu/drm/radeon/radeon_drv.c.rej
patching file drivers/gpu/drm/radeon/radeon_encoders.c
Hunk #1 succeeded at 415 (offset -6 lines).
root@devuan:/home/freeartist-devuan/Downloads/linux-6.12.107/linux/linux-6.12.117#
root@devuan:/home/freeartist-devuan/Downloads/linux-6.12.107/linux/linux-6.12.117# patch -p1 < 0001-tried-to-introduce-a-radeon.hdmimhz-and-radeon.hdmik.patch 
patching file drivers/gpu/drm/radeon/radeon.h
Hunk #1 FAILED at 113.
1 out of 1 hunk FAILED -- saving rejects to file drivers/gpu/drm/radeon/radeon.h.rej
patching file drivers/gpu/drm/radeon/radeon_connectors.c
Hunk #1 succeeded at 30 with fuzz 2 (offset 1 line).
Hunk #2 succeeded at 106 (offset -26 lines).
Hunk #3 succeeded at 184 with fuzz 2 (offset -26 lines).
Hunk #4 succeeded at 351 with fuzz 1 (offset -57 lines).
Hunk #5 succeeded at 363 (offset -55 lines).
Hunk #6 succeeded at 548 (offset -49 lines).
Hunk #7 succeeded at 562 (offset -49 lines).
Hunk #8 succeeded at 584 (offset -49 lines).
Hunk #9 succeeded at 599 (offset -49 lines).
Hunk #10 succeeded at 615 (offset -49 lines).
Hunk #11 succeeded at 630 (offset -49 lines).
Hunk #12 succeeded at 645 (offset -49 lines).
Hunk #13 succeeded at 686 (offset -49 lines).
Hunk #14 succeeded at 698 (offset -49 lines).
Hunk #15 succeeded at 724 (offset -49 lines).
Hunk #16 succeeded at 752 (offset -49 lines).
Hunk #17 succeeded at 1501 (offset -18 lines).
Hunk #18 succeeded at 1509 (offset -18 lines).
Hunk #19 succeeded at 1519 with fuzz 1 (offset -18 lines).
patching file drivers/gpu/drm/radeon/radeon_drv.c
Hunk #1 FAILED at 194.
Hunk #2 succeeded at 255 with fuzz 2 (offset -30 lines).
1 out of 2 hunks FAILED -- saving rejects to file drivers/gpu/drm/radeon/radeon_drv.c.rej
root@devuan:/home/freeartist-devuan/Downloads/linux-6.12.107/linux/linux-6.12.117# 

Last edited by deepforest (Today 19:58:58)


linux/bsd at desktop its sado-mazo game/toy for geeks/nerds with absolutely no warranty and antifool protection ©
smile
linux have unprofessional bazar type of development by amators and to amators smile
pyzNi 3.14zDa! smile

Online

#7 Today 19:59:31

deepforest
Member
Registered: 2020-03-24
Posts: 506  

Re: how apply patch to kernel?

Tried a backport kernel yet? Maybe it's been fixed already.

thanks i will try


linux/bsd at desktop its sado-mazo game/toy for geeks/nerds with absolutely no warranty and antifool protection ©
smile
linux have unprofessional bazar type of development by amators and to amators smile
pyzNi 3.14zDa! smile

Online

#8 Today 20:03:09

Mercury
Member
Registered: 2024-11-14
Posts: 81  

Re: how apply patch to kernel?

The patch seems simple enough to apply the code changes manually, probably. Where are you getting the kernel source? I might take a shot at it if I find some time.

Last edited by Mercury (Today 20:03:26)

Online

#9 Today 20:23:41

deepforest
Member
Registered: 2020-03-24
Posts: 506  

Re: how apply patch to kernel?

Where are you getting the kernel source?

apt source linux

I might take a shot at it if I find some time.

Thanks that would be nice smile


linux/bsd at desktop its sado-mazo game/toy for geeks/nerds with absolutely no warranty and antifool protection ©
smile
linux have unprofessional bazar type of development by amators and to amators smile
pyzNi 3.14zDa! smile

Online

#10 Today 20:25:18

deepforest
Member
Registered: 2020-03-24
Posts: 506  

Re: how apply patch to kernel?

Tried a backport kernel yet? Maybe it's been fixed already.

this is right way?

/etc/apt/sources.list                                                                                                                                             

deb http://deb.devuan.org/merged excalibur-backports main non-free-firmware contrib
sudo apt-get reinstall -t excalibur-backports linux-image-6.12.107+deb13-amd64

linux/bsd at desktop its sado-mazo game/toy for geeks/nerds with absolutely no warranty and antifool protection ©
smile
linux have unprofessional bazar type of development by amators and to amators smile
pyzNi 3.14zDa! smile

Online

#11 Today 21:27:31

Mercury
Member
Registered: 2024-11-14
Posts: 81  

Re: how apply patch to kernel?

No, that'll just get you the current stable version. Backports is on 7.2.12 by now. You want:

sudo apt-get reinstall -t excalibur-backports linux-image-amd64

That'll get you the latest kernel in backports plus a few updated dependencies.

However I very strongly doubt this patch has been included recently.

I'll take a look at the source when I can. No promises.

Online

#12 Today 23:06:14

deepforest
Member
Registered: 2020-03-24
Posts: 506  

Re: how apply patch to kernel?

Thanks.
Seem no this patches at last kernel.
I check for changes this radeon kernel modules and they have no such changes that in the patches.
https://github.com/torvalds/linux/tree/ … drm/radeon
Also then i try do patch at this lasted radeon kernel modules i have - "failed" in console.
Maybe this patches too old for new kernels?


linux/bsd at desktop its sado-mazo game/toy for geeks/nerds with absolutely no warranty and antifool protection ©
smile
linux have unprofessional bazar type of development by amators and to amators smile
pyzNi 3.14zDa! smile

Online

Board footer