Jetson TK1: Access the filesystem via USB

I want to he able to service the Jetson TK1 via command line (not ssh) when plugged into the USB of my Ubuntu 14.04 (or any other Linux) laptop.

When I plug the TK1 into USB, it shows up in lsusb as NVidia, but I cannot see a filesystem to mount.

I’m experimenting with using something other than L4T (probably ArchLinuxARM), and I have already bricked the system once. I recovered the Jetson TK1 with the Jetpack, but I was required to run Ubuntu to do so… I don’t want this limitation. How do I get around it?

you could try booting other distros from sdcard. seems the easiest way to me

The full-size USB connector is usable only for connecting devices (like keyboard and mouse) to Jetson, not the other way around. The micro USB socket is actually capable of being used for the same devices as the full-size socket (keyboard/mouse) when a micro-A connector is connected…again, this kind of cable will never connect to another computer as both ends of the cable cannot be devices, nor can both ends be host. The supplied micro connector is micro-B, rather than micro-A, and is only half of the device versus host issue.

Under micro-B type cables the USB connector changes function and has the ability to become a device…like a mass storage device…rather than being a host looking for a device. This can only happen if software is also set up correctly…on Jetson this connector will only behave as device mode if in recovery mode…and the software/firmware of recovery mode functions only with the flash program provided by nVidia…it is not designed to act as mass storage. In theory it could be modified to do this, but it is unlikely to ever happen. This would be listed as On the Go (OTG), but software/firmware is missing to do this.

The serial port (via NULL modem cable) though does exactly what you wanted…it is always there as a command line. If you don’t want to connect via a serial cable you can get a serial USB cable which still connects to the DB-9 connector and pretends to be a common RS-232 serial port.

A JTAG debugger is the only other option for accessing raw partitions of Jetson…OpenOCD does not function with Jetson and so you’d need a proprietary JTAG debugger (many thousands of dollars).

If it is just the ethernet cable you are avoiding, I suppose somewhere out there is an application to use USB like a network, but I don’t know what that would be.

I think what he was asking is if there is anyway to get to the root file system of the TK1 and make edits to files if he bricks it and it won’t boot.

Will the serial console be there if there is something fundamentally goofed and the device won’t boot?

Serial console is always there up to the point of failure. You can’t restore a non-functional system with this unless you have a stage of boot capable of console commands being enough for restore…which probably requires either ethernet or an SD card with backup on it and enough operating system running to restore the file system (you could even use an external DVD over SATA if you have the driver installed…which in turn requires a functioning operating system). This is true for any access of any kind recovering the system…serial console is just the part of command access which is available earliest and also under the most failure conditions (short of a serious failure serial console works when all else fails).

Full restore from a completely failed system requires flash or requires a high end JTAG debugger. There will be no simple USB solution, the device does not exist as a mass storage device…which is what the root partition showing up on USB would be, and even this would fail if the operating system failed (OTG mode does not exist in Jetson, but if it did then the o/s would be required).

Flash is the real restore. There are options to save the system image file from a flash and use it for both backup device and restore (using “-r” to reuse the system image during flash). How to back up is a large topic.

It sounds like Serial is the route I was looking for… I don’t mind using rs232, it brings back fond memories lol. I’ll need a DB9 connector as I don’t currently own any computers with a COM port.

Would the serial port also work Jetson to Jetson? I can have a stable one and experimental one and restore via the stable one upon failure.

Remember your cable needs to be the “NULL modem” type. The end with a real keyboard needs to run a serial terminal program with settings 115200,8N1 (speed 115200, 8 bits, no parity, 1 stop bit, under something like minicom or gtkterm). This will “just work” between any normal computer running a serial terminal connected via NULL modem cable to Jetson. It just requires naming the PC side’s serial port, e.g., something like /dev/ttyS0 (or under USB serial UART /dev/ttyUSB0)…check logs on PC to watch serial port detect as Jetson is connected/powered up.

Jetson-to-Jetson will work but it has a default app running a program which consumes the serial port…this is the serial console (which allows a terminal to talk to it) and you can’t run two programs at once on the same console (they’ll both try and confusion will result). It’s a case of disabling serial console on this particular Jetson so that there is room to run a serial terminal (my favorite is gtkterm, but not sure what packages have to be added to get it on Jetson…minicom is the simplest choice).

Your Jetson which is used as a PC and which runs the serial terminal has it’s serial console set up right at boot…even during boot loader before a Linux kernel is ever started. To disable this console (making room for a terminal) I suggest you flash with u-boot which allows you to change serial console with the edit of extlinux.conf file…changing boot loader stage of fastboot means flashing every time you change and the changes are much more obscure. With u-boot I think you would merely edit the “APPEND” part of the /boot extlinux.conf file to remove this part:

APPEND <s><i><b>console=ttyS0,115200n8 console=tty1</b></i></s> no_console_suspend=1 lp0_vec=2064@0xf46ff000....