-
Notifications
You must be signed in to change notification settings - Fork 64
Linux (x86) build and run instructions
Note: Please check BUILDING.md for the most current build instructions.
NB: this is NOT for cross-compilation.
Einstein currently only runs correctly on 32-bit platforms. Chances are, if you installed your Linux distribution since 2012 or so, you are running a 64-bit (x86_64 or amd64) native kernel and have mostly 64-bit native libraries and tools installed. Until Einstein is updated to be 64-bit clean, you will need to install the 32-bit editions of the necessary libraries and tools in order to build Einstein. This architecture will probably be called i686, but it could also be i586 or "i386", depending on your distribution.
Install these packages and any prerequisites your package manager tells you to install.
sudo dnf install gcc gcc-c++ cmake git
sudo dnf --forcearch=i686 install libc-devel libstdc++-devel libffi-devel libX11-devel libXau-devel pulseaudio-libs-devel
sudo yum install gcc gcc-c++ cmake git
sudo yum install libc-devel.i686 libstdc++-devel.i686 libffi-devel.i686 libX11-devel.i686 libXau-devel.i686 pulseaudio-libs-devel.i686
- Clone the Einstein repo somewhere using
git. Let's call this directory[repo-dir] cd [repo-dir]/_Build_/CMake-
./build.shto runcmakeand then compile. If this succeeds, you will end up with aneinsteinbinary in the current directory.
-
./build.sh debugwill compileeinsteinwith debugging symbols. - You can change the
cmakeoptions by runningccmake -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-32-linux.cmake ../..
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.
- Create a directory, for example,
$HOME/.einstein/ - Copy your ROM file to this directory, and name it
717006 - Copy
[repo-dir]/_Data_/Einstein.rexto this directory. - Set the environment variable EINSTEIN_HOME, eg. put the line
export EINSTEIN_HOME=$HOME/.einstein/in your~/.bash_profilefile, assuming you use bash as your shell. - Logout and login again, or, from your current terminal, run
. ~/.bash_profileto refresh your environment variables.
- Open a terminal.
-
[repo-dir]/_Build_/CMake/einstein --helpto print command-line help. - Run the emulator as
[repo-dir]/_Build_/CMake/einsteinand it will open a new window for the Newton screen, and give you aneinstein>prompt in the terminal. Typehelpin the terminal to see help.