about summary refs log tree commit diff stats
path: root/docs/COMPILE.md
diff options
context:
space:
mode:
authorJai-JAP <parjailu@gmail.com>2021-07-12 10:52:59 +0530
committerJai-JAP <parjailu@gmail.com>2021-07-12 10:52:59 +0530
commitcc8f926d669aad7a05d439461dbbe89cd02bd6b3 (patch)
treebc95696a1ddf596b0277ff1707a62445e59cb8ce /docs/COMPILE.md
parent486aa58b157c74d2d0623eecd08489fb520a5510 (diff)
downloadbox64-cc8f926d669aad7a05d439461dbbe89cd02bd6b3.tar.gz
box64-cc8f926d669aad7a05d439461dbbe89cd02bd6b3.zip
Moved documentation to "docs/" folder.
Diffstat (limited to 'docs/COMPILE.md')
-rwxr-xr-xdocs/COMPILE.md92
1 files changed, 92 insertions, 0 deletions
diff --git a/docs/COMPILE.md b/docs/COMPILE.md
new file mode 100755
index 00000000..d12fd2a0
--- /dev/null
+++ b/docs/COMPILE.md
@@ -0,0 +1,92 @@
+Compiling

+----

+#### for RK3399

+

+Using a 64bits OS:

+```

+git clone https://github.com/ptitSeb/box64

+cd box64

+mkdir build; cd build; cmake .. -DRK3399=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

+make -j4

+sudo make install

+```

+If it's the first install, you also need:

+```

+sudo systemctl restart systemd-binfmt

+```

+

+#### for PI4

+

+Warning, you need a 64bits OS:

+

+```

+git clone https://github.com/ptitSeb/box64

+cd box64

+mkdir build; cd build; cmake .. -DRPI4ARM64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

+make -j4

+sudo make install

+```

+If it's the first install, you also need:

+```

+sudo systemctl restart systemd-binfmt

+```

+

+#### for TEGRA X1

+

+Using a 64bits OS:

+

+```

+git clone https://github.com/ptitSeb/box64

+cd box64

+mkdir build; cd build; cmake .. -DTEGRAX1=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

+make -j4

+sudo make install

+```

+If it's the first install, you also need:

+```

+sudo systemctl restart systemd-binfmt

+```

+

+#### for Other ARM64 Linux platforms

+

+ `mkdir build; cd build; cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo; make -j$(nproc)`

+

+#### for x86_64 Linux

+

+ `mkdir build; cd build; cmake .. -DLD80BITS=1 -DNOALIGN=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo; make -j$(nproc)`

+

+If you encounter some linking errors, try activating `NOLOADADDR` (`cmake -DNOLOADADDR=ON; make -j$(nproc)`).

+

+### use ccmake

+

+Alternatively, you can **use the curses-bases ccmake (or any other gui frontend for cmake)** to select wich platform to use interactively.

+

+### Customize your build

+

+*Use ccache if you have it* 

+

+Add `-DUSE_CCACHE=1` if you have ccache (it's better if you plan to touch the sources)

+

+*To have some debug info* 

+

+The `-DCMAKE_BUILD_TYPE=RelWithDebInfo` argument makes a build that is both optimized for speed, and has debug information embedded. That way, if you have a crash or try to analyse performance, you'll have some symbols.

+

+*To have a Trace Enabled build* 

+

+To have a trace enabled build ( ***the interpretor will be slightly slower***), add `-DHAVE_TRACE=1` but you will need, at runtime, to have the [Zydis library](https://github.com/zyantific/zydis) library in your `LD_LIBRARY_PATH` or in the system library folders.

+

+*To have ARM Dynarec*

+

+The Dynarec is only available on the ARM architecture(Right now, anyways.). Notes also that VFPv3 and NEON are required for the Dynarec. Activate it by using `-DARM_DYNAREC=1`.

+

+*Not building from a git clone*

+

+If you are not building from a git clone (for example, downloading a release source zipped from github), you need to activate `-DNOGIT=1` from cmake to be able to build (normal process include git sha1 of HEAD in the version that box64 print).

+

+----

+

+Testing

+----

+A few tests are included.

+They can be launched with `ctest`

+They are very basic and don't test much for now.