Can we modify drivers in the Linux kernel and rebuild it?

We buy the devboard of “NVIDIA Tegra 3 Developer Tablet” for developing our sensor driver.
But as I see in the docs, I doesn’t find the way to modify the driver and rebuild kernel.

Can we only test the app on this platform?
If not, could anyone tell me where to find the documents for this?

Please help.

Thanks,
YC

Download the documents package from https://developer.nvidia.com/linux-tegra and check the “Synchronizing the Kernel Sources” and “Building the NVIDIA Kernel” sections.

Basically you can git clone the NVIDIA kernel and configure and build it in the same way the upstream kernel is configured and built. When flashing the tablet, you can also use -K option to flash.sh to specify which zImage to flash.

Thanks Kulve, you do a great help!

And there is one more question that can we only change the zImage in this platform since there is no changes in Android?

I assume you don’t really mean Android but Linux 4 Tegra (which is basically Ubuntu and such, not Android)?

If you are using u-boot, you can just copy the new kernel image in uImage format to /boot in the rootfs and u-boot (the bootloader) will read it on next boot.

If you are using fastboot, you need to use the flash.sh script. I think you can flash just the kernel by passing only -k option (with the kernel image name) to the script.

Sorry for the late reply, since I am out for a business trip.
And thanks Kulve, that’s what I need.

I’m developing the driver for our new model device, and I think we only have to replace the modified zImage if no changes in the part of Android.