Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Build Hardware Linux

Linux On a Motorola 68000 Solder-less Breadboard 147

New submitter lars_stefan_axelsson writes: When I was an undergrad in the eighties, "building" a computer meant that you got a bunch of chips and a soldering iron and went to work. The art is still alive today, but instead of a running BASIC interpreter as the ultimate proof of success, today the crowning achievement is getting Linux to run: "What does it take to build a little 68000-based protoboard computer, and get it running Linux? In my case, about three weeks of spare time, plenty of coffee, and a strong dose of stubbornness. After banging my head against the wall with problems ranging from the inductance of pushbutton switches to memory leaks in the C standard library, it finally works! (video)"
This discussion has been archived. No new comments can be posted.

Linux On a Motorola 68000 Solder-less Breadboard

Comments Filter:
  • Pretty cool (Score:4, Funny)

    by Virtucon ( 127420 ) on Saturday November 22, 2014 @11:53AM (#48440101)

    Beats playing Assassins Creed all day.

  • Awesome (Score:5, Interesting)

    by Troed ( 102527 ) on Saturday November 22, 2014 @11:56AM (#48440111) Homepage Journal

    Hats off. The 68000 was the first CPU owned (Atari ST) and I had a good six years of assembly skills behind me when it was finally time to leave. Awesome CPU for the kind of magic demo tricks only hard core assembler coding could bring out.

    Relevant discussion: http://compgroups.net/comp.os.... [compgroups.net]

    • Hats off.

      Indeed. This is the kind of story I like to see here now and then, although I was surprised that the headline didn't start off with "10 year old genius builds super computer on a bread board..." as has been the trend here.

      • Hats off.

        Indeed. This is the kind of story I like to see here now and then, although I was surprised that the headline didn't start off with "10 year old genius builds super computer on a bread board..." as has been the trend here.

        I remember taking logic gate classes in University using Motorola 68000 chips and assembler. It gave me a decent understanding of how things work at the hardware level vs the abstracted software level.

    • Honestly I'd like to see something like this, replace the RPi as the cheap computer being offered as a learning platform. Let the kids play with the assembler.
    • Kudos.

      The first computer I built used a 6809 and ran either Flex or a homebrew monitor.

      I have PLENTY of experience with AMOS on 68k systems. As Caroll Oconnor and Jean Stapleton sang: "Those were the days!"

      • by vfr840 ( 3923683 )
        We ran our motorcycle store on AMOS for nearly 20 years starting in 1981. I have fond memories of 68k assembly language and AlphaBasic with external assembly language subroutines much like dlls today. AlphaBasic was compiled to byte-code similar to Java many years before Java.
    • by bhlowe ( 1803290 )
      Awesome indeed. Hacking 68000 machine code back in the day was good times. Anyone remember TMON? And before 68K, there was 6809s... I might be dating myself.
    • In fact this is not the 68000 but its crippled little brother the 68008, which uses an 8-bit external data bus (as the 8088 is to the 8086). That was also used in the Sinclair QL, which was Linus's first computer before he bought a 386 PC and got into Minix. Could Linux now be ported to run on the QL?
    • This is indeed awesome. The 68000 assembly language being relatively easier to learn than the 8086 family for instance, and the resources involved being relatively small (13 yo Linux and 512k!), it seems the whole project should be easier to comprehend than nowadays complex CPUs/OSes. That would be really great if you could build a detailed "How-to", explaining everything from scratch, with photos.
  • by account_deleted ( 4530225 ) on Saturday November 22, 2014 @12:01PM (#48440121)
    Comment removed based on user account deletion
  • Hi, Awesome and well done. You should think in create a tutorial for us that want to build something like that and have some fun in the weekend. I could learn a lot from this.
    • by amiga3D ( 567632 ) on Saturday November 22, 2014 @12:23PM (#48440211)

      I can't imagine the tutorial needed for something like this. To do something like this takes a lot of skill and knowledge. If you managed it you would have learned a lot and it'd take more than a weekend.

      • He could still release it as open source to allow for a "kit" which could be assembled over a weekend without properly understanding how it works internally.
      • Recently I was looking for some assembly language info for the original Altair (the first microcomputer), and I came across this [classiccmp.org]. It was a different kind of assembly than I was expecting, it looks like some kind of Ikea manual but much worse. Apparently it cost twice as much to get it assembled, instead of merely a box of parts.

        Then after you were done, you had 256 bytes of RAM, and no keyboard.

        In any case, if you look at that, it will give you the imagination needed for a tutorial for something like th
    • The whole point of this exercise is that there *isn't* a tutorial.

      Learn by doing!
  • by mrflash818 ( 226638 ) on Saturday November 22, 2014 @12:07PM (#48440143) Homepage Journal

    Kudos.

  • by Charliemopps ( 1157495 ) on Saturday November 22, 2014 @12:09PM (#48440157)

    You're just using the breadboard to connect a bunch of ICs.
    Bust out the designs for those IC's, wire the components up discretely, then I'll be impressed.
    Granted, you'll likely have no room left in your house for your bed or furniture... but that's not my problem :-p

    (I'm just being snarky, well done man)

    • There's a guy who took it a step further back and built a custom CPU out of TTL. He also made up his own architecture and instruction set and compiler and OS and application programs...

      http://www.homebrewcpu.com/
    • by quenda ( 644621 )

      You could kind-of build your own architecture on a breadboard using bit-slice chips.
      Each chip does 4 bits of ALU. Put your own microcode in EEPROM, some high speed registers, lots of glue, ...
      Not quite the same as discrete logic, but more achievable at home.

      http://en.wikipedia.org/wiki/A... [wikipedia.org]

  • by schamberlin ( 1354695 ) on Saturday November 22, 2014 @12:13PM (#48440171)

    Thanks for all the comments! This "68 Katy" is my project. The video is a good overview, and lots more tech details are at http://bigmessowires.com/2014/... [bigmessowires.com] and the rest of the site. I've built a couple of other home-made CPU / computer projects in the past, including "Big Mess o' Wires" a few years ago, but this was the first time I tried to add a real OS. Cramming Linux into 512K was a challenge!

    The CPU is a 68008, which is a low cost version of the familiar 68000 with an 8-bit bus and fewer external address pins. It has a max of 1 MB of total address space. It’s paired with a 512K 8-bit SRAM, and a 512K Flash ROM (of which 480K is addressable – the remaining 32K is memory-mapped I/O devices). My 68008 runs at 2 MHz (it was unstable when tested at 4 MHz), providing similar performance to a 1 MHz 68000. That’s pretty slow, even in comparison to 68000 systems from the early 1980s, which were typically 8 MHz or faster. So frame rates in the latest games aren't great...

    • by Technician ( 215283 ) on Saturday November 22, 2014 @12:50PM (#48440275)

      I'm surprised he got it to run that fast. AM radio in the US broadcasts from about .5 to 1.5 Mhz. Without a ground plane and shielding, there is a lot of coupling between wires. I bet he can't listen to any distant AM radio stations in the same room with that running.

      Good job getting a breadboard computer to clock over 1MHZ.

    • by nsaspook ( 20301 ) on Saturday November 22, 2014 @12:58PM (#48440293) Homepage

      +1
      but I hate to tell you that it won't help with getting dates.

    • It seems like the hard part would be getting Linux to run on such a small machine. That's what impresses me the most, that you managed to do it.
    • by aliquis ( 678370 )

      I think when I watched the video it seemed like you could get another four times the processor power just by stopping the blinking LEDs though? ;)

    • This is a very impressive feat. I am old enough to have done stuff like this regularly in my early career, as PCs didn't exist at the time. I figured that no one bothered to build systems themselves and port OSes to them these days.
    • by hax4bux ( 209237 )

      +1 Inspiring

    • Thanks for crashing my web server! (Score:5, Informative)

      - you are welcome, but you may want to reconsider running your web server on your vanilla 68 Katy, I suggest adding a turbo mode for that :)

    • First off, wow. Linux from base chips on a solderless breadboard is incredibly impressive!

      For some reason I also love the 555 timer interrupt :)

      My 68008 runs at 2 MHz (it was unstable when tested at 4 MHz), providing similar performance to a 1 MHz 68000.

      Any ideas why? Is it the 68008, the PAL chips or some other things?

  • I built a 68000 based single board computer using parts from Motorola's M68000 development kit (or whatever that was called - it included a M68000, M68010, M68008, a couple of other 68k family peripherals, and a ream of documentation) as part of my master's thesis. Did a two-sided PCB with photoresist boards and hand-drilled and wired vias. The big difference then and now is the size of memory you can get in a single device - I was using 16K or 32K EPROMs and static RAM devices because that was pretty much
  • I too am glad to see more of the nerd and less of the news. I've been encouraging my boys using the book, 'From Transitors to Tetris' (don't have the exact title as the book isn't handy).

    This is an important, fundamental skill - knowing how the technology works and not just picking up a game boy and playing for hours (back in my day that was the reward for building a system).

    xyzzy

  • by Billly Gates ( 198444 ) on Saturday November 22, 2014 @12:34PM (#48440241) Journal

    I am sure it will fly through through an emulator

  • The 68008 was discontinued 20 years ago, so this isn't really all that useful even as an educational exercise. Why not pick a current breadboardable, cheap microprocessor and get Linux to run on that? That way, other people can benefit.

    • by itzly ( 3699663 )
      Like what ? Typical modern microprocessors capable of running Linux aren't very breadboard friendly.
      • Like what ? Typical modern microprocessors capable of running Linux aren't very breadboard friendly.

        Really? [dmitry.gr]

        Well 8bit micros are easy to find in a DIP package. For everything else there's adapter boards which are dime a dozen on ebay.

        Or if you shop around I'm sure you can find a 32bit Arm Cortex M0 in a DIP package. [seeedstudio.com]

    • Hardware from the 80s is a different kind of hardware. The designers had little to work with, and as a result came up with exciting and interesting designs. Working with their hardware is, in a way, working with them, understanding the puzzles they had and how they solved them.

      Plus the smell is something you don't forget. Mmmmmmm.
    • Re:next... (Score:5, Insightful)

      by OzPeter ( 195038 ) on Saturday November 22, 2014 @02:00PM (#48440487)

      The 68008 was discontinued 20 years ago, so this isn't really all that useful even as an educational exercise. Why not pick a current breadboardable, cheap microprocessor and get Linux to run on that? That way, other people can benefit.

      Why even bother with hardware. Why not just emulate it?

      But then again .. why emulate it when you can buy time on a virtual system?

      Then again why do all that when you could just be watching TV?

      • by hodet ( 620484 )

        Came here to say something like this, but you hammered the point home much more eloquently.

      • Why even bother with hardware. Why not just emulate it?

        Because you won't develop hardware skills? You won't have the satisfaction of building your own?

    • The 68008 was discontinued 20 years ago, so this isn't really all that useful even as an educational exercise. Why not pick a current breadboardable, cheap microprocessor and get Linux to run on that? That way, other people can benefit.

      Couldn't agree more w/ this one. We all know that Linux can run everywhere, from a calculator to a supercomputer, but there's really nothing impressive about this. When the original 68k was what the first Sun workstations were made of, and therefore ran SunOS. Granted, it was not Linux, but close enough (since things like X11, GNOME, et al do not apply).

      In fact, why not pick a BeagleBone, or Raspberry Pi or Arduino - depending on one's attitude about Broadcom vs Atheros vs whoever else is putting a con

  • by PPH ( 736903 ) on Saturday November 22, 2014 @01:35PM (#48440403)

    Why not try emacs instead?

    --
    Disclaimer - These opiini^H^H damn! ^H^H ^Q ^[ .... :w :q :wq :wq! ^d
    exit X Q ^C ^? :quitbye CtrlAltDel ~~q :~q logout save/quit :!QUIT
    man quit ^C ^c ?Quit ?q CtrlShftDel "Hey, what does this button d..."

  • by jasno ( 124830 ) on Saturday November 22, 2014 @01:44PM (#48440421) Journal

    Getting it working on a breadboard is no small feat. Kudos. I'm sure it helps to only run at 2MHz.

    Rather than, as has been suggested, spin a PCB for it, why not try wire-wrapping next time? Less capacitance than a breadboard and a bit more permanent.

    Back at DeVry(haha) we built 7MHz 68k systems using wirewrap. Great times. I freaking love 68k assembly. We(well, the smart ones) also used 22V10 PALs for address decoding to save on 74 series logic chips.

    Another next step - find a chip with an MMU so you can run real linux. I think a 68020 or '030 has one. Much higher clock speed too. The pin density is still low enough(I think it's 0.1 but in a grid) that you can work with it. Check old electronic stores' back shelves for sockets.

    • by Bert64 ( 520050 )

      The 68030 has an MMU providing you don't have the cut down 68EC030 model...
      Motorola made an external MMU for the 68020, known as the 68851 i believe.
      Some 68000 based machines also used an external MMU, but typically not a Motorola design, eg the early sun workstations.

    • I freaking love 68k assembly.

      Agreed. It's the friendliest assembly language I've ever run across.

      --
      .nosig

  • nevermind. Very cool.

  • I cut my teeth programming the 68k on the original Mac - well, did 8086/8008/4004/z80 and 6502 long before. Loved programming the 68K.

    No easy task getting the home brew hardware to work. The capacitance and inductance of the breadboard and wires is limiting performance. Always fun to write the loader and make it come to life.

    its nice reading real 'nerd' stories. Anyone here belittling your work likely has no understanding of the effort and skill required to build an operational computer from scratch. Gre

  • The original 68000 was almost there for running a real multi-tasking OS. But, it didn't save enough state on the stack during an interrupt. You couldn't guarantee restoring a process's exact state when returning from an interrupt. I heard stories of designs that used two 68000s where one was running one step behind the other. I don't know how true they were. I see on the wikipedia that Motorola fixed that with the 68010 in 1982 and that's when the 68008 came out. So maybe the 68008 doesn't have that p

    • Interrupts worked fine. It was bus errors (i.e. for off-chip memory protection and/or mapping units) that were a problem. The 68010 fixed that particular issue if I recall. I'm guessing later 68008's also did but I dunno. Doesn't matter since he isn't running with any memory protection.

      You could in fact run a real multi-tasking OS on the 68000. I was running one of my own design for my telemetry projects. It didn't have memory mapping but it did have memory protection via an external static ram, 8:1 s

      • by Dadoo ( 899435 )

        Interrupts worked fine. It was bus errors (i.e. for off-chip memory protection and/or mapping units) that were a problem. The 68010 fixed that particular issue if I recall.

        You're correct, except for the fact that it wasn't a bug. The original 68000 simply wasn't designed for use with demand-paged virtual memory. To make that happen, you need to either save the processor state somewhere (which the 68010, 68020, etc. did) or have restartable instructions (the approach used by National Semiconductor, for their

  • I love to see someone doing this stuff, Gratz!

  • by m.dillon ( 147925 ) on Saturday November 22, 2014 @07:56PM (#48441743) Homepage

    Congratulations, you are now in a rare group indeed. But I gotta say, you haven't lived until you've programmed a 6502 directly in machine code. No assembler :-)

    One of my telemetry systems which I built and designed 25+ years ago used the 68000 running at around 10 MHz (with a jumper for 20 MHz, which it could actually do though I didn't deploy it at those speeds). The coolest thing about it was that I had built a rudimentary memory protection unit using a static ram and an 8:2 selector. Any user mode accesses pumped the high address bits into the ram with 2 address bits going to the selector along with the R/~W bit. The result was gated into the bus error logic. The top three bits of the static ram were directly controlled by the kernel which allowed the kernel to 'cache' up to 8 process's worth of protection data in the ram at any given moment, so context switches were still very fast.

    Before the 68030 and 68040 came out, Sun (I think) was running two 68000's in lockstep, one one cycle behind the other, in order to implement their own MMU. When a fault would occur, they bus-errored the lead chip and paused the second 'behind' chip so they could take the bus fault, resolve the mapping issue, and then resume the behind chip. Then the 68010 came along and fixed the bus error interrupt stacking bugs in the 68000, and the 68020 came along after that.

    The 68030 could hold short loops in its chip logic with some tricks, despite not really having a cache. Unfortunately, the 68040's on-chip cache implementation was horrible and created all sorts of problems for implementers, and by then Intel chips were running much much faster.

    When Motorola retired the 68K series some of their larger embedded users asked motorola to re-test the 68000 chip specs at a higher clock, since by then the HCMOS process could obviously run the chip much faster than the ~10-12 MHz that was speced. Motorola tested the HCMOS version of the chip to around 50-70 MHz or so. Such a nice 32-bit chip, I was really sorry to see Moto lose to Intel (mostly because Moto gave up).

    -Matt

    • Er, I meant 8:1 selector (the R/~W bit was fed into one of the select inputs). The function code logic was used to selectively enable/disable the memory protection unit, so supervisor accesses bypassed it while user accesses did not. Which is good because it wouldn't have been able to boot otherwise.

      Another use for the FC logic is to speed up the auto-vector code. The 68K had wonderful asynchronous interrupt logic. You basically had 8 priority levels and you could feed your I/O chips into a simple 8:3 p

    • by Dadoo ( 899435 )

      The 68030 could hold short loops in its chip logic with some tricks, despite not really having a cache. Unfortunately, the 68040's on-chip cache implementation was horrible and created all sorts of problems for implementers, and by then Intel chips were running much much faster

      No, you're thinking of the 68010's "loop mode", where tight loops didn't require memory accesses for instruction fetches (after the initial instruction fetch). Both the 68020 and 68030 had caches.

      http://en.wikipedia.org/wiki/M... [wikipedia.org]

      http: [wikipedia.org]

  • Not an interesting project.
    the MC68000 has no way to restart an instruction and no MMU.
    Both of these are critical to running a Linux kernel today!
    You could emulate a 68000 on a Beaglebone Black and have
    it run faster.

    *nix like OS have been built and run on a 68000 Idris is one
    historic port of Unix. Little or no protection to keep processes
    from running over memory and I/O and doing bad things but a
    worthy *nix all in all for its day.

    Step up a little to the MC68010 add an external TLB/MMU built
    from modest si

  • You could at least give some credits to the original one... (done back in 2012) Anyway, its much more impressive what I've done... (also because I did most of the work for the linux kernel) https://www.youtube.com/watch?... [youtube.com]

Math is like love -- a simple idea but it can get complicated. -- R. Drabek

Working...