How to recompile and install the kernel on an R19.3 system?

Can anybody point me at some documentation, or a Forum post, on recompiling the kernel and installing it on a running R19.3 system? (At the moment, it is not an option to upgrade to a newer L4T release for our deployed products).

Should I recompile the kernel on the target itself? Or should I cross-compile on my host system?
Where does fastboot expect to find the kernel? In /boot? In a separate partition?
Is there anything else I should wonder about?

–wpd

With fastboot you need the flash the kernel using the flash.sh script. U-Boot is much more convenient as you can just copy the kernel to /boot directory on the rootfs and you can have multiple kernels present.

I prefer to compile kernels on my linux PC as the kernel is one of the few projects that are designed to be (also) cross compiled and it doesn’t have any dependencies.

Nevertheless, here’s one howto about compiling the kernel natively on Jetson:
https://devtalk.nvidia.com/default/topic/762653/embedded-systems/-howto-build-own-kernel-for-jetson-tk1/

Hello kulve,
Thank you for your response. At the moment, I am trying to find a solution that doesn’t involve me pulling Jetson boards out of deployed systems, booting them into recovery mode, and flashing them via USB. If the “too hard” LED comes on, I’ll do that, but I’m trying to be a little creative here first.

If it is as simple (for suitable definition of "simple) as copying a file to mmcblk0p6, I would prefer to do that. (So far, I don’t have enough confidence that that will work, so I am unwilling to try it yet).

Does anybody have any experience with flashing a new kernel on a live system without using a separate host running flash.sh?

If you use fastboot on R19.x the partition is from the -k 6 parameter to flash.sh. Flash is the only means I know of for updating a kernel on fastboot. If you flash R19.3 you could stick to R19.3 and still add u-boot…then only the initial upgrade would require flash. After that you simply add kernels to /boot and edit extlinux.conf without flash. There may be a way to update without flashing the entire Jetson, but I don’t know of anyone who succeeded at this…and if they had, they would have done so with recovery mode and the USB cable connected to a linux host.

OK. That sounds like I should bump up to R21.3 and gain the capability of using u-boot as well as the ability to upgrade the kernel on a running system.

I’ll go work on that.

You can stick to R19.3 and use u-boot. The trick is that u-boot is the default in R21.x, but for R19.x you need to the -L option and manually state “-L bootloader/ardbeg/u-boot.bin” on the flash command line. U-boot will simplify your life, and R21.3 is a significant quality improvement over the previous versions…but if you really want to stick to R19.3 it was a good release and has u-boot available (unless your software depends on R19.x you might as well go to R21.3).

Sorry, that came out wrong.
It seems to me that, in order to be able to upgrade the kernel on a running system, I need to switch to u-boot (which is my long term preference, anyway).
In order to switch to u-boot, I need to reflash the system(s).
If I’m going to reflash the system(s), I might as well upgrade to 21.3 and gain all of the improvements 21.3 offers over 19.3.

I was just hoping to find a way to upgrade the kernels on my 19.3 systems w/o having to physically touch all of them.