Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are these patches included in last edge kernel? #76

Closed
subiol opened this issue Mar 27, 2021 · 15 comments
Closed

Are these patches included in last edge kernel? #76

subiol opened this issue Mar 27, 2021 · 15 comments
Labels
question Further information is requested

Comments

@subiol
Copy link
Contributor

subiol commented Mar 27, 2021

Hi

Due to this issue , I need this and this patches in the kernel.

Does the last of your kernels include those patches? If not, how hard would it be to include them? Thanks.

@fabianishere fabianishere added the question Further information is requested label Mar 27, 2021
@fabianishere
Copy link
Owner

Hi,

As far as I can tell, they are currently not included in the Linux stable builds. If you add these patches to the patches/pve directory, you can follow the regular build process as explained in the README and your patches will be included in the final build.

@subiol
Copy link
Contributor Author

subiol commented Mar 27, 2021

Ok, thanks, I will try that.

@subiol
Copy link
Contributor Author

subiol commented Mar 27, 2021

Hi, I do not have a lot of experience, I have installed all the dependencies, added the two patches to the folder, downloaded the source and I am stuck just before building, where it says "Afterwards, select the branch of your likings (e.g. v5.8.x).", I have no idea how to select the branch. Also, since I am using a zen1 cpu, I would like to add znver1 parameter to the compiler, but I am not completely sure where it goes.

Also, a suggestion, instead of the two options you offer to install dwarves > 1.16, dwarves 1.19 is in buster-backports. I think it would be simpler to suggest adding deb http://ftp.de.debian.org/debian buster-backports main to sources.list and then do apt update and apt install dwarves=1.19-1~bpo10+1 . Anyway, just a suggestion for "newbies" like me.

@subiol
Copy link
Contributor Author

subiol commented Mar 28, 2021

I figured out. Unfortunately, at least one of the patches fail to apply, so I guess I will have to wait. Thank you anyways. Figured it out too. Applying the previous patch to the two I needed made everything work.

@subiol
Copy link
Contributor Author

subiol commented Mar 28, 2021

I got an error while compiling. I selected 5.11-8 and only added PVE_BUILD_CFLAGS='-march=znver1'. The mistake has to do with workaround #48 . This is the output:

# Workaround for #48
mv /root/pve-edge-kernel/build/debian/pve-edge-headers-5.11.8-1/usr/src/linux-headers-5.11.8-1/scripts/module.lds.S \
    /root/pve-edge-kernel/build/debian/pve-edge-headers-5.11.8-1/usr/src/linux-headers-5.11.8-1/scripts/module.lds
mv: cannot stat '/root/pve-edge-kernel/build/debian/pve-edge-headers-5.11.8-1/usr/src/linux-headers-5.11.8-1/scripts/module.lds.S': No such file or directory
make[1]: *** [debian/rules:181: .headers_prepare_mark] Error 1
make[1]: Leaving directory '/root/pve-edge-kernel/build'
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make: *** [Makefile:90: pve-edge-kernel-5.11.8-1_5.11.8-1_amd64.deb] Error 2

Is this a error of the script or am I missing something installed? Seems module.lds.S is missing and these lines were added in a recent patch.

@fabianishere
Copy link
Owner

Check whether you have updated the submodules:

git submodule update —depth 1 submodules/ubuntu-mainline

@subiol
Copy link
Contributor Author

subiol commented Mar 28, 2021

I did, I run both sumodule lines after I cloned the source and cd into the folder. I am going to run both lines again in case I made a mistake and I will report back. I run both lines again and they returned immediately, which I am guessing it means the work was done already. I am going to clone the source again starting over again, to see if I messed up somewhere, and I will report back.

@subiol
Copy link
Contributor Author

subiol commented Mar 28, 2021

I can confirm the error is happening, following exactly the instructions in the README. Selected 5.11-9 and added PVE_BUILD_CFLAGS='-march=znver1'. Make fails with the same mistake as before.

@fabianishere
Copy link
Owner

Could you go to submodules/ubuntu-mainline and show me the output of:

git log

@subiol
Copy link
Contributor Author

subiol commented Mar 28, 2021

xxxx@xxx:~/pve-edge-kernel/submodules/ubuntu-mainline# git log
commit af39f8a385bd2179c491027f2b829349805e5bd8 (grafted, HEAD)
Author: Kernel Builder (kathleen) <ubuntu-kernel-bot@canonical.com>
Date:   Mon Dec 21 13:32:52 2020 +0000

    configs (based on Ubuntu-5.9-5.9.0-2.3)

@fabianishere
Copy link
Owner

So it seems the submodule is at 5.9, while you are trying to build for Linux 5.11. So, before you build, but after you have switched branches, you should run:

git submodule update --depth 1 submodules/ubuntu-mainline

@subiol
Copy link
Contributor Author

subiol commented Mar 28, 2021

Hi, I do not think I am selecting the branch appropiately because I am getting the same error. Can you indicate me how I am supposed to select the branch?

@fabianishere
Copy link
Owner

fabianishere commented Mar 28, 2021

Like this (for v5.11.x)

git checkout v5.11.x
git submodule update --init --depth 1 submodules/ubuntu-mainline
git submodule update --init --recursive submodules/zfsonlinux

@subiol
Copy link
Contributor Author

subiol commented Mar 29, 2021

Ok, that fixes that error. I am succesfully compiling the kernel now.

You made a typo in your last comment, missing '--init' and an 's', in case anyone check all of this it should be like in your README:

git submodule update --init --depth 1 submodules/ubuntu-mainline

The last command does not work also, the 's' on the last submodules is missing and even when added it complains about missing --init. Again, the order in your README:

git submodule update --init --recursive

seems to pull zfsonlinux fine.

My only doubt now is how do I select the patchlevel? git checkout selects the major and minor, but, for example, in the case of 5.11 it selects 5.11.8 automatically. If I wanted to select 5.11.9, how would I do it?

Would you accept a pull request to improve the instructions on the README? There might be a reason why you want the instructions as they are now, and if that is the case I will respect that and not lose my time, but if you are open to it, I can write a pull request and then you can decide if it improves the README or not.

Lastly, I have some doubts when it comes to installation. The procedure has created several deb files:

pve-edge-headers-5.11.8-1_5.11.8-1_amd64.deb
pve-edge-kernel-5.11.8-1_5.11.8-1_amd64.deb
pve-kernel-libc-dev_5.11.8-1_amd64.deb
linux-tools-5.11_5.11.8-1_amd64.deb
linux-tools-5.11-dbgsym_5.11.8-1_amd64.deb

Which of them should I install? And apart from installing the deb files and changing the apparmor configuration as per the README, is there anything else to do to properly install the new kernel?

When I install pve-edge-kernel-XXXXX.deb and pve-edge-headers-XXXXX.deb I get this message:

...........
done
N: Download is performed unsandboxed as root as file '/root/pve-edge-kernel/pve-edge-kernel-5.11.8-1_5.11.8-1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

My guess is that it is fine, but just want to confirm.

I have thank you before, but I want to thank you again for taking the time to babysit me through the whole process.

@fabianishere
Copy link
Owner

@subiol

Thank you for spotting the typo! I updated my comment in case others are looking at this issue as well. I am also happy to accept pull requests updating/clarifying the documentation (or for that matter any useful change).

As for your other questions:

  1. To select the patchlevel, you can checkout any of the tags listed here (via git checkout v5.11.6-1 for example). Though, 5.11.9 is not tagged yet, but you can access it from the following branch: staging/v5.11.9-1-57b04ee
  2. Most people only need pve-edge-kernel to install the Linux kernel. If you use DKMS modules, you also need the pve-edge-headers package. For most people, the others are not necessary, so you'll probably know when you need them.
  3. Yep, you can just ignore the warning message. If you want it to go away, you can probably change the owner of the DEB files to _apt.

@subiol subiol closed this as completed Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants