Turtles All the Way Down: So, does anyone actually operate this way?

Mar 28, 2014

So, after all everything's said and done, you're probably asking yourself "Why would somebody go through all this trouble to build a computer from the ground up? It's never going to be as fast as one that you can buy, so what's the point?"

Ultimately, it comes down to what you're trying to accomplish. If you want the fastest possible CPU, tens of gigabytes of RAM, and four monitors so you can go raiding more efficiently chances are you have a threat model that doesn't approach the level of concern, paranoia, or security requirements that we assumed through the other articles in this series. If you're hoping to precisely replicate a customized laptop to run half a dozen virtual machines, an office suite, and a visual IDE you will probably be disappointed. I have no idea if it will be possible to run a virtualization stack like QEMU or even DOSbox on our free and open laptop. If you're looking to learn how computers operate from the ground up this is a good project; it might even make a good class project that covers a semester or two. If you're willing to trade off raw processor speed for visibility into the CPU's inner workings, a gig or two of RAM to be able to modify and upgrade every last aspect of the motherboard and interfaces, and no (or little) 3D acceleration for a platform that you're much more certain hasn't been compromised in subtle ways, this might be a project of interest (especially if your threat model fits the last 'if'...)

Let's face facts. When working with computers we are forced to make many trade-offs. Code in a language which incorporates many features that let you precisely specify certain functionality and you might be trading off readability. Program in a language which is relatively simple and orthogonal and you'll be trading off by having to write more code later to carry out certain tasks. Ease of use and increased security measures are a trade off that we all make, one which frustrates many end users and causes people to pick legendarily bad passwords. Use a graphical user interface and you often trade off for visibility of inner workings and configurability (though good arguments have been made for the former, even I have to admit). Unfortunately we can't have everything both ways, as much as we might tell ourselves that we can. So, let's consider a couple of real-life case studies of some platforms and use cases that seem inconveniently limited or inordinately difficult to use.

Richard M. Stallman, founder of the Free Software Foundation and the GNU Project is famous for his hard-line stance against closed and non-free software in all shapes and forms. Love him, hate him, or respect him, he's a man who can clearly elucidate his beliefs, how he's come to hold them, and what he does every day to personally uphold and demonstrate them. I mention RMS not to criticise or canonize him but to discuss how he goes about his every day work. He wrote an essay called How I Do My Computing (which he updates periodically, judging by the train of copyright dates at the bottom of the page) that describes in great detail the trade offs he's willing to make to ensure that he uses as much free and libre software as possible. He tried for nearly a decade to find a laptop which not only ran a free operating system but had a free BIOS on the motherboard. For his use cases he says that he prefers text mode applications rather than a desktop environment for getting work done; not everyone is in a position to do this but it works for him. He is best known for refusing to use any closed source, non-free software (there is a difference) on purely ethical grounds. Yet, RMS is able to do everything he needs to do, from browsing the web to writing to checking his e-mail without any of the bells, whistles, and flashy effects that seem to come with tech in the twenty-first century.

It is a common sentiment in the western world today that by admitting that you have made certain choices or taken certain trade-offs you are, in effect, trying to martyr yourself or trying to win people over by making needless sacrifices. This is not the case at all. If one were so inclined, one could make the case that it approaches the pinnacle of arrogance by stating in effect "I'm too lazy to even consider other possibilities, and I'm better than you because I can't be bothered to think." But that's a rant I'd rather not go on.

The RaspberryPi, the latest darling of hackers and makers the world over, was created in response to a specific need: Computers have become so expensive and are perceived as being so fragile that kids are being forbidden to play around with them lest they damage something accidentally. It was created with the intention of making basic computer science more accessible in schools and at home. The 8-bits may of us grew up hacking around with - the Commodores, the Ataris, and the BBC Micros - had their operating systems and programming languages built into chip-ROM, so if something went screwy you could just pull the power, count to five, plug the it back in and everything was fine again. Maybe you'd have to key your program in again if you didn't save it to tape or disk, or maybe you'd try something else that day. Today's computers rarely come with what we'd think of as a programming language installed; there are many out there but whether or not a youngster is allowed to install one on the family computer is a different matter entirely. Whether or not kids are more inclined to learn to program if they have a programming language available to them is something I can't speak to, but I'd be quite surprised if no one has studied this yet. The RasPi was designed to be inexpensive ($35us), easy to use (plug it into the TV, add a cheap keyboard and mouse), and powerful (it runs any number of free and open operating systems, with the thousands of packages available that we're accustomed to). The trade offs are that its clock speed is slower than we're used to thinking of as useful (700 MHz), it has less RAM (256MB for the model A, 512MB for the model B), and has practically no other peripherals on board, instead relying upon USB ports for expandability (though relatively inexpensive USB hubs help mitigate this).

