Skip to content

Linux (x86) build and run instructions

Victor edited this page May 17, 2018 · 6 revisions

NB: this is NOT for cross-compilation.

Prerequisites

  1. gcc and g++
  2. Jam 2.5.
  3. 32-bit development and runtime libraries (i386 or i686 architecture, depending on your distribution) for:
    1. glibc
    2. libX11, libXau, libffi
    3. If you want sound output, pulseaudio and alsa-lib.
  4. Your legally obtained 717006.rom file.

Compiling

  1. Clone the Einstein repo somewhere.
  2. cd [repo-dir]/K/_Build_/Jam
  3. jam -starget=linux to build the K libraries. It will give you an error at the end about not being able to link tests.cp.o but build.LINUX/libk.a should exist.
  4. cd [repo-dir]/_Build_/Jam
  5. Build CLI application with PulseAudio and (old) PortAudio: jam -starget=linux -spulseaudio=yes
  6. Build with system-provided PortAudio libs: jam -starget=linux -snativeportaudio=yes

You will get build.LINUX/einstein which is the emulator with a CLI interface.

Running

Environment setup

Before you run Einstein for the first time, it is a good idea to setup a directory to contain the files that Einstein requires, such as your ROM file.

  1. Create a directory, for example, $HOME/.einstein/
  2. Copy your ROM file to this directory, and name it 717006.rom
  3. Copy [repo-dir]/_Data_/Einstein.rex to this directory.
  4. Set the environment variable EINSTEIN_HOME, eg. put the line export EINSTEIN_HOME=$HOME/.einstein/ in your ~/.bash_profile file, assuming you use bash as your shell.
  5. Logout and login again, or, from your current terminal, run . ~/.bash_profile to refresh your environment variables.

Run the emulator

  1. Open a terminal.
  2. [repo-dir]/_Build_/Jam/build.LINUX/einstein --help to print command-line help.
  3. Run the emulator as [repo-dir]/_Build_/Jam/build.LINUX/einstein and it will open a new window for the Newton screen, and give you an einstein> prompt in the terminal. Type help in the terminal to see help.
  4. Run as [repo-dir]/_Build_/Jam/build.LINUX/einstein --audio=pulseaudio for sound output, assuming you compiled with PulseAudio.

Example: Fedora 23 Build Prerequisites

  1. sudo dnf install glibc-devel.i686
  2. sudo dnf install libstdc++.i686
  3. sudo dnf install libffi-devel.i686
  4. sudo dnf install libX11-devel.i686
  5. sudo dnf install libXau-devel.i686
  6. sudo dnf install alsa-lib-devel.i686
  7. sudo dnf install pulseaudio-libs-devel.i686

The rest of the instructions work as listed above