Moved the /bin/ - folder


Hey gang. Super embarrasing post here.
I was compiling this binary and something must have gone wrong with the Makefile … For some reason my binary file ended up in a file called usr/bin instead of the intended folder usr/bin/ …

Assuming wrongly the mv command would take -r for folders, i mv-ed the /usr/bin/ - folder instead of the intended /usr/bin - file to the folder /usr/temp/.

Realising my mistake, I tried to mv back, but of course the mv command didn’t work any longer. Also, I couldn’t start the file explorer to move the files there…
Now my pocketchip doesn’t start, with no backups.

Is it possible to mount its’ file system from another computer to move the folder back to the correct place?


If you installed SSH before going wrong, you could SSH into your pchip. Otherwise, look at this excellent tutorial by @NinjaKun to see how you can do mostly the same using a USB connection.

When you can connect to your pchip’s terminal, which I highly doubt because at boot time, many bin files are needed, you can mv the bin folder back where it belongs. Although you have to specify the full path to the mv binary, because it can’t be found in the default path anymore. So something like /usr/tmp/usr/bin/mv should do the trick.

If all else fails, there’s nothing left but to reflash your pchip.


This. I miss an uboot-or-something function with a maintenance mode where the chip works as a slave drive through microUSB slot. It’s not always the best thing to reflash, considering you often learn more by fixing your errors.
A keypress thingie upon boot to go into maintenance mode would be greatly appreciated. You would also be able to back up the unit by getting direct access to the nand.


Afaik, the chip supports a true serial connection for debugging uboot. You have to use a serial-to-ttl converter, as is often used in conjunction with microcontrollers ($1-ish on ebay) and connect it to the UART-Rx and Tx pins. The full documentation is somewhere in the forums or in the NTC docs.