Jump to content

Linux on an 8-bit microcontroller


securitybreach

Recommended Posts

securitybreach

I just ran across this neat article on how to run Linux on an 8bit microcontroller:

 

 

Linux on an 8-bit micro?

 

Intro

 

It is common to see newbies asking in microcontroller forums if they can run Linux on their puny little 8-bit micro. The results are usually laughter. It is also common to see, in Linux forums, asked what the minimum specs for Linux are. The common answer is that it requires a 32-bit architecture and an MMU and at least a megabyte of ram to fit the kernel. This project aims to (and succeeds in) shatter(ing) these notions. The board you see on the right is based on an ATmega1284p. I've made one with an ATmega644a as well, with equal success. This board features no other processor and boots Linux 2.6.34. In fact, it can even bring up a full Ubuntu stack, including (if you have the time) X and gnome....

 

vOTpK.jpg

 

http://dmitry.co/index.php?p=./04.Thoughts...nux%20on%208bit

 

I may have to try this one day B)

Link to comment
Share on other sites

securitybreach
What is that actual processor that he's using. I don't see where he says anywhere. :(

CPU

 

All that's left is that pesky 32-bit CPU & MMU requirement. Well the AVR has no MMU and is 8-bit. To conquer this obstacle, I wrote an ARM emulator. ARM is the architecture I am most familiar with, and it's simple enough that I could comfortably write an emulator for it. Why write one instead of porting one? Well, porting someone else's code is no fun, plus none of the emulators I saw out there were written in a way that would make them easy to port to an 8-bit device. One of the factors: AVR compiler insists on making ints 16-bit so something as simple as "(1

Link to comment
Share on other sites

V.T. Eric Layton

Hmm... well, they're not giving a parts list anywhere in the documentation, which tells me that they want you to buy their kits. I was just wondering because I have some of these older CPUs, CMOS, and TTL type chips out in my shop. Once I inventory the carp out there, most of it will be going on eBay shortly. :yes:

Link to comment
Share on other sites

securitybreach
Hmm... well, they're not giving a parts list anywhere in the documentation, which tells me that they want you to buy their kits. I was just wondering because I have some of these older CPUs, CMOS, and TTL type chips out in my shop. Once I inventory the carp out there, most of it will be going on eBay shortly. :yes:

Well after skimming the article, these are the specs:

 

A 1GB SD card works fine, though 512Mb would be enough for this particular file system (Ubuntu Jaunty).

ATmega1284p board http://www.atmel.com/products/microcontrol...vr/megaAVR.aspx

serial port for mouse/keyboard

CPU is emulated

First let's address the RAM. As you can see, there is an antique 30-pin SIMM memory module on the board. These were in use for 80286-based PCs. It is interfaced to the ATmega, and I wrote the code to access it as well as refresh it within spec (SDRAM requires constant refreshing to avoid losing data).
Link to comment
Share on other sites

securitybreach

He also provides the source code for the project:

It is a bit of a mess, but it does work. Get it while it's hot: LINK. The license is simple: For non-commercial use, as long as you keep the licence file with the source and publish all your changes, we're cool. For commercial use, talk to me, and we'll agree on something. To build the emulator to try it on the PC type "make". To run use "./uARM DISK_IMAGE". To build optimized PC version use "make BUILD=opt". to build for AVR use "make BUILD=avr". It currently targets ATmega1284p. To target ATmega644, besides the makefile change, reduce the numbers in icache.h so that the icache is small enough to fit in the internal RAM in the 644. Included in the archive is the final hex file for the 1284p as well.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...