I’ve already received an RMA but I’m trying my best to avoid it because 1) it seems like the easy way out and 2) I need to learn how to reflash it anyway. There is a VERY high probability that I’ll muck up the replacement unit. A wise engineer once told me “If you’re not breaking things, your not learning!” I had a theory that if the virtual machine is somehow causing the problem, would it be possible to reflash the TK1 using a Raspberry Pi?
I did not know you were using a VM. Normally hanging at a specific spot would imply a memory failure in that particular place. A VM has been known (quite often) to cause similar behavior (the port may stop working after starting out ok), so this could indeed be the problem. It isn’t something wrong with your flash process per se, but with a VM there seem to be a number of tiny details which are hard to get past.
The flash program itself is an x86_64 Linux elf binary. So it can only run on an Intel processor format, the RPi would not be able to run it. The bright side is that anything messed up by a partial flash on a VM should go away as soon as you flash from either a non-VM or a VM which has those issues worked out on.
I’m using VirtualBox running Ubuntu 12.04. Do you know of anyone using VirtualBox successfully to reflash TK1? If not, do you have any suggestions for VM’s that do play nice with the TK1 reflash procedure? Thanks!
Several people have used VirtualBox, but I think most had some extra attention required to setup which a regular flash does not require. If you are just flashing without JetPack, the Ubuntu 12 probably is fine, otherwise you’ll want Ubuntu 14 when using JetPack (to emphasis, Linux is a requirement of flash, Ubuntu is a requirement of JetPack). Probably someone here can give advice on what went wrong on USB over VirtualBox, but I’ve never had to set that up. Do be sure the file system under the VM is native Linux type…if it is something like NTFS it will fail.
If I wanted to build a linux machine to flash the TK1, where would I find an x86? All of my current computers (Toshiba, Asus, HP) are x64. Do I have to buy some old POS on ebay or craigslist, or is there some special order computer I need to get, or am I completely missing the boat on this one? I thought I could flash from a virtual machine, but since that’s not working, I was going to try to create a dual-boot machine next using one of my spare computers. But, if it must be x86, that’s apparently not going to work either. Any suggestions? Thanks!
The Linux machine just needs to have an Intel type CPU and support 64-bit. Almost all of the Intel and AMD CPUs have had only this for several years. The x86 is just referring to the Intel format instruction set, the 64 is of course 64-bit. Sometimes people have that hardware but have not updated their Linux in many years, so it is possible a very old 32-bit distribution can exist on 64-bit hardware…this would be an issue. You can get Ubuntu 64-bit and install to most any Intel format machine and do the job. Currently Ubuntu 14 works with JetPack, although it was stated there will soon be a JetPack release supporting ubuntu 16 as well.
The thing about flash of a Jetson is that there are things being done which go beyond a simple user space program. All kinds of details matter, e.g., you can’t store Linux permissions on a Windows file system, and you need root access for some operations like copy/create of device special files…plus loopback is being used. In the case of a VM this can be done, but quite often something which is required needs special setup to accomplish it in a VM. I suspect that the USB stall during your use of VM is probably a bug in the VM, or perhaps the host operating system interfering. A VM is a tricky thing to work with when so many details exist which a normal user space program does not require. A regular host should “just work”, these things by default are taken care of.
FYI, dual boot machines are a great tool. This would work for you as well, just make sure you have plenty of hard disk space.
SOLVED!
I installed Ubuntu 16.04 on my laptop and flashing the TK1 worked like a charm.
I created a bootable USB stick following the instructions at www.ubuntu.com for my 16.04 installation. Super easy. Once you figure out how to boot from USB (hint, check your BIOS settings) you cannot simply “TRY” Ubuntu from the USB stick to flash the TK1, that won’t work! You’ll get the “out of memory” error. You have to actually INSTALL Ubuntu for it to work. Fear not, just install dual boot. The best part is: the Ubuntu partition just sits there until the next time you muck up the TK1 and need to flash it again! I know I will. =)
For flashing, I followed the instructions here:
http://goo.gl/2iyidk
… or here:
… or here:
Here’s what I used:
mkdir reflash
cd reflash
wget https://developer.nvidia.com/embedded/dlc/l4t-Jetson-TK1-Driver-Package-R21-5
wget https://developer.nvidia.com/embedded/dlc/l4t-Jetson-TK1-Sample-Root-Filesystem-R21-5
#Extract the Driver Package tarball:
sudo tar xpf l4t-Jetson-TK1-Driver-Package-R21-5
#Extract the File System tarball into a specific sub-directory:
cd Linux_for_Tegra/rootfs
sudo tar xpf …/…/l4t-Jetson-TK1-Sample-Root-Filesystem-R21-5
cd …/
sudo ./apply_binaries.sh
#Plug TK1 into laptop and put it into recovery mode.
sudo ./flash.sh jetson-tk1 mmcblk0p1
The whole process (from downloading Ubuntu, creating a bootable USB stick, modifying the BIOS, installing Ubuntu, flashing the TK1, to booting the TK1 for the first time) is less than 1 hour.
The NEXT time I need to reflash, it will only take 5 minutes. =)
Hope this helps someone!
Successfully used Oracle VM Virtual Box running on a MacBookPro10,2 to flash a Jetson TK1 over USB. Very excited that this worked!
Summary of steps:
- Install Virtual Box (Version 5.1.4 r110228 (Qt5.5.1))
- Download Ubuntu 14.04 (ubuntu-14.04.5-desktop-amd64.iso)
- Install Ubuntu in VM (make sure the disk size space is large enough, used 50GB to be safe)
- Download and install Jetpack on the VM
- > chmod +x JetPack-L4T-2.2.1-linux-x64.run
- Note: only the 'Linux for Tegra' and 'Post Install > Flash OS' are needed in the Component Manager
As a bonus, to add file sharing on the VM,
- Turn on file sharing on the Mac (I used the 'Shared' folder)
- from the VM, Devices> Insert Guest Additions (installs a new ISO that allows sharing)
- >mkdir ~/Shared
- >sudo mount -t vboxsf Shared /home//Shared
I’ve done the same (steps 1-4 above).
I’ve got the VM set up correctly with the USB device.
Everything goes well but then wedges as the ./nvflash command (this is all kicked off by the installer scripts - I’m not doing command line other than running JetPack-L4T-2.2.1-linux-x64.run)
(./nvflash --bct PM375_Hynix_2GB_H5TC4G64AFR_H5TC4G73CFR_RDA_924MHz.cfg --setbct --configure flash.cfg --create --bl fastboot.bin --odmdata 0x6009C000 --go
I have:
- tried 3 USB cables, then ordered a new one and tried the 4th
- tried two separate TK1 developer kits
I’ve tried leaving it for hours, even over night, but now after about a dozen attempts I’m puzzled as to what could be wrong. According to the logs it sends ppt.img and u-boot.bin successfully but fails at sending the ~2.4GB system.img file (always after about 30KB, whether I leave it running for an hour or (once) overnight).
The only thing I’ve not tried to do is switch to another VM or a native ubuntu machine.
A VM often fails for such mysterious reasons. There may be subtle setup requirements not needed with a regular Linux install. I would strongly suggest using a native Linux machine.