Fedora apply npt patch

Yes, you can. It will also keep all your other kernels intact so you can always select an other one at boottime.
To remove a custom kernel, remove it from /boot.
If you added the local version string, you could do something like:
rm /boot/*dennis*

Also remove your now unused modules:

rm -r /lib/modules/*dennis*

Will it automatically install my DKMS modules or do I have to do that manually?

It should, at least as far as i know. Just realized that akmods seems to not like more then one -dash in the kernel name, it gave me this error: line 53: Invalid version (double separator '-').
You might want to consider this when choosing a local version string…

I don’t think I have any akmods, but I’ll consider it once make modules is done

After starting make install, I get errors about my DKMS modules, like:

sh ./arch/x86/boot/install.sh 4.13.9nptpatch+ arch/x86/boot/bzImage \
System.map "/boot"
grubby fatal error: unable to find a suitable template
Error! Bad return status for module build on kernel: 4.13.9nptpatch+ (x86_64)
Consult /var/lib/dkms/nvidia/384.90/build/make.log for more information.

This is the content of the make.log:

DKMS make.log for nvidia-384.90 for kernel 4.13.9nptpatch+ (x86_64)
Fr 27. Okt 23:29:24 CEST 2017
Makefile:19: /Kbuild: No such file or directory
make[2]: *** Keine Regel, um „/Kbuild“ zu erstellen.  Schluss.

Did I name it wrong? Should there be a dash before nptpatch and what about the +?

The name is fine (Mine was called ‘-npt’ and I had v4.14-rc6 checked out, resulting in two dashes). The + is default behaviour, I don’t think it causes this issue. I don’t have experience with proprietary drivers with custom kernels. Maybe the NVidia driver doesn’t support kernel 4.13.9 yet. I think you would have better luck in the small linux tread at this point…

I’m running 4.13.9 right know, so that’s not the issue. I installed the zfs, spl and nvidia modules manually, but my system didn’t boot up with the new kernel

I managed to do it now. I used the following commands:

dnf builddep kernel
#to install build dependencies
fedpkg clone -a kernel 
cd kernel
fedpkg switch-branch f26
scripts/newpatch.sh /path/to/npt.patch
#then I edited kernel.spec and changed:
# define buildid .local
#to: 
%define buildid .local
make release
fedpkg local

After that the built rpms are located in ./x86_64/. If anyone’s interested, I can share my built rpms but I don’t know how to create a repository.

2 Likes

Eh, just use https://copr.fedorainfracloud.org/

I looked at copr but it’s a build service so I can’t share already built rpms, can I?

No, but you can gzip the sources (including the patch) and upload that for copr to build.


At least, I think that’s how it works. I haven’t really played with copr (the build side of it, that is) before.

I created a copr account and looked at it, but I need to provide a git or svn source as far as i see

That would make sense.

clean the checked out repo, commit the changes and upload to github?

Can I somehow create a github repo that follows the fedora kernel repo and applies the patches to every new branch? I really don’t have much experience there.

Yeah, fork the repo and use a CI (continuous integration) program to compile it.

I know of one, gitlab, where this is easy to get going.

Hi all i followed MichaelS guide Ryzen Virtualization Success (GTX 1080ti passthrough with Windows 10 client) and managed somehow to get a win8.1 vm going however the gaming performance hurts my eyes i get 30fps in dota2 native is around +120fps so i was wondering if it was possible using the steps mention above to patch my kernel 4.13.11-200.fc26.x86_64 with the npt patch or will everything break if someone has done this pls let me know

Dropping a patched kernel in will work just fine.

Think of the kernel as the tires on your car. They support the entire vehicle and you change them every 50k miles or so and it doesn’t adversely affect anything as long as they’ve been installed properly.

Do you mean the instructions I posted? Those will work fine with your kernel version

great thanks for the confirmation hopefully everything works out

followed your instructions and i got an error at the last step while building got the following
Patch failed at 0128
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run “git am --continue”.
If you prefer to skip this patch, run “git am --skip” instead.
To restore the original branch and stop patching, run “git am --abort”.
error: Bad exit status from /var/tmp/rpm-tmp.DBLOHP (%prep)
Bad exit status from /var/tmp/rpm-tmp.DBLOHP (%prep)