Kernel replacement

Hi team,

I am wondering if I can replace the kernel with newly build one (with modified driver codes)

The situation is, I’ve got a porting guide from a device vendor, and that requires a kernel fix.
(I attached a 5G modem device through USB-C, and could not see it’s working, so I asked the vendor a guide)

So, I am wondering if I can do that, and please, provide a guide to do that if possible!

Hello @wonse92,

Yes, you should be able to replace the kernel with a new custom one.

Now, there are a couple of ways of doing that.

  1. During development, to avoid flashing everything, something we do is simply copying the new kernel Image into the board inside /boot. This is usually the fastest, but a good approach only during the development phase. Just keep in mind that depending on the configuration you use for compiling the kernel, you might end up with a kernel name that does not match the kernel modules directory, which is a very common issue and you would see that the board boots but no image is displayed. You could verify this by running the command uname -a and comparing the kernel name against the modules directory ls /lib/modules.
  2. You can create a new image with the custom Kernel. This approach you can use once you are happy with your system and ready for production. You can create complete custom images with your new kernel and flash them into your product before sending them to your customers.

Please also check if all you really need is a custom kernel, because you might also need to modify your device tree.

Now, at this point, I have a few questions for you.

  1. Have you already compiled the kernel ?
  2. Are you familiar with the process of getting the sources and modifying them ?

Please let us know if you require further assistance, we would love to help.

regards,
Andrew
Embedded Software Engineer at ProventusNova

Dear Andrew,
Thank you for your kind reply.

For the questions you gave,

  1. No. not yet.
  2. I am not familiar with that (expecially, w.r.t kernel)

BTW, can I ask you another question?
Do we have RNDIS Host driver inside the jetpack 6 image?
(Or, can we activate it?)

After having talk with service manager (of 5G modem),
I’ve noticed that if there is RNDIS Host driver enabled on the board host,
than I don’t need to re build the kernel!

So, I wonder if we can have RNDIS Host driver.

Best Regards,
Se-won.

Hello Se-won @wonse92,

I don’t have a copy of JP6 sources downloaded at this moment, however I was checking a JP 5 directory that I have and found the following:

~/nvidia/nvidia_sdk/JetPack_5.1.3_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/sources$ ls kernel/kernel-5.10/drivers/net/usb/rndis_host.c 
kernel/kernel-5.10/drivers/net/usb/rndis_host.c

So the driver is there for base linux, I don’t really know if you would need to enable it or if the driver is already compiled by default.

There are also these other drivers specific to NVIDIA for USB network devices:

~/nvidia/nvidia_sdk/JetPack_5.1.3_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/sources$ ls kernel/nvidia/drivers/net/usb/
Kconfig  Makefile  r8152_compatibility.h  r8152_shield.c

Please let us know if you require further assistance getting the driver to build, we would love to help.

regards,
Andrew
Embedded Software Engineer at ProventusNova

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.