Upgrade Kernel to 5.13/5.15

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official image, Ubuntu 22.04, 5.10 → dl.khadas.com - Index of /products/edge2/firmware/ubuntu/generic/

Please describe your issue below:

I’m wondering if and how it would be possible to upgrade/downgrade the kernel of the official khadas image to either 5.4 or 5.13/5.15. The reason is that we are having some USB trouble with a multi-camera setup and the librealsense team suggested that we use a non-supported kernel version.

More information on supported kernels for librealsense:

You can try to build your own ubuntu distro with Fenix build system GitHub - khadas/fenix: One-stop script set to build Ubuntu/Debian images
There are some config files for every board and you can customize there linux’s repos or branches from official khadas linux repo GitHub - khadas/linux: Linux kernel for Khadas VIMs & Edges. I see that 5.10 kernel version set by default in fenix for edge2, you can try to change branch

@mkovalevski thanks for the reply. Are there any official or unofficial documents that show how to do that or which steps to follow?

Is it possible to use a tool like Ukuu? And are there any hardware-related issues that I should expect when updating to 5.13/5.15?

There is no support for such version on Edge2.

And is there support to downgrade it to 5.4? If yes are there any downsides to this?

Thanks for your help

5.4 is also not supported.

Just for clarification. Only the 5.10 kernel is supported for the edge 2?

Hello @brunobiped

Yes, 5.10 fully supported. And also mainline ( 6.3-rcX) with very basic support.

Hello @numbqq ,

thanks for the help so far. I’ve identified some kernel patches that are missing for the 5.10 kernel that I hope will help to make our setup work.

Could you guide me on the workflow of how to apply the patches and when to do that? Am I understanding it correctly that I will have to rebuild the kernel with fenix, copy the resulting debian packages to the board and then install them? Where in this workflow would I add my patches?

Thanks in advance.

I am also trying to setup the realsense sdk on khadas edge2 running ubuntu 20. I could use more information on how to change the kernel for a fenix build.

Hello @brunobiped

Please check the documentation to build the kernel.

https://docs.khadas.com/products/sbc/edge2/development/linux/build-linux-kernel

@numbqq I’ve already found that. Where would the new kernel patches be applied in the process? When creating the kernel config?

Looking into the fenix repository a bit more I found the linux-mainline package here: fenix/packages/linux-mainline/patches at v1.4 · khadas/fenix · GitHub but it only has folders for newer kernels.

Some guidance on how to create and where to put the patches would be amazing. Thanks in advance

Ok after doing some more research I now understand better how the overall process works.

What I’m doing right now is to follow the instructions to build the kernel until I saved the config. Then I’m manually updating the driver code and then I run make kernel and make kernel-deb with ignoring the git update.

Is this the suggested way or are you suggesting another way.

Thanks in advance.

One last question. If I used the fenix 1.2 image. Is it a problem if I created the kernel with fenix 1.4?