Under the (Linux) Hood

We’ve often heard that you don’t need to know how an engine works to drive a car, but you can bet that professional race car drivers know. By analogy, you can build lots of systems with off-the-shelf boards like Raspberry Pis and program that using Python or some other high-level abstraction. The most competent hackers, though, know what’s going on inside that Pi and what Python is doing under the hood down to some low level.

If you’ve been using Linux “under the hood” often means understanding what happens inside the kernel–the heart of the Linux OS that manages and controls everything. It can be a bit daunting; the kernel is simple in concept, but has grown over the years and is now a big chunk of software to approach.

Your first embedded system project probably shouldn’t be a real time 3D gamma ray scanner. A blinking LED is a better start. If you are approaching the kernel, you need a similar entry level project. [Stephen Brennan] has just the project for you: add your own system call to a custom Linux kernel.

Continue reading “Under the (Linux) Hood”

VGA Output On A Freescale

Even though VGA is an outdated and becoming somewhat deprecated, getting this video output running on non-standard hardware is a rite of passage for some hackers. [Andrew] is the latest to take up the challenge. He got VGA output on a Freescale i.MX233 and also got some experience diving into the Linux kernel while he was at it.

The Freescale i.MX233 is a single-board computer that is well-documented and easy to wire up to other things without specialized hardware. It has video output in the form of PAL/NTSC but this wasn’t quite enough for [Andrew]. After obtaining the kernel sources, all that’s needed is to patch the kernel, build the kernel, and build a custom DAC to interface the GPIO pins to the VGA connector.

The first thing that [Andrew] did was load up the Hackaday home page, which he notes took quite a while since the i.MX233 only runs at 454 MHz with just 64 MB of RAM. While our retro page may have loaded a little faster, this is still an impressive build and a great first step to exploring more of the Linux kernel. The Freescale i.MX233 is a popular chip for diving into Linux on single-board computers, and there’s a lot going on in that community. There are some extreme VGA hacks out there as well if that’s more your style.

What is this thing called Linux?

It should come as no surprise that we at Hackaday love Linux above all others (that should start a nice little flamewar on the internal email list). If you still haven’t given it a whirl yet, don’t fear. Everyone starts from scratch at some point. With each passing year it becomes more and more likely that knowing something about Linux will eventually benefit every hardware hacker. Take part of your time off in the coming weeks to give it a whirl. First thing’s first, check out this quick guide on what Linux actually is.

Adafruit’s offering is pretty low level, so if you’re the kind that likes to argue “kernel” versus “OS” please keep it to yourself. For us the important distinction pointed out here is microcontroller (Arduino) versus Raspberry Pi. The Pi generally runs one flavor or another of Linux for good reasons, while microcontroller-driven systems tend to run use-specific code (with the exception of projects that leverage Real Time Operating Systems). Of course it extends past pre-fab options, Linux is a popular choice on bare-bones roll-your-own machines.

This is the year of Linux! Ha, we’ve heard that one every year for at least a decade. To us it makes no difference, you should know a bit about each OS out there. What are you waiting for? Read the guide then download (for free!) a CD image of our current favorite Linux flavor.

Dumping a C64 kernel

[Blark] picked up a couple of Commodore 64 machines on Craig’s List so that he could play around with the SID chips inside. But there’s some other fun stuff in there and his attention was drawn to the PROM which stores the kernel. He thought it would be a fun adventure to build a ROM dumper capable of storing binary images.

In the video after the break you can see that when powered up the dumper immediately starts streaming hex values to the terminal. The system is set up to feed a Python script which packs the data stream into an image file. The reading is done by a PIC 18F4520, streaming the data in at 9600 baud with a generous delay between each address read to get the cleanest read possible. He had a bit of help from the AVR Freaks to get to this point.

We’d guess he’s going to pull the image off the chip several times and compare results to filter out any possible data corruption. From there we’re not sure what he’ll do with the files but there’s always the possibility of making is own emulator using this kernel image.

Continue reading “Dumping a C64 kernel”

Cheap ARM netbooks have Linux forced upon them

[Doragasu] got his hands on one of these WM8650 Netbooks for around 50 euros (~$63.50) delivered. They come with a version of Android preinstalled, but he wanted to use them more like a computer and less like an Android device. So he set out to load Arch Linux on the ARM-based Netbook.

This is possible because the hardware inside is actually pretty good. The 800 MHz SoC is accompanied by 256 megs of RAM. There’s 2 gigs of internal storage, a 7″ display, USB, Ethernet, WiFi, and an audio system. This is comparable to what you’d get with a Raspberry Pi (without video acceleration) but also includes all of those peripherals, a case, a touchpad and keyboard… you get the point. There are several patches that need to be applied to the kernel to get it working with the hardware. [Doragasu] covers each of them in the post linked above. You can also hear his presentation in the video after the break.

Continue reading “Cheap ARM netbooks have Linux forced upon them”

Android rolled into Linux kernel 3.3

The latest version of the Linux kernel was just released on Sunday, and there’s a little bonus which we think is worth considering. It seems that many changes from Android made their way into version 3.3 of the Linux kernel.

This may not sound like much, but it’s a great example of the power of open source. Since device specific changes based on the Linux kernel must be released under the same license, hardware manufactures are compelled to release their sources. But normally this would only help you if you have the expertise to slog through their code and find the parts that you need for whatever purpose you have in mind. But with these changes being rolled into the main kernel you should be able to run your own distributions on Android devices relatively easy; hardware support is already in there. Of course there’s still a lot of expertise that goes into cross-compiling an OS.

This may have the potential to open up old Android hardware as a development platform. Think of how Chumby hardware has been used in robotics projects. Now what if your old Bluetooth and WiFi enable cellphone had a stock kernel that was as easy and open to use in your own projects?

[Thanks Adam]

Using the parallel port as a logic sniffer

[Fernando] wrote in to share his take on building a logic analyzer. He’s using the parallel port to capture data and feed it to the display software of your choice.

The method depends on a custom kernel which alters the way the parallel port works. The kernel he compiled includes a method of intercepting the signals coming in from the hardware, passing that data to the /dev/parport* as it should, but also sending a copy to /dev/parportsnif*. It also creates a log file which is in the OpenBench Logic Sniffer format for easy use with various display software.

Of course this is easiest to use with a Linux system, but can also be run as a virtual machine under Windows. We’d plan on using a virtual machine within Linux as well since this is a custom kernel and will probably only see occasional use.