The RaspberryPi also includes a respectable suite of software for kids and students to use right out of the box. Right on the desktop when it starts is Scratch, a visual programming environment which lets kids teach themselves how to write software that does interesting stuff almost immediately, like moving images around on the screen. It lets you create games, interactive stories, and animations by dragging and dropping components and customizing them by typing. If the user is interested in rolling up their sleeves and digging into a more complex programming language two versions of IDLE, a graphical environment for programing in Python are prominently displayed on the desktop. A full version of Mathematica from Wolfram Research, ordinarily a very expensive package has been included with the Pi for free since November of 2013. It boots into a simple desktop environment by default, with all of the important stuff available immediately (like configuring wireless). There is even an app store that makes it easy to install games, applications, and tutorials with a couple of mouse clicks. As for how children take to the RasPi, my only experience with that is how kids interacted with the ones HacDC made available at the Mini-Maker Faire last year.

As an example of what a sufficiently motivated person might do "just because," Dieter Mueller's work comes immediately to mind. Mueller designed and built something that he calls the MT15, which is a CPU that is almost entirely comprised of discrete transistors; a small number of relatively simple integrated circuits are used to assist in instruction decoding, implement the CPU clock, and act as buffers on the data and address buses. As CPUs go it's not terribly fast - 0.5MHz - and it can address up to 128Kb of RAM only. Is it practical for the sort of thing we had in mind for this series of articles? Probably not. I don't have a complete picture of everything it's capable of, so I can't speculate as to what one could actually with with an MT15 if you built one. I think it's safe to say that it's not complex enough to run BSD or Linux on. Maybe you could port FreeDOS to it if you built a suitable cross-compilation toolchain but I think that's about it. As a demonstration of what you can do if you put your mind to it I think it stands as a fine example. If a single person can build a CPU pretty much from the most basic components available and run arbitrary code on it it is certainly possible to build more complex systems.

As another example of the technical limitations people are willing to accept to accomplish their goals, I'd like to talk about the 8-bit demoscene briefly. As you may or may not be aware the 8-bit microcomputers were very limited in what they could do. They ran at processor speeds of just a few MHz (a small fraction of clock speeds today) and had very limited RAM (64KB or 128KB, and sometimes much less). The maximum screen resolutions and color palettes of those systems are less than those of some digital wrist watches today. Humble systems indeed. And yet, hackers do things with them that the machines' creators never conceived of. Sometimes bugs in the architectures themselves were used as features, such as the volume register bug in the SID chip being exploited as a playback mode. To see some of what the Commodore 64 (my beloved 8-bit platform, in point of full disclosure) is capable of you may wish to watch some of the following demos on Youtube:So... why should you care about a bunch of low res video hacks running on an obsolete machine? The answer is, many of the effects in those videos were never conceived of by the engineers who created the C-64, and if you asked them if their brainchild was capable of any of them they might have shaken their heads and said, "No, it can't and it won't." When you consider those demos in light of the fact that they're running on a machine with 64KB of RAM, a clock speed of 1MHz, and was designed to display only up to 16 colors at a maximum screen resolution of 320x200 pixels, they're pretty impressive. A lot of clever hacking went into writing those demos to surpass the limitations of the hardware. Many of them were written in 6510 machine language. Sometimes the opcodes used were selected because they had useful side effects elsewhere in the system or because they ran in one clock cycle apiece instead of four clock cycles. You can do a lot despite the limitations of your equipment if you're willing to try. Also, you can't always discount something based upon its specs if you're willing to be realistic about what you're trying to accomplish. You don't need a $2kus machine if all you do is mess around on Facebook all day, and you may not need a 3GHz machine with 16GB of RAM to edit documents and write code (though some document formats are incredibly memory inefficient... Powerpoint, I'm looking at you).

Last, and certainly not least, I present an example of a free and libre' computing platform called the Novena. The motherboard is sized so that it'll fit in an average laptop chassis and it packs a fair amount of horsepower on board. It is based around the 64-bit quad-core Cortex A9 CPU running at 1.2 GHz with a GC2000 3D accelerator. It tops out at 4GB of RAM but for the kind of use cases we've been talking about in this series of articles I think that's more than useful. It can boot from a microSD card but it also has a couple of SATA jacks on board so hard drives (or SD cards plugged into adapter sleds) can be used as mass storage. The Novena motherboard has a full complement of slots, ports, and peripheral interfaces that we've come to take for granted today. Most interestingly, the Novante is completely NDA-free. You won't have to sign away any of your freedoms or rights to hack on it; no restrictions on what you can do with or say about it, the development docs are anyone's for the downloading, and it's as hackable as such a thing can be made. All of the files necessary to start fabbing it are available for download.

Why did I mention the Novena? To show that it is, in fact, entirely possible to build exactly what we've been talking about in this series of articles: A full featured, fully operational, as close to open source as is possible general purpose laptop computer that we can use as an everyday workstation. It may not be as cheap as a Beaglebone or a RasPi, but it's something that you can throw into your backpack, use at work, use at home, have fun with, work on serious business with, and take with you on the road as your everyday machine. If Bunnie Huang and Sean Cross can do it, we can do it too.


This work by The Doctor [412/724/301/703][ZS] is published under a Creative Commons By Attribution / Noncommercial / Share Alike v3.0 License.