diff options
| author | FZXO11 <153527911+FZXO11@users.noreply.github.com> | 2025-03-18 10:10:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-18 08:10:57 +0100 |
| commit | daca99017b4d5a3770dab6de039a9d023bebba92 (patch) | |
| tree | 70927db79c1883d0e8320c0fa9cd670ef879a44a /docs/COMPILE.md | |
| parent | 546238681eb8d5b3d80cf1d77075dcbff82de72a (diff) | |
| download | box64-daca99017b4d5a3770dab6de039a9d023bebba92.tar.gz box64-daca99017b4d5a3770dab6de039a9d023bebba92.zip | |
Note about binfmt_misc (#2445)
* Note about binfmt_misc * Notify its working on CHRoot
Diffstat (limited to 'docs/COMPILE.md')
| -rw-r--r-- | docs/COMPILE.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/COMPILE.md b/docs/COMPILE.md index d3e5bcbf..2e1ce3be 100644 --- a/docs/COMPILE.md +++ b/docs/COMPILE.md @@ -30,6 +30,15 @@ sudo systemctl restart systemd-binfmt if you want to build Box64 with the Box32 option, you will need to add `-DBOX32=ON` to the cmake command. That will enable 32bits process to be run with Box64. If you also want binfmt integration on 32bits binaries, you also need to add `-DBOX32_BINFMT=ON` to the cmake command. +### note about binfmt_misc + +[binfmt_misc](https://en.wikipedia.org/wiki/Binfmt_misc) is a capability of the Linux kernel which allows arbitrary executable file formats to be recognized and passed to certain user space applications such as box64 usually used with systemd but systems like android can't run/use systemd so you will need to register box64 manually, this will also work inside a CHRoot. +``` +sudo mount -t binfmt_misc none /proc/sys/fs/binfmt_misc +sudo echo ':box64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/box64:' | sudo tee /proc/sys/fs/binfmt_misc/register +``` + + #### Example of generic ARM64 build for linux platforms ``` @@ -347,4 +356,4 @@ After successfully cross-compiling, copy the box64 executable to your RISC-V dev To fix this, copy the shared libraries folder from the Box64 repository (`x64lib` or `x86lib`) to your target. Place them into the proper library search paths, for example: - `/usr/lib/box64-x86_64-linux-gnu/` (for x86_64) -- `/usr/lib/box64-i386-linux-gnu/` (for i386) \ No newline at end of file +- `/usr/lib/box64-i386-linux-gnu/` (for i386) |