runborg / vyos-pi-builder

71 stars 22 forks source link

Fixing of kernel build process and adding of note to README.md #18

Closed djkaosun closed 1 year ago

djkaosun commented 1 year ago

Changed from adding -v8 in the process after building the kernel to not adding -v8 when building the kernel. Added note about the case where the kernel version required by vyos is different from the version of the kernel for pi.

runborg commented 1 year ago

Hi!

After looking into this, i also see that the arm64 kernel built by vyos itself also uses the -v8 architecture suffix on its arm64 kernel. the most current kernel is : linux-image-5.10.142-v8-arm64-vyos

i also think this is a good addition to have in case we need multiple kernel flavors for a single architecture.. Instead of removing this, i think a better solution would be to incorporate the "localversion"/"flavor" tag into the build system to get the correct kernel installed for the system.

djkaosun commented 1 year ago

Hi!

Added kernel_localversion since kernel_version and kernel_flavor were already defined.

This is because flavor at kernel build and kernel_flavor at vyos build felt like separate concepts. It seems better to match the KERNEL_SUFFIX at the kernel build with the kernel_flavor at the VyOS build, as it is easier to understand.

Possibly setting kernel_flavor in vyos-build/data/architectures/arm64.toml to "v8-arm64-vyos" might work, but I haven't tried it.

djkaosun commented 1 year ago

Or maybe we should set -$(dpkg --print-architecture)-vyos to LOCALVERSION instead of KERNEL_SUFFIX in vyos-build/packages/linux-kernel/build-kernel.sh I'm not sure.

Which change do you think is better?

djkaosun commented 1 year ago

Possibly setting kernel_flavor in vyos-build/data/architectures/arm64.toml to "v8-arm64-vyos" might work, but I haven't tried it.

I have tried this approach and can confirm that it works.

djkaosun commented 1 year ago

Since the commits are getting messy, close the request and reopen it as a new request.