Skip to content

Files

Latest commit

5049702 · Aug 27, 2021

History

History
50 lines (31 loc) · 1.7 KB

rock64.md

File metadata and controls

50 lines (31 loc) · 1.7 KB

Installing JSFS on Rock64 Hardware

Pine64's Rock64 SBC is an inexpensive ARM computer well suited for running JSFS.

Prerequisites

Node.js

Node is built from source using the follow steps (~ minutes):

  1. sudo apt-get install python g++ make
  2. wget https://nodejs.org/dist/v14.17.5/node-v14.17.5.tar.gz
  3. tar zxf node-v14.17.5.tar.gz
  4. cd node-v14.15.5
  5. ./configure
  6. make -j4 (this step fails: g++: fatal error: Killed signal terminated program cc1plus
  7. sudo make install

Try using precompiled binaries instead:

  1. sudo apt install xz-utils
  2. wget https://nodejs.org/dist/v14.17.5/node-v14.17.5-linux-arm64.tar.xz
  3. tar -xf node-v14.17.5-linux-arm64.tar.xz

Storage

You'll probably want to use something other than the boot SD card for storage. Attach something via USB and mount it at boot like so:

Test Run

~/node-v14.17.5-linux-arm64/bin/node ./server.js

This fails with the following error:

internal/modules/cjs/loader.js:892                                                                                                                     
  throw err;
    ^
                                                                                                                                                           
                                                                                                                                                       Error: Cannot find module 'through'

Looks like someone added undocumented dependencies...

Let's try and resolve that:

~/node-v14.17.5-linux-arm64/bin/node ~/node-v14.17.5-linux-arm64/bin/npm install through

This time the server starts.