Skip to content

Building From Source

Philipp Czarnetzki edited this page Jun 15, 2018 · 8 revisions

Building From Source

Step 1: Prerequisites

  • Git. To install using:

    • for Debian/Ubuntu: apt-get install git
    • for Arch: pacman -S git
  • Node 6.x

  • NPM 3.x

After you installed the prerequisites just clone the repository

$ git clone https://github.com/NodeOS/NodeOS.git

Step 2 (Debian/Ubuntu): Dependencies

Once you've installed the prerequisites you need the dependencies for Debian/Ubuntu using apt-get. First you need to update your cache. To do so run

$ dpkg --add-architecture i386
$ apt-get -qq -y update

Then you install the dependencies listed below

  • cross compiler dependencies: apt-get -qq -y gcc g++ realpath texinfo
  • barebones dependencies: apt-get -qq -y bc libpixman-1-dev
  • bootfs dependencies: apt-get -qq -y genisoimage libuuid:i386
  • initramfs dependencies: apt-get -qq -y cpio
  • userfs dependencies: apt-get -qq -y autoconf automake
  • qemu dependencies: apt-get -qq -y libsdl1.2-dev

Or as a one liner:

$ apt-get -qq -y gcc g++ realpath texinfo bc libpixman-1-dev genisoimagelibuuid:i386 cpio autoconf automake libsdl1.2-dev

Or just run if you're outside the folder

$ cd NodeOS/
$ bin/install-dependencies

Step 2 (Arch Linux): Dependencies

Once you have installed the prerequisites you need the dependencies for Arch Linux

  • cross compiler dependencies: pacman -S gcc texinfo python2
  • barebones dependencies: pacman -S bc libcurl-gnutls pixman lib32-pixman
  • bootfs dependencies: pacman -S cdrkit
  • initramfs dependencies: pacman -S cpio
  • userfs dependencies: pacman -S autoconf automake
  • qemu dependencies: pacman -S sdl

Or as one liner:

$ pacman -S gcc texinfo python2 bc pixman lib32-pixman cdrkit cpio autoconf automake sdl

Step 3: Installation

Once you've installed the correct dependencies for your operating system you can start with the installation of NodeOS.

To do this, run following commands:

$ cd /usr/bin
$ ln -sf python2 python

The next step is to install the npm dependencies and the bundled dependencies to do this run following command:

$ npm install

Step 4: Build NodeOS

We've installed all neccassary dependencies and prerequisites, the next thing we need to do is to build the whole thing, to do so just run:

$ npm run build

if you want to build NodeOS for Docker run the following commands:

$ PLATFORM=docker npm run build
$ npm run dockerBuild

then precede with Step 5

Step 5: Run your fresh NodeOS build

Now you can run your fresh build with:

For QEmu:

$ npm start

For Docker:

$ npm run docker

If NodeOS boot without a error, then everything was compiled correctly. If not look under Troubleshooting

After NodeOS has booted up you should see something like:

Hello! I'm a user init script :-)

Now you're prompted to enter your username and password. By default, the username and password is nodeos and cannot be changed without altering code.

$ username: nodeos
$ password: nodeos

Clone this wiki locally