1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
Run box64 with proot form alpine edge amd64
I tried to use statically compiled box64 instead of qemu-x86_64-static.
command:
```bash
+ proot --root-id --pwd=/root --rootfs=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64 --kill-on-exit --sysvipc -L --link2symlink --mount=/proc:/proc --mount=/dev:/dev --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/tmp:/dev/shm --mount=/dev/urandom:/dev/random --mount=/proc/self/fd:/dev/fd --mount=/proc/self/fd/0:/dev/stdin --mount=/proc/self/fd/1:/dev/stdout --mount=/proc/self/fd/2:/dev/stderr --mount=/dev/null:/dev/tty0 --mount=/data/data/com.termux/files/home/.config/tmoe-linux/gitstatus:/root/.cache/gitstatus --mount=/dev/null:/proc/sys/kernel/cap_last_cap --mount=/storage/self/primary/Download:/media/sd --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.stat:/proc/stat --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/.tmoe-container.version:/proc/version --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/bus:/proc/bus --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/buddyinfo:/proc/buddyinfo --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/cgroups:/proc/cgroups --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/consoles:/proc/consoles --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/crypto:/proc/crypto --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/devices:/proc/devices --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/diskstats:/proc/diskstats --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/execdomains:/proc/execdomains --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/fb:/proc/fb --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/filesystems:/proc/filesystems --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/interrupts:/proc/interrupts --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/iomem:/proc/iomem --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/ioports:/proc/ioports --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/kallsyms:/proc/kallsyms --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/keys:/proc/keys --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/key-users:/proc/key-users --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/kpageflags:/proc/kpageflags --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/loadavg:/proc/loadavg --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/locks:/proc/locks --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/misc:/proc/misc --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/modules:/proc/modules --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/pagetypeinfo:/proc/pagetypeinfo --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/partitions:/proc/partitions --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/sched_debug:/proc/sched_debug --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/softirqs:/proc/softirqs --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/timer_list:/proc/timer_list --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/uptime:/proc/uptime --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/vmallocinfo:/proc/vmallocinfo --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/vmstat:/proc/vmstat --mount=/data/data/com.termux/files/home/.local/share/tmoe-linux/containers/proot/alpine-edge_amd64/usr/local/etc/tmoe-linux/proot_proc/zoneinfo:/proc/zoneinfo --qemu=/data/data/com.termux/files/home/.local/share/tmoe-linux/lib/usr/bin/qemu-x86_64-static /usr/bin/env -i HOSTNAME=PEQM00 HOME=/root USER=root TERM=xterm-256color SDL_IM_MODULE=fcitx 'XMODIFIERS=\@im=fcitx' QT_IM_MODULE=fcitx GTK_IM_MODULE=fcitx TMOE_CHROOT=false TMOE_PROOT=true TMPDIR=/tmp DISPLAY=:2 PULSE_SERVER=tcp:127.0.0.1:4713 LANG=zh_CN.UTF-8 SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games /bin/bash -l
```
and got the error:
```bash
[BOX64] Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS SHA1 SHA2 [BOX64] Running on Unknown CPU with 8 cores, pagesize: 4096 [BOX64] Will use hardware counter measured at 13.0 MHz emulating 3.3 GHz Warning, Unrecognized option '-U' [BOX64] Box64 with Dynarec v0.3.3 3ab5699 built on Jan 28 2025 09:31:04 [BOX64] Didn't detect 48bits of address space, considering it's 39bits [BOX64] Warning, older then 2.34 pthread_kill not found, using current one [BOX64] Counted 30 Env var [BOX64] BOX64 LIB PATH: [BOX64] BOX64 BIN PATH: ./:bin/:/data/data/com.termux/files/usr/bin/ [BOX64] Looking for LD_LIBRARY_PATH [BOX64] 12484|SIGSEGV @0x3490e150 (???(0x3490e150)) (x64pc=(nil)/"???", rsp=0x76d305f000, stack=0x76d301f000:0x76d305f000 own=0x76d301f000 fp=(nil)), for accessing (nil) (code=1/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil) RAX:0x0000000000000000 RCX:0x0000000000000000 RDX:0x0000000000000000 RBX:0x0000000000000000 RSP:0x00000076d305f000 RBP:0x0000000000000000 RSI:0x0000000000000000 RDI:0x0000000000000000 R8:0x0000000000000000 R9:0x0000000000000000 R10:0x0000000000000000 R11:0x0000000000000000 R12:0x0000000000000000 R13:0x0000000000000000 R14:0x0000000000000000 R15:0x0000000000000000 ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053 proot info: vpid 1: terminated with signal 11
```
this box64 built on debian 12 aarch64 and made this modify:
```diff
diff --git a/rebuild_wrappers.py b/rebuild_wrappers.py
index a07a9d9..67cc7ad 100755
--- a/rebuild_wrappers.py
+++ b/rebuild_wrappers.py
@@ -383,12 +383,9 @@ def readFiles(files: Iterable[Filename]) -> Tuple[JumbledGlobals, JumbledRedirec
nonlocal halt_required
if funname is None:
for k in funsname:
- if (k != "") and (len(funsname[k]) != 0):
# Note: if this condition ever raises, check the wrapper pointed by it.
# If you find no problem, comment the error below, add a "pass" line (so python is happy)
# and open a ticket so I can fix this.
- raise NotImplementedError("Some functions are only implemented under one condition (probably) ({0}:{1})"
- .format(k, filename) + " [extra note in the script]\nProblematic function{}: {}".format(("" if len(funsname[k]) == 1 else "s"), funsname[k]))
for f in funsname[k]:
if f in ['_fini', '_init', '__bss_start', '__data_start', '_edata', '_end']:
continue # Always allow those symbols [TODO: check if OK]
@@ -1780,6 +1777,4 @@ if __name__ == '__main__':
if v == "--":
limit.append(i)
Define.defines = list(map(DefineType, sys.argv[2:limit[0]]))
- if main(sys.argv[1], sys.argv[limit[0]+1:], "2.5.0.24") != 0:
- exit(2)
exit(0)
```
|