MediaDeb: Debian For Mediatek Cellphones

In this small note I’ll tell you how to turn an old MediaTek SoC-based cellphone,(The one that’s probably gathering dust somewhere on your shelf, with no updates from vendor) into… a server running Debian Stretch! I’ve done this for UMI-X2 and iOcean X8 and you can download ready to flash firmware for these devices at the bottom of this post. Since a typical Chinese mtk cellphone now features 2GB or more RAM and 4 or more ARM cores the result packs way more performance than a typical Raspberry PI.

(more…)

The painfull verilog preprocessor pitfall

Just a little note about how includes and `defines work in verilog which is VERY different from how they behave in most programming languages. This may not really hurt in a small project, but can become a real PITA in a big project with a dozen of third-party blocks.

TL;DR: Macro defines are have a global scope in verilog and propagate from file to file during one tool invocation.

(more…)

An EasyCAP Box with V-Slot mount

Okay, I admit, adding a webcam to watch how your print is doing in nothing new, but since I plan on hooking 4 cameras, that might be considered novel. Anyway, in the earlier post I described the analog camera modules I’ve found in the attic and added a nice 3d-printed camera mount, in this post I will describe the other hardware part of my capture setup. But before the lengthy details – here goes a test capture from one of the cameras.

As you see the quality is not of the best and high temperature in the printing chamber contributes a lot to the noises from the camera matrix.

(more…)

Data Recovery: SD, ddrescue and Android

All things come to an end at some point, so do uSD cards. And they tend to do that just about the time you normally LEAST expect them to.
Anyways, at my country house, away from the noise of the big city I had a cheap cellphone tethering internets over an OpenVPN connection. The operator does not offer proper external IP service, so I have to run an OpenVPN connection to have access to surveillance.
I have a bunch of cams here and there, mostly watching after these guys:

The cellphone itself runs a rooted android and a debian chroot with OpenVPN off an SD card. The SD card died this weekend and at some point I realised that I don’t have a recent backup. It was no big deal, just a debian rootfs + a bunch of config files for OpenVPN, but since I spent a while then and now perfecting configs and tuning OpenVPN for performance over the celluar network those weren’t backed up. Ooops.

Anyways, this note talks about data recovery from such an SD card and the common pitfalls.

(more…)

Tablet guts necromancered into a fancy SBC

It’s been a hell of a summer with loads of work at my dull dayjob so that I’ve almost forgotten about everything including this very blog. However once the hell cooled down a little bit I found myself with a few spare days and my usual itch to tinker for a little bit with something. It happened I also needed another linux single-board computer to do some dull geeky stuff. Instead of ordering one from aliexpress once again I dived into the junk and found this little dead piece of hardware:

IMG_2598

(more…)