Raspberry Pi 2


#1

Could anyone look into compiling Atom for a Raspberry Pi 2?
I got lots of npm ERR!s and don’t know how to solve them. :smile:

It would be awesome if Atom also were available on a Raspberry Pi 2. I know Atom isn’t really a lightweight text editor but I could imagine that it would work quite well nevertheless.


#2

I’ll try to compile everything tonight and if I succeed I will post instructions.


#3

I think I have the Raspberry Pi 2 as well, and I might try to compile as well…but not tonight. Whether I have the time to do this is a little iffy. I think the first order of business is to install node.js so it is running natively on the Pi. To do that will require compiling Node from source, and to do that (in turn) will probably need a cross-compiler that is set up on a fast machine. Getting a cross-compiler set up is a job all by itself. So I think this will take me a few days to do, if I attempt it.

@horace3d you too can try doing this – there are instructions available on the web for building a cross-compiler. You need a separate Linux-based box that runs faster than the Pi.

Bob


#4

One would need to also cross-compile Git, unless it comes with one of the available distributions for the Raspberry.


#5

All the normal tools are available on the Raspberry Pi 2. You can compile on the Pi just fine. When running make, supply the -j 4 parameter so that you utilize all 4 cores in compilation.

The problem appears to be the build script. The tools to do the building are all present and working just fine.


#6

Oh, that is cool. I have both the original Pi (the Model B, I think it is) and the Pi 2, and way way back it was difficult to compile on the older Pi, so I used Crosstool-NG to cross-compile. I shall have to play with this over the next few days and see if I too can help.

Bob


#7

I don’t think there is a need for a cross compiler. It took a while but node.js compiled fine on the Raspberry Pi 2.

It has been a month now since I tried it but if I remember correctly the problem was later with the Atom build script. The ARM processor made the script think that it has to compile for Android or something like that. :smile:


#8

It turns out that I really have a Raspberry Pi B+, not the more advanced Raspberry Pi 2. I was a bit confused. The B+ is an ARMv6 architecture. The Pi 2 is an ARMv7.

What I will do is try to cross-compile node.js (v0.12.4, I believe), git, and the latest Atom for the B+ and see if I can get Atom running. I’ve installed a virtual machine of Ubuntu Server 14.02 LTS. I need to get this fully up-to-date, then I’ll download crosstool-ng and set up a proper toolchain.

Thanks

Bob


#9

Update: I’m still working to build a Rasberry Pi-focused toolchain using crosstool-ng 1.21.0. I’m doing this on Ubuntu 14.04 LTS installed as a virtual machine. It looks like there are some toolchain dependency issues to figure out.


#10

Hi! Atom is now using a newer version of Electron that has ARM support. You can build Atom on ARM now quite easily with a couple of changes (until APM is on a newer Node.js)

I’ve just been testing on a Chromebook, but on a Pi these steps should also work:

You’ll need to first get git, node and then the toolchain bits:

  • sudo apt-get install git
  • sudo apt-get install curl
  • curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
  • sudo apt-get install -y nodejs
  • sudo apt-get install build-essential libgnome-keyring-dev fakeroot

Then get the Atom and apm bits:

  • Use the jl-new-node branch of apm which updates apm to use the latest node, which has an arm build, and recognizes arm as a platform
  • Follow build instructions for apm
  • Use the jl-local-apm branch of atom which just has Atom use a local version of apm.
  • Rename the apm you built atom-package-manager
  • Move atom-package-manager to this location /path/to/atom/apm/node_modules/

Would definitely be interested in how this goes if you’re able to try it out!


#11

I gave your instructions a quick try.

Missing npm installation from your steps:
+ sudo apt-get install npm
Once resolved, when attempting to npm install on your branch of apm
npm install fails to fetch from registry: colors

I’m parking this for now, but someone else may want to try.


#12

Hi,

Are there any news with Atom’s ARM support? I’ve got an Asus Flip that I love and I’d really like to be able to use Atom on it instead of vim.


#13

This is the Issue you can subscribe to for updates on Atom for ARM:


#14

Hi Im new to Rasberry/Linux. Please can someone advise whether they have managed to get Atom installed on a Rasberry Pi3.

Jlord I tried your steps, but dont know what to do from this onwards. (Sorry Im a newbie).
Then get the Atom and apm bits:

  • Use the jl-new-node branch of apm239 which updates apm to use the latest node, which has an arm build, and recognizes arm as a platform
  • Follow build instructions for apm
  • Use the jl-local-apm branch of atom89 which just has Atom use a local version of apm.
  • Rename the apm you built atom-package-manager
  • Move atom-package-manager to this location /path/to/atom/apm/node_modules/

#15

I started an install on mine. First it complained about node being newer then 7.0 - so I installed a v6 node. It failed twice in trying to install, first looking for libsecret-1*, second looking for libxkbfile

It seems to be working now.


#16

I spoke too soon. It’s dying trying to run the electron-packager saying it doesn’t support armv7l architecture.