GNU/Linux Running On An 8-Bit Processor 361
dartttt writes, quoting Ubuntu Vibe: "Dmitry Grinberg has successfully booted Ubuntu 9.04 on an 8 bit micro machine with 6.5 KHz CPU and 16 MB RAM. Grinberg did this experiment on a ATmega1284p, 8-bit RISC microcontroller clocked at 24MHz and equipped with 16KB of SRAM and 128KB of flash storage. Since the RAM was too low, he added 30-pin 16MB SIMM to the machine and a 1 GB SD card to host Ubuntu image. ... To get the world's slowest Linux Computer running, he had to write an ARMv5 emulator which supports a 32bit processor and MMU. A similar machine can be made very easily and everything should come in about $20."
There is source code available, but it's under a non-commercial use only license. Just how slow is it? "It takes about 2 hours to boot to bash prompt ('init=/bin/bash' kernel command line). Then 4 more hours to boot up the entire Ubuntu ('exec init' and then login). Starting X takes a lot longer. The effective emulated CPU speed is about 6.5KHz, which is on par with what you'd expect emulating a 32-bit CPU & MMU on a measly 8-bit micro. Curiously enough, once booted, the system is somewhat usable. You can type a command and get a reply within a minute." If you like watching a whole lot of nothing, there's a video of the boot process below the fold.
Why? (Score:3, Insightful)
Why?
My 0.02 (Score:4, Insightful)
Re:Why? (Score:5, Insightful)
Why not?
Seriously... the skills and knowledge can come in handy someday.
Maybe someone desperately needs to retrofit modern code to crappy old equipment? Maybe the ultra low power requirements of an extreme low-end machine makes this a fit somewhere?
Most importantly though, he did it because he could. Doing it puts his skill set far above that of most people, and having that on the resume would get him in good with nearly any semiconductor corp on the planet that needs a software or firmware developer.
Re:Geoworks (Score:4, Insightful)
You will not believe how much Computing power goes to making sure your computer doesn't crash every day.
Back in the old days computers crashed much more then it does now. And it isn't that they are better programmers but more to the fact that there was a trade off on how much code in the back end needed to be done to protect the system.
Re:Ultimate tech hipsters (Score:5, Insightful)
GNU/Linux on a homebrew microcoded ARM processor (Score:4, Insightful)
That's how this is best thought of. In effect, he used an AVR chip as the microengine for a vertically-microcoded implementation of ARMv5, with some extensions. It's not as if Linux is running natively on an 8-bit architecture; that's be like saying, for example, that when OS/360 was running on a 90-bit-instruction/32-bit data VLIWish Harvard architecture machine when it's running on a System/360 Model 50.
Re:Why? (Score:5, Insightful)
Alternatively, someone might want to design a new 8-bit CPU for certain embedded tasks where it's essential for there to be low power consumption and a high-end sophisticated OS. There are plenty of extremely slow mechanical operations (combine harvesting, for example) where millisecond responses are not going to be useful but where the complexity of the problem (varying evenness of the ground, varying field shapes, etc) mean you do want to be able to handle many different types of sensor, sophisticated algorithms, etc, within something that needs to be extremely cheap to build/replace and extremely low power to run to be more cost-efficient than having a farmhand (who is likely to be earning minimum wage or below).
Another option is a System-on-a-Chip. At present, SoC runs into all kinds of problems because of the compromises you have to make to fit everything into one die. If you can reduce the transistors of the CPU component, you can increase the transistors somewhere else, which means this knowledge increases your flexibility in such systems. That's extremely valuable to know, even if you never go to this extreme.
For deep space probes, radiation is a major concern. Well, for anything in space it's a major concern, but the deeper you go into space the nastier the radiation. It's why the highest-end space-rated CPUs are so primitive compared to commercial CPUs. Being able to reduce the complexity of the CPU and utilize the extra space for redundancy, without reducing the sort of complexity of software the CPU will run, is great news for anyone wanting to rival the Pioneer 10 & 11/Voyager 1 & 2 missions in terms of longevity whilst equally wanting to match Deep Space 1 or the Mars Rovers in terms of flexibility. Knowing that you don't strictly need a 32-bit architecture to run Linux and that you can slice out huge chunks of the architecture gives you tremendous power.
Re:Why? (Score:5, Insightful)
There's an objective valuation of time that I'm not aware of? Or are you just saying that because you don't find it a valuable use of time?
Re:Ultimate tech hipsters (Score:4, Insightful)
You mean we're supposed to use a fork??
Re:Ultimate tech hipsters (Score:4, Insightful)
An awful lot of stuff doesn't need that kind of compute power.
And AVR chips actually pack a massive amount of power. 24mhz is faster than a 486 and when you are reading sensors and similar things thats tons.
Its only 6.5khz if you try emulating a ARM chip on it.
Re:Why? (Score:5, Insightful)
The question is not "why make an 8-bit cpu and run stuff on it". The question is "why load linux on an 8-bit cpu where it's unusable?".
There are tons of embedded 8 bit processors, and all can run very complex software written in c/c++/etc.
I think this is cool, but the answer is simply "as a challenge." The microcontroller problem, and making it either powerful or easy to use, has been solved for years and is evolving. Running linux on them was never what was holding them back.
Re:Why? (Score:4, Insightful)
I think your project is really great.
You will have learnt so much about the ARM architecture, and have a really good view of how things really work. I'm pretty sure that if you got your hands on an FPGA board you now have the skills to make your own ARM processor.
This puts you head and shoulder above lot of the 'ubergeeks' that lurk on Slashdot discussing how they can get another 1% from their shiny purple Corsair RAM - they just don't get it!
Re:Why? (Score:4, Insightful)
It's a societal thing. We're essentially indoctrinated to believe that anything which doesn't make someone money is a waste of time.