Skip to content
Brice Dobry edited this page Aug 31, 2020 · 12 revisions

Getting Started

To build Node.js for RISC-V, start off by cloning this repository, then follow the steps below.

Prerequisites

Ensure that you have the RISC-V toolchain installed. If you do not have riscv64-unknown-linux-gnu-gcc available in your path, install it following the directions here.

RISC-V Toolchain

Install Prerequisites

sudo apt install gawk texinfo zlib1g-dev flex bison

Build Toolchain

git clone https://github.com/riscv/riscv-gnu-toolchain
cd riscv-gnu-toolchain
git submodule update --init --recursive

./configure --prefix=/opt/riscv
sudo make linux -j8

Note -j8 specifies parallel build with 8 processes, and should be adjusted to the number of cores on your machines.

Be sure to add the path to this new toolchain to your path:

export PATH="/opt/riscv/bin:$PATH"

Building Node.js

cd node
git submodule update --init --recursive

./build_riscv64.sh
make -j8
Clone this wiki locally