I am trying kernel patching for the first time. I am not sure the following is encountered with an error and if I am doing it correctly. But in all tutorials and videos shows, .patch extension files, but I have a .xz file.
Downloaded stable release 5.12.1 from https://www.kernel.org:
root@learn:/usr/local/src# wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.12.1.tar.xz
root@learn:/usr/local/src# mkdir Linux-Kernel-5.12.1
root@learn:/usr/local/src# tar xvf linux-5.12.1.tar.xz -C Linux-Kernel-5.12.1/ --strip-components=1
root@learn:/usr/local/src# cd Linux-Kernel-5.12.1/
root@learn:/usr/local/src/Linux-Kernel-5.12.1# cp /boot/config-$(uname -r) ./.config
Downloaded the patch .xz file from https://www.kernel.org/ to the directory:
root@learn:/usr/local/src/Linux-Kernel-5.12.1# wget https://cdn.kernel.org/pub/linux/kernel/v5.x/patch-5.12.1.xz
When applying:
root@learn:/usr/local/src/Linux-Kernel-5.12.1# patch -p1 < patch-5.12.1
patching file Makefile
Reversed (or previously applied) patch detected! Assume -R? [n]
What does that mean?.
What am I supposed to do at that point?.
Also, for Ubuntu/Debian, is downloading stable kernel and its patch from https://www.kernel.org/ is the right way or does it have its own source URL other than kernel.org?.