The big concern is that when you ran the “-k” version of flash you may have overwritten one or more partitions other than the root partition. In a worst case, this may have resulted in shifting other partitions, which would have destroyed the root partition…but I doubt that happened. If you can still use serial console to do file mv operations, you can just go to serial console and use sudo to put the correct kernel back in place.
Assuming you cannot operate normally, you will need to clone your root partition, edit the loopback mounted clone to put the kernel in place on the clone, and then re-flash while saying to reuse the existing image…that image will be from the repaired clone. Cloning is very slow, but it is also very reliable.
The JTK1 version of clone is described here, and mostly applies to the JTX1:
http://elinux.org/Jetson/Cloning
The commands specific to cloning a JTX1 are here:
https://devtalk.nvidia.com/default/topic/898999/jetson-tx1/tx1-r23-1-new-flash-structure-how-to-clone-/post/4784149/#4784149
If for example you cloned and produced file “clone.img.raw”, you could mount it at “/mnt” like this:
sudo mount -o loop cloe.img.raw /mnt
…from there you could cd to “/mnt/boot” and put kernel image back. Then cd out and “umount /mnt”.
Manual flash without JetPack has a subdirectory “bootloader” (the same directory would exist with JetPack since JetPack is just a front-end, but I’ve never used JetPack). During normal flash the equivalent of a clone image is generated using the sample rootfs and some boot loader recipes. This ends up as “bootloader/system.img.raw”, and a “sparse” image (which is basically a compressed image) becomes “bootloader/system.img”. Normal flash generates this and uses this. You can use the “-r” option to tell flash to reuse the system.img which is already there. Because flash works using either the sparse image or the raw image, it is ok to rename your clone.img.raw (or just copy it and keep original for backup) to “bootloader/system.img”, and then flash will restore your repaired clone (along with the invisible partitions being generated new).
Note that for clone operations you will need a lot of disk space. If your root partition is 15GB, then the clone itself will be 15GB. If you copy the clone somewhere temporarily as system.img, then that doubles it to 30GB. If the old system.img.raw is there, you could delete that, else you’re up to 45GB of space. Producing that much data may take hours, most of the time spent writing to disk.