You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1.7 KiB

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.