You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ok, but don't forget box86 is a 32bits apps, and need a 32bits chroot/multiarch/whetever to run on aarch64 linux. That may change at least the --target no?
I've just quickly tested, and the Crostini runtime does allow you to add the armhf architecture and run packages within 64-bit Chrome OS on an RK3399, so it shouldn't be an issue.
ChromeOS laptops have regular ARM CPUs that shouldn't be under one
"chromeos" device
I think it'd be a better idea to just add RK3288, RK3399, MT8183 options.
There isn't really anything special in ARM chromebooks to not have them
under same umbrella as "regular" ARM SBCs
jinx@penguin:~/box86/build$ sudo make install
Consolidate compiler generated dependencies of target dynarec_arm
[ 3%] Built target dynarec_arm
[ 3%] Built target WRAPPERS
Consolidate compiler generated dependencies of target arm_pass0
[ 11%] Built target arm_pass0
Consolidate compiler generated dependencies of target arm_pass1
[ 19%] Built target arm_pass1
Consolidate compiler generated dependencies of target arm_pass2
[ 27%] Built target arm_pass2
Consolidate compiler generated dependencies of target arm_pass3
[ 35%] Built target arm_pass3
[ 36%] Built target dynarec
[ 36%] Built target PRINTER
Consolidate compiler generated dependencies of target box86
[100%] Built target box86
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/bin/box86
-- Installing: /etc/binfmt.d/box86.conf
-- Installing: /usr/lib/i386-linux-gnu/libstdc++.so.6
-- Installing: /usr/lib/i386-linux-gnu/libstdc++.so.5
-- Installing: /usr/lib/i386-linux-gnu/libgcc_s.so.1
jinx@penguin:~/box86/build$ cd
jinx@penguin:~$ sudo systemctl restart systemd-binfmt
Job for systemd-binfmt.service failed because the control process exited with error code.
See "systemctl status systemd-binfmt.service" and "journalctl -xeu systemd-binfmt.service" for details.
jinx@penguin:~$ box86 -v
-bash: /usr/local/bin/box86: No such file or directory
jinx@penguin:~$ box86 --help
-bash: /usr/local/bin/box86: No such file or directory
jinx@penguin:~$
Ah ok. You are missing the "armhf" multiarch. If you are on debian/armbian/ubuntu, use "sudo dpk --add-architeture armhf && sudo apt update && sudo apt install libc6:armhf" at least to have box86 running. On other OS, you need to use chroot or something similar...
Success! Something about the compile instructions gave me the impression that multiarch wouldn't be necessary. Now to fiddle with i386 wine to see if I can get Avernum going. It would be a huge add to this Chromebook. Thanks!
I followed similar instructions to build, but used the Snapdragon 845 target since my Chromebook uses a Snapdragon 7C (which I assume is close enough, it's all ARM64). I did indeed have to enable the armhf architecture.
However, for some reason it doesn't seem to have proper binfmt support.
This is after manually copying the box86.conf file into /usr/share/binfmts/box86.conf as per #419 , accounting for the differing format since I'm using a Ubuntu 22.04 container on Chrome OS (the default container they give you is Debian Bullseye).
I also had to manually enable mounting namespaces in Chrome OS, which I had to search for as well. OP can be found here, but the necessary component is:
1. vmc start termina
2. From a separate shell- vmc container termina giraffe --privileged true
Now, if I try to enable binfmt support, I'm shown the following:
pirouette@penguin:~/box86/build$ sudo update-binfmts --enable
update-binfmts: warning: unable to close /proc/sys/fs/binfmt_misc/register: Invalid argument
update-binfmts: exiting due to previous errors
Unfortunately I'm stuck here. Without binfmt support, anything that fork/execs doesn't want to work. Is there something I'm missing?
I was able to partially fix this issue by doing a few additional things:
From Crosh
Enter termina (vmc launch termina)
Inside termina:
lxc config set security.nesting true
lxc config set security.virtualization true
Exit termina, reboot Chrome OS
After modifying lxc configs, it takes a little longer for the virtual machine to start up. Wait a few minutes to finish updating (it should give you a notification that the virtual machine is being updated), then launch Terminal as usual.
Now, back in Terminal, update /usr/share/binfmts/box86.conf to read as follows:
However, trying to actually run anything just results in box86 not working. Example:
pirouette@penguin:~$ sudo apt install hello:i386
pirouette@penguin:~$ hello
-bash: /usr/bin/hello: No such file or directory
Trying to run Box86 without binfmt does not seem to work either:
pirouette@penguin:~$ box86 /usr/bin/hello
-bash: /usr/local/bin/box86: No such file or directory
I'll keep digging through GitHub and Chrome OS issues to see if I can find anything, but I'm definitely running out of ideas.
...
Additional (important) information: I gave up on Ubuntu 22.04 for the sole reason that it doesn't natively support side-by-side multiarch, meaning I couldn't install libc6:i386 alongside libc6:arm64. I'm now running a custom container with Debian Bookworm (arm64) installed, which is basically just a more up to date version of the default Bullseye container that Terminal sets up by default. If you want to follow along with Ubuntu, you'll need a chroot or proot setup. I'm no expert at that, but there are guides that are relatively easy to follow. You'll still need nesting and virtualization enabled for this to work, as far as I can tell.
(For those curious, I wanted a variable sized virtual machine, so I had to build the container myself anyway, and I figured I might as well update to Bookworm while I was at it.)
Ok, partial success after looking at #465 . I completely forgot to install the armhf version of libc6, which as I understand is the interpreter responsible for loading and running 32 bit arm executables (even on arm64).
I feel very close now to getting this fully working on Crostini. I can run simple text based programs now, still yet to run graphical programs. I'm surely only missing one small piece of the puzzle now.
Sorry for the... triple post at this point, but I think documenting my experience is worthwhile, and I can make a full writeup when I'm successful in my end goal of launching Steam.
Reacted by Eric Wiessner (KI7POL) and TrinitySlayy
After some trial and error installing various armhf graphics drivers, I've finally gotten some OpenGL apps to run, including the Linux (Steam) version of VVVVVV! It runs flawlessly, too. I just had to go through steamcmd to download it, but I knew it was one of the few Steam games I own that doesn't actively use the DRM. Others may work by installing a Steam emulator like Goldberg. Will update shortly.
UPDATE: Goldberg didn't fix games with broken symbols unfortunately.
Also, I still haven't managed to get to the Steam UI at all, it crashes in the terminal, complaining about Can't find 'steam-runtime-check-requirements', continuing anyway and libstdc++.so.6 Global Symbol __libc_single_threaded. I'll put the full terminal output at the end of this comment for posterity.
I'm fairly certain I've installed all the necessary libraries for Steam at this point, with an unhealthy mix of arm64, armhf, i386 and amd64 libs, half of which are probably unnecessary, since box86/64 mostly use native armhf libraries. I think the Global Symbol that's missing is the culprit, but not sure how to go about fixing it.
I also tried installing Steam through Wine (sudo apt install wine64:amd64 wine:i386), which fails with the following output:
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Error loading needed lib /usr/lib/x86_64-linux-gnu/wine/../libwine.so.1
Warning: Cannot dlopen("/usr/lib/x86_64-linux-gnu/wine/../libwine.so.1"/0xa2d80190, 2)
Using emulated /usr/lib/x86_64-linux-gnu/wine/libwine.so.1
Error loading needed lib /usr/lib/x86_64-linux-gnu/wine/kernel32.so
Warning: Cannot dlopen("/usr/lib/x86_64-linux-gnu/wine/kernel32.so"/0xa2e14960, 2)
Error loading needed lib /usr/lib/x86_64-linux-gnu/wine/kernelbase.so
Warning: Cannot dlopen("/usr/lib/x86_64-linux-gnu/wine/kernelbase.so"/0xa2e29300, 2)
Box86 with Dynarec v0.2.7 4a2ff61f built on Jun 13 2022 21:07:54
I know that Wine at least partially works because I was able to successfully open notepad.exe and cmd.exe. Would installing Winetricks or PlayOnLinux (or any other Wine helper tool) help at all?
Something interesting I noticed is that running glxgears (i386 using box86 or amd64 using box64) runs much faster with the environment variable LIBGL_ALWAYS_SOFTWARE=1, which is odd. This behavior is not unique to box86/64, however, the armhf and arm64 versions also exhibit this weird behavior.
...
Full steam output:
pirouette@penguin:~$ steam
/home/pirouette/.local/share/Steam/steam.sh: line 124: VERSION_ID: unbound variable
/home/pirouette/.local/share/Steam/steam.sh: line 124: VERSION_ID: unbound variable
steam.sh[12861]: Running Steam on debian 64-bit
steam.sh[12861]: STEAM_RUNTIME is enabled by the user
setup.sh[12923]: Steam runtime environment up-to-date!
steam.sh[12861]: Can't find 'steam-runtime-check-requirements', continuing anyway
Box86 with Dynarec v0.2.7 4a2ff61f built on Jun 13 2022 21:07:54
Error: Global Symbol __libc_single_threaded not found, cannot apply R_386_GLOB_DAT @0xf0b9f914 ((nil)) in /lib/i386-linux-gnu/libstdc++.so.6
EDIT: Clarified on Goldberg Steam emulator, it doesn't fix games with broken Global Symbols
Activity
ptitSeb commentedon Oct 13, 2020
Yes, sure. What would be the CFLAGS parameters tu use (and LDFLAGS also maybe?)
JLIT0 commentedon Oct 13, 2020
About half of the Chrome OS ARM devices are using the Rockchip RK3399, which has the following cflags:
CFLAGS="--target=aarch64-unknown-linux-gnu -O3 -pipe -march=armv8-a+crc+simd+crypto -mcpu=cortex-a72+crc+simd+crypto"Roughly the other half uses the MediaTek MT8173C, which I don't know the cflags for.
ptitSeb commentedon Oct 13, 2020
ok, but don't forget box86 is a 32bits apps, and need a 32bits chroot/multiarch/whetever to run on aarch64 linux. That may change at least the
--targetno?JLIT0 commentedon Oct 13, 2020
Yep, so we can substitute
aarch64forarmhfI've just quickly tested, and the Crostini runtime does allow you to add the
armhfarchitecture and run packages within 64-bit Chrome OS on an RK3399, so it shouldn't be an issue.ptitSeb commentedon Dec 31, 2020
I have added support for RK3399 in the CMakeList now. Does the support is enough for this ticket to be closed?
Maccraft123 commentedon Dec 31, 2020
kaosushijin commentedon Dec 8, 2021
I'm failing to build with the MT8183. The RK3399 build appears to succeed, but the resulting binary is non-operable.
ptitSeb commentedon Dec 8, 2021
MT8183 seems to be Cortex-A73/-A53. How the RK3399 is non-operable? What kind of error do you get?
kaosushijin commentedon Dec 8, 2021
ptitSeb commentedon Dec 8, 2021
Ah ok. You are missing the "armhf" multiarch. If you are on debian/armbian/ubuntu, use "sudo dpk --add-architeture armhf && sudo apt update && sudo apt install libc6:armhf" at least to have box86 running. On other OS, you need to use chroot or something similar...
kaosushijin commentedon Dec 8, 2021
Success! Something about the compile instructions gave me the impression that multiarch wouldn't be necessary. Now to fiddle with i386 wine to see if I can get Avernum going. It would be a huge add to this Chromebook. Thanks!
ptitSeb commentedon Dec 8, 2021
Good :)
You will need a few more armhf libs for wine, like x11 and many other. Unfortunatly, I don't have the list.
nhobson99 commentedon Jun 12, 2022
I followed similar instructions to build, but used the Snapdragon 845 target since my Chromebook uses a Snapdragon 7C (which I assume is close enough, it's all ARM64). I did indeed have to enable the armhf architecture.
However, for some reason it doesn't seem to have proper binfmt support.
This is after manually copying the box86.conf file into /usr/share/binfmts/box86.conf as per #419 , accounting for the differing format since I'm using a Ubuntu 22.04 container on Chrome OS (the default container they give you is Debian Bullseye).
I also had to manually enable mounting namespaces in Chrome OS, which I had to search for as well. OP can be found here, but the necessary component is:
Now, if I try to enable binfmt support, I'm shown the following:
Unfortunately I'm stuck here. Without binfmt support, anything that fork/execs doesn't want to work. Is there something I'm missing?
nhobson99 commentedon Jun 14, 2022
I was able to partially fix this issue by doing a few additional things:
From Crosh
After modifying lxc configs, it takes a little longer for the virtual machine to start up. Wait a few minutes to finish updating (it should give you a notification that the virtual machine is being updated), then launch Terminal as usual.
Now, back in Terminal, update /usr/share/binfmts/box86.conf to read as follows:
Then
sudo update-binfmts --import box86.confandsudo update-binfmts --enableshould just work. Finally after all that work, I receive the following:However, trying to actually run anything just results in box86 not working. Example:
Trying to run Box86 without binfmt does not seem to work either:
I'll keep digging through GitHub and Chrome OS issues to see if I can find anything, but I'm definitely running out of ideas.
...
Additional (important) information: I gave up on Ubuntu 22.04 for the sole reason that it doesn't natively support side-by-side multiarch, meaning I couldn't install libc6:i386 alongside libc6:arm64. I'm now running a custom container with Debian Bookworm (arm64) installed, which is basically just a more up to date version of the default Bullseye container that Terminal sets up by default. If you want to follow along with Ubuntu, you'll need a chroot or proot setup. I'm no expert at that, but there are guides that are relatively easy to follow. You'll still need nesting and virtualization enabled for this to work, as far as I can tell.
(For those curious, I wanted a variable sized virtual machine, so I had to build the container myself anyway, and I figured I might as well update to Bookworm while I was at it.)
nhobson99 commentedon Jun 14, 2022
Ok, partial success after looking at #465 . I completely forgot to install the armhf version of libc6, which as I understand is the interpreter responsible for loading and running 32 bit arm executables (even on arm64).
I feel very close now to getting this fully working on Crostini. I can run simple text based programs now, still yet to run graphical programs. I'm surely only missing one small piece of the puzzle now.
Sorry for the... triple post at this point, but I think documenting my experience is worthwhile, and I can make a full writeup when I'm successful in my end goal of launching Steam.
nhobson99 commentedon Jun 14, 2022
After some trial and error installing various armhf graphics drivers, I've finally gotten some OpenGL apps to run, including the Linux (Steam) version of VVVVVV! It runs flawlessly, too. I just had to go through steamcmd to download it, but I knew it was one of the few Steam games I own that doesn't actively use the DRM. Others may work by installing a Steam emulator like Goldberg. Will update shortly.
UPDATE: Goldberg didn't fix games with broken symbols unfortunately.
Also, I still haven't managed to get to the Steam UI at all, it crashes in the terminal, complaining about
Can't find 'steam-runtime-check-requirements', continuing anywayandlibstdc++.so.6 Global Symbol __libc_single_threaded. I'll put the full terminal output at the end of this comment for posterity.I'm fairly certain I've installed all the necessary libraries for Steam at this point, with an unhealthy mix of arm64, armhf, i386 and amd64 libs, half of which are probably unnecessary, since box86/64 mostly use native armhf libraries. I think the Global Symbol that's missing is the culprit, but not sure how to go about fixing it.
I also tried installing Steam through Wine (
sudo apt install wine64:amd64 wine:i386), which fails with the following output:I know that Wine at least partially works because I was able to successfully open notepad.exe and cmd.exe. Would installing Winetricks or PlayOnLinux (or any other Wine helper tool) help at all?
Something interesting I noticed is that running glxgears (i386 using box86 or amd64 using box64) runs much faster with the environment variable LIBGL_ALWAYS_SOFTWARE=1, which is odd. This behavior is not unique to box86/64, however, the armhf and arm64 versions also exhibit this weird behavior.
...
Full steam output:
EDIT: Clarified on Goldberg Steam emulator, it doesn't fix games with broken Global Symbols
ptitSeb commentedon Oct 11, 2022
I'm migrating this ticket to Discussion, that seems more appropriate.