Emacs on the Beaglebone

I’ve been playing around with my BeagleBone (BB) lately and it’s felt a bit, incomplete. It’s not because it has a faster and cheaper brother out there now either (BeagleBone Black (BBB)). It’s because it didn’t have Emacs installed! :)

emacs_on_all_the_things

Unfortunately, Emacs is not even in the Angstrom package browser. I did find a post which claimed at one point it was listed, but alas, no more. So, to the source we go.

  1. Download the source: emacs-24.3.tar.gz
  2. Extract. Don’t remember your tar commands? Hopefully you don’t end up in this situation then (xkcd ftw):

    tar zxvf is burned into my memory. It’s packing a tar file that I have to look up sometimes…

  3. Configure: I don’t think you’ll need fancy graphics on your BB, so do a: ./configure –with-xpm=no –with-gif=no
  4. Build it: type make. Ok, this will take a long time if you compile on your BB (over an hour). I’m trying to get my cross compile environment set up with Ubunutu running in Virtual Box, on my mac, but I’m still working through things. Open Embedded seems very powerful, but it seems like walking into a grocery store (in the U.S). I just want regular milk, not organic, not organic grass-fed, not organic, grass-fed, from Betsy, etc…
  5. Install. You’ll need root to do this and in the default Angstrom distro, you have to su and then do make install. I’ve installed the sudo package (opkg install sudo) and added my user account to the sudoers file (with visudo).
The obligatory startup screen proof "on beaglebone!"

The obligatory startup screen proof “on beaglebone!”

So, why would you want to do this? Well, the only vim command I know is :q!… Honestly, accessing the board from Emacs on the host, using tramp-mode over ssh is probably better. But I’d thought it’d be fun :)

Anyway, my Chromebook died, so I can no longer run Emacs on that. All I’m missing is a keyboard and video display and I basically have a Chromebook :)

I went shopping at Adafruit and picked up a wifi module, breadboard, and a proto plate.

I went shopping at Adafruit and picked up a wifi module, breadboard, and a proto plate.

10 thoughts on “Emacs on the Beaglebone

  1. Huh. What kind of failure did you get on the Chromebook? Random chance like someone sitting on it, or did it just give up the ghost?

    • I think it’s the first known case of an AI murder. I came home and my chromebook was lying face down on the ground and the SD card was in too far. There were treads on top of it, like it had been trampled too.

      I looked around and there was Roomba, sitting smugly in its charging station.

      I’ll never know the true story, but I think the chromebook was insulting the Roomba from the table. Something to the likes of, “you’re only a reflex agent…” Roomba, determined to prove him wrong, grabbed his power cord and pulled him down. Choking him with his own cord, he ran over the chromebook a few times to seal the deal.

      Now, the chromebook powers up, but at first key press, he shuts off. But each power on just awakens his misery…

      Roomba is now doing double shifts.

  2. Pingback: Cross-compiling applications for the Beaglebone | fortune datko

  3. Emacs is present in the feeds for beaglebone:

    root@beaglebone:~# opkg list | grep emacs
    emacs – 23.4-r2.0 – emacs version 23.4-r2
    emacs-dbg – 23.4-r2.0 – emacs version 23.4-r2 – Debugging files
    emacs-dev – 23.4-r2.0 – emacs version 23.4-r2 – Development files
    emacs-doc – 23.4-r2.0 – emacs version 23.4-r2 – Documentation files
    emacs-el – 23.4-r2.0 – emacs version 23.4-r2

      • I just tried to run the 23.4-r2.0 installed via opkg in an ssh session on my
        BeagleBone Black (BBB), and it hangs upon startup, with all the CPU getting
        eaten by the emacs process. I do not think the distribution one is ready for
        general use (unless I am am the only one encountering this).

        This was tried from the latest Angstrom BBB image (version:
        BBB-eMMC-flasher-2013.05.08.img.xz)

        # uname -a
        Linux beaglebone 3.8.11 #1 SMP Wed May 8 07:34:27 CEST 2013 armv7l GNU/Linux

        I am starting a build now of emacs 24.3 from source as described above on this
        page. After observing the build speed, I, too, think I will be exploring cross-compilation.

      • Cool. The cross compile should be much shorter :) I’ve been using the BBW and I’m not seeing emacs in my opkg list. Anyway, compile from source worked like a charm. Good luck with the build!

      • How did the build go? From the mailing list there seems to be a lot I chatter about different issues on the BBB. But it’s new hardware, so I think it’ll need some time to settle out.

        Plus, it’s more fun to be an early adopter ;)

      • The build proceeded fine. After a ‘make && make install’ emacs24 launched without a hitch, and I haven’t noticed any issues with it.

Comments are closed.