Hardware Hacking First Steps

You bought yourself a new router, and it's nice. You can connect a hard disc to it and then it shares its content over samba. It even can do torrent. Wow. But then you stumbled over OpenWrt and its 2000 packages you can install just like that. Never mind all the other FOSS software you could compile for it. And you started crying and decided: you neeeed OpenWrt on your router. And if your router is already supported, dandy, flash it on and have fun. But if your router is not (yet) supported? Well, then do this:

  • you could login to some unix shell after booting, over Ethernet with telnet/ssh. Example: hacking.dockstar (dockstar)
  • you could login to bootloader console while booting, over Ethernet or over the Serial Port
  • you could access the hardware without any booting, without any software present, over the JTAG Port with JTAG Software, like HairyDairyMaid
  • Depending on the bootloader that is being used, you could utilize different commands to gather hardware information. Please see the manual for that particular bootloader to get this done. Once you have the information you could keep it for yourself or post it online. Depending on how fast you are, there probably is going to be information regarding this already available or you are the first one. This simple step is necessary because the manufacturer usually does not document exactly what hardware has been installed. Now with this information you are going to use google or the search engine of your choice, to see what GNU/Linux drivers are available, and if, in which kernel version they have been integrated into. For example:
  • http://en.wikipedia.org/wiki/Comparison_of_open_source_wireless_drivers#Linux you can see, since which or until which Kernel version drivers for wireless radio circuitry, has been integrated.
  • But of course there is much more to a system, in this case in form of a SoC, then the wireless drivers. Anything needs drivers. For example the VLYNQ needs to be supported by the Kernel. etc. And you are done. If you really want to continue, you could find help here:

Oh, you should also learn a programming language, like C.

  • bootloader This is probably going to be the first piece of software you are going to notice. But the rest of the system could be of interest as well:
  • Most probably it's a kind of outdated GNU/Linux Kernel with FOSS drivers or with binary only drivers or both. Then you are lucky, because the source code of the Linux Kernel is licensed under the GPLv2 and this constrains the seller to make the modified source code, if they actually bothered to modify anything, and they probably did, available to the customers (and not necessarily to the public) free of charge.

Now maybe the drivers for the components have already been integrated into mainline kernel, which means that a newer kernel should work on this device out of the box. If not, you could continue to use the one, from the manufacturer. So combine this kernel with other FOSS software, you want to run on it... ;-)

  • In case the manufacturer did not use a Linux Kernel but some kind of *BSD, you're fucked, since the license the *BSD sources are under are not GPL. This particularly means, the usurper does not have to make source code available. They could, but they don't have to. Oh may you have much “fun” with *BSD. :-P

The overall Flash Layout looks like the example. Simply an overview over the different MTD-partition there are. And what their meaning is.

This is more tricky, here you want to know exactly what is written on the flash: flash.layout

The data could be zipped or g'zipped or even be encrypted. Also, there is going to be some number's between the data blocks, like CRC or whatever.

Now you want to run you own Software on your device. Maybe its hardware has already support in some projects or in the mainline kernel. If not, then consider adding a new device or a complete new platform to develop software for. Please do not bother developers or potential developers to write code for this. Present the information you gathered, if it is interesting enough, somebody is going to do that ;-) Now to write code, the developer needs only some bread and water and a simple text editor, but to test this code, they're going to need the hardware itself. You could donate or maybe just lend the hardware.

The homepage needs no cookies, no javascript, no nothing enabled. It simply works. ;-) It is available under the Creative Commons BY-SA license:

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2023/03/18 23:51
  • by ryanc