You are not logged in.
Hey,
I submit a bug about my Radeon HD7770 card on the linux kernel bugzilla, they supplied a patch and require me to patch the kernel. The problem is.. even after their instructions, I have really NO idea what to do!
This is the patch to be applied.
These are the "instructions"
patch and rebuild your kernel. E.g.,
patch -p1 -i disable_lbpw.diff
in the root of your kernel tree.
And another helping hand
If you use radeon.ko (modules) it is enough to make
'make modules' in your kernel tree (which rebuild radeon.ko only) and move radeon.ko to the right place, then rebuild your initrd with 'mkinitrd' and maybe it is a good idea to do 'grub2-install /dev/XXX' (or 2 times if you have RAID1) after all.
How would I apply this patch?
Last edited by Faintful (2014-07-02 06:39:58)
Offline
There are articles in the wiki and on the internet that can help you.
What have you tried so far?
Offline
Read the wiki article on abs. Build the kernel package adding that line to the section where you see the other patches applied.
Offline
Offline
So, after getting the linux PKGBUILD file, do I run makepg to get all the files? And from there on I can add the line in the Radeon module and compile it again? I have now abs installed and downloaded the linux core.
Offline
You will need to download their patch and save it to the same dir as the PKGBUILD. Edit the PKGBUILD adding your patch to the source array. Add a line to the prepare function after the other patch lines for example to apply your patch. Update the md5sums with 'updpkgsums' and then build.
Offline
The thing is, the attachment is just the line inside a/drivers/gpu/drm/radeon/si.c that he changed. It's not the complete file! But I have no idea where to find that file..
Offline
Look in the kernel source.
Read the man page for makepkg to figure out how to run it, so it doesn't overwrite your patched file.
Offline
The thing is, the attachment is just the line inside a/drivers/gpu/drm/radeon/si.c that he changed. It's not the complete file! But I have no idea where to find that file..
You got a complete patch, so use it. Something like this
...
'0012-fix-saa7134.patch'
'radeon-si-disable-lpbw.patch::https://bugzilla.kernel.org/attachment.cgi?id=141171')
...
sha256sums=(...
...
'79359454c9d8446eb55add2b1cdbf8332bd67dafb01fefb5b1ca090225f64d18'
'SHA256-SUM-OF-YOUR-PATCH')
...
prepare() {
...
patch -Np1 -i "${srcdir}/0012-fix-saa7134.patch"
# TEST: experminetal patch for my issue:
patch -Np1 -i "${srcdir}/radeon-si-disable-lpbw.patch"
...Look in the kernel source.
Read the man page for makepkg to figure out how to run it, so it doesn't overwrite your patched file.
If you have to recompile your kernel multiple times during the test with different patches, then that is the way to go. Download and extract the kernel sources with makepkg -o, then make manual changes, compile with makepkg -e, test, make manual changes, compile with makepkg -e, test, ...
Last edited by progandy (2014-06-28 11:14:52)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
I see! So the attachment itself IS the patch! One more thing, how do I actually retrieve the SHA256 checksum of the patch?
Offline
I see! So the attachment itself IS the patch! One more thing, how do I actually retrieve the SHA256 checksum of the patch?
Download and run sha256sum on the patch, or add it to pkgbuild and run updpkgsums on the pkgbuild.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
how do I actually retrieve the SHA256 checksum of the patch?
Are you sure it's not explained in the wiki?
https://wiki.archlinux.org/index.php/Patching_in_ABS
Then use updpkgsums to update the md5sums array. Or manually add an entry to the md5sums array; you can generate sum of your patch using md5sum tool.
It works the same way for other types of checksums.
Offline
Sorry karol, I should have figured that out myself indeed. Thanks.
Edit:
So I build the pkgbuild file including the patch. I have then ran pacman -U <kernel header package> and pacman -U <kernel package>, all without errors. Does this mean it's correctly patched? Also, is there a way to check if the patch was really applied? I guess I don't have to edit my bootconfig because it's the regular linux kernel that was already present that I have only updated, right?
Last edited by Faintful (2014-06-28 13:53:31)
Offline
If you had the line in the PKGBUILD to patch, and makepkg didn't error out, it patched. You are correct in that you do not have to edit the bootloader if you didn't modify the name of the pkg. You just replaced the repo package with your version.
Offline
I see! Thanks. Too bad the patch didn't fix my problem.
Offline