about summary refs log tree commit diff stats
path: root/docs
diff options
context:
space:
mode:
authorJank9525 <92904701+xDoge26@users.noreply.github.com>2023-06-14 14:24:26 +0700
committerGitHub <noreply@github.com>2023-06-14 09:24:26 +0200
commit7e282c9027a3c7e563b4492a0004174b42de0819 (patch)
tree6032a09c40192d2254a975d3bd2fe93770043f22 /docs
parente0dc494e71eacffc3a53ab59335298795752c740 (diff)
downloadbox64-7e282c9027a3c7e563b4492a0004174b42de0819.tar.gz
box64-7e282c9027a3c7e563b4492a0004174b42de0819.zip
Reduce duplication of compile instructions (#837)
* Reduce duplication of compile instructions

* Update COMPILE.md
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/COMPILE.md162
1 files changed, 40 insertions, 122 deletions
diff --git a/docs/COMPILE.md b/docs/COMPILE.md
index 4e10691a..275d5067 100755
--- a/docs/COMPILE.md
+++ b/docs/COMPILE.md
@@ -1,7 +1,7 @@
 Compiling/Installing

 ----

 

-#### Debian-based Linux 

+### Debian-based Linux 

 You can use [@ryanfortner](https://github.com/ryanfortner)'s apt repository to install precompiled box64 debs, updated every 24 hours. 

 

 ```

@@ -12,34 +12,46 @@ sudo apt update && sudo apt install box64-generic-arm -y
 

 Alternatively, you can generate your own package using the [instructions below](https://github.com/ptitSeb/box64/blob/main/docs/COMPILE.md#debian-packaging). 

 

-#### for RK3399

+----

 

-Using a 64bit OS:

+### The general approach is:

 ```

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

 cd box64

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

-make -j4

+mkdir build; cd build; cmake .. ${OPTIONS}

+make -j4  

 sudo make install

 ```

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

 ```

 sudo systemctl restart systemd-binfmt

 ```

+- You can use `make -j1`, `make -j2` to prevent running out of memory

+- You can also add `-DBAD_SIGNAL=ON` to the cmake command if you are on Linux Kernel mixed with Android, like on RK3588 or maybe Termux

 

-#### for RK3588 / RK3588S

-

-Using a 64bit OS:

+#### For instance, if you want to build box64 for Generic ARM64 Linux platforms, it would look like this:

 ```

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

 cd box64

-mkdir build; cd build; cmake .. -DRK3588=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

+mkdir build; cd build; cmake .. -D ARM_DYNAREC=ON -D CMAKE_BUILD_TYPE=RelWithDebInfo

 make -j4

 sudo make install

+sudo systemctl restart systemd-binfmt

 ```

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

+----

+

+#### for RK3399

+

+Using a 64bit OS:

 ```

-sudo systemctl restart systemd-binfmt

+-D RK3399=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

+```

+

+#### for RK3588 / RK3588S

+

+Using a 64bit OS:

+```

+-D RK3588=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

 #### for Raspberry Pi 3

@@ -55,16 +67,8 @@ run out of memory at some point and need to run the build again.
 Still, this can be faster if your build is attended.

 

 ```

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

-cd box64

-mkdir build; cd build; cmake .. -DRPI3ARM64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

+-D RPI3ARM64=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 make 

-# or e.g. make -j4

-sudo make install

-```

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

-```

-sudo systemctl restart systemd-binfmt

 ```

 

 #### for Raspberry Pi 4

@@ -72,15 +76,7 @@ sudo systemctl restart systemd-binfmt
 Warning, you need a 64bit 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

+-D RPI4ARM64=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

 #### for TEGRA X1

@@ -88,31 +84,16 @@ sudo systemctl restart systemd-binfmt
 Using a 64bit 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

+-D TEGRAX1=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

+

 #### for ODROID N2/N2+

 

 Using a 64bit OS:

 

 ```

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

-cd box64

-mkdir build; cd build; cmake .. -DODROIDN2=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

-make -j4

-sudo make install

-```

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

-```

-sudo systemctl restart systemd-binfmt

+-D ODROIDN2=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

 #### for Snapdragon 845

@@ -120,32 +101,14 @@ sudo systemctl restart systemd-binfmt
 Using a 64bit OS:

 

 ```

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

-cd box64

-mkdir build; cd build; cmake .. -DSD845=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

-make -j4

-sudo make install

-```

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

-```

-sudo systemctl restart systemd-binfmt

+-D SD845=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

-

-----

 #### for Phytium

 

 Using a 64bit OS:

 ```

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

-cd box64

-mkdir build; cd build; cmake .. -DPHYTIUM=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

-make -j4

-sudo make install

-```

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

-```

-sudo systemctl restart systemd-binfmt

+-D PHYTIUM=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

 #### for M1

@@ -153,38 +116,15 @@ sudo systemctl restart systemd-binfmt
 Only test on Asahi for now, using the default "16K page" kernel

 

 ```

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

-cd box64

-mkdir build; cd build; cmake .. -DM1=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

-make -j4

-sudo make install

-```

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

+-D M1=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

-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)`

-

-You can also add `-DBAD_SIGNAL=ON` to the cmake command if you are on Linux Kernel mixed with Android, like on RK3588 or maybe Termux

 

 #### for LoongArch

 

 Using a 64bit OS:

 

 ```

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

-cd box64

-mkdir build; cd build; cmake .. -DLARCH64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

-make -j4

-sudo make install

-```

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

-```

-sudo systemctl restart systemd-binfmt

+-D LARCH64=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

 #### for RISC-V

@@ -192,15 +132,7 @@ sudo systemctl restart systemd-binfmt
 Using a 64bit OS:

 

 ```

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

-cd box64

-mkdir build; cd build; cmake .. -DRV64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

-make -j`nproc`

-sudo make install

-```

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

-```

-sudo systemctl restart systemd-binfmt

+-D RV64=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

 #### for PowerPC 64 LE

@@ -208,15 +140,7 @@ sudo systemctl restart systemd-binfmt
 Using a 64bit OS:

 

 ```

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

-cd box64

-mkdir build; cd build; cmake .. -DPPC64LE=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

-make -j4

-sudo make install

-```

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

-```

-sudo systemctl restart systemd-binfmt

+-D PPC64LE=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

 #### for LX2160A

@@ -224,22 +148,16 @@ sudo systemctl restart systemd-binfmt
 Using a 64bit OS:

 

 ```

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

-cd box64

-mkdir build; cd build; cmake .. -DLX2160A=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

-make -j$(nproc)

-sudo make install

-```

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

-```

-sudo systemctl restart systemd-binfmt

+-D LX2160A=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

 ```

 

 #### for x86_64 Linux

+```

+-D LD80BITS=1 -D NOALIGN=1 -D CMAKE_BUILD_TYPE=RelWithDebInfo

+```

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

 

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

-

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

+----

 

 ### use ccmake