After building the Image files, I copied it to the L4T/rootfs/boot directory and flashed the image using the command: sudo ./flash.sh -r -k kernel jetson-tx2 mmcblk0p1 using my host machine.
This does not change anything and I did not see any changes I made in the linux kernel.
Upon checking the boot directory on the TX2 after booting, I notice that the Image file in the boot of TX2 is not an updated file. (ls -l on the tx2 terminal gives a older date).
I then copied the Image file that I had built and replaced the Image in the boot directory and this did apply the changes I applied to the kernel.
What is that I am doing wrong? Why do I see that the flash command does not flash the rootfs/boot with a new image directly? Is the flashing procedure wrong or any step I am missing out?
please take out the -r -k kernel option to do a whole re-flash again to see.
Just as what you tried, kernel images are by default read from the rootfs instead of dedicated partitions, so flashing only these partitions is not going to take effect.
Thank you for the response. I get that I can flash the whole board without the -r -k kernel option. But I understand that it would flash the whole rootfs.
I have some other changes I have done on the device in the rootfs and do not want to lose them.
What is the way to just write a new kernel image to the device and make it work?
simply do this.
In case the new kernel fails, you can also add a new entry in /boot/extlinux/extlinux.conf, so you can select which set of kernel/kernel dtb you want to boot from upon boot.
You should know that there is signed kernel and device tree content in partitions of eMMC models. That content can also be in “/boot” if the extlinux.conf names files there. Flashing only changes partitions (it signs the content then flashes). If security fuses are not burned, then the named kernel Image and device tree (the FDT key/value entry) will instead be used (they take higher priority if fuses were not burned; burning fuses means only the partition content can be used).