Rob
Rob

Reputation: 11798

How to make newer node.js version run on Beaglebone Black ARMv7 board?

I'm writing an application that needs to run on a Beaglebone Black running Angstrom Linux. The shipped linux on this board already comes with node, but it is a very early version (0.12.7). So I tried to use a newer version. I went to the node.js website and downloaded this archive (node version 4.6.1 Linux binaries for ARMv7). When I extract the package on the Beaglebone and try to run node, I get a strange error:

root@ivt:/sdcard/node-v4.6.1-linux-armv7l/bin# ./node -v
-sh: ./node: No such file or directory

sdcard is an ext4 partition on the SD card that I use (the card is ok, I can also run another node project from the same partition with the old node version).

Why does this error occur and what does it mean? The node executable in the directory mentioned above seems to be ok:

root@ivt:/sdcard/node-v4.6.1-linux-armv7l/bin# file node
node: ELF 32-bit LSB executable, ARM, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x2b816f446e6e77cabfa4c3303376c05a5f90ff2a, not stripped

This should be ok for this board, I think:

root@ivt:/sdcard/node-v4.6.1-linux-armv7l/bin# cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 990.68
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc08
CPU revision    : 2

Hardware        : Generic AM33XX (Flattened Device Tree)
Revision        : 0000
Serial          : 0000000000000000

What am I doing wrong || what am I missing?

Upvotes: 1

Views: 2160

Answers (1)

Benny Code
Benny Code

Reputation: 54890

You can upgrade the Node.js version of a BeagleBone by installing Debian 8.7.

All BeagleBone Debian images (after 2016-11-06) have Node.js v4.x as default. I upgraded from Debian 8.6 (Node.js v0.12.17) to Debian 8.7 (Node.js v4.7.2).

Here is how you can do it:

  1. Download a 4GB SD LXQT image from the weekly snapshots. Note: The image names contain BBB for BeagleBone Black or BBBW for BeagleBone Black Wireless (example BBBW-blank-debian-8.7-lxqt-4gb-armhf-2017-01-15-4gb.img.xz)
  2. Decompress the image (from .img.xz to .img). If on Windows you can use 7-Zip to do it.
  3. Turn the image into an eMMC flasher image. In order to do this you need to check the contents of /boot/uEnv.txt in the .img file. It is important that the line about the "eMMC Flasher" is not commented. It should look like: cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3-bbbw.sh.
  4. Write the image to a microSD card. If on Windows you can use Win32 Disk Imager.
  5. Power off your BeagleBone (by physically disconnecting the USB/power cable)
  6. Plugin the microSD card
  7. Hold the Boot Switch (near the microSD card slot) and, while holding this button, insert the USB/power cable. Keep holding the Boot Switch until the User LEDs start to flash.
  8. Wait until the User LEDs stop blinking and all 4 User LEDs are on. This process can take 5-25 minutes depending on the image used.
  9. Disconnect the USB/power cable.
  10. Remove the microSD card. Otherwise, you will end up flashing the eMMC again.
  11. Power on your BeagleBone Black.

Here is an overview of the BeagleBone (with buttons & LEDs):

BeagleBone buttons

Don't be afraid of the amount of steps. It's actually straightforward. There are also official guides about the latest firmware images and installing the latest software.

Upvotes: 1

Related Questions