Replies: 34 comments 43 replies
-
Yes, sure. What would be the CFLAGS parameters tu use (and LDFLAGS also maybe?) |
Beta Was this translation helpful? Give feedback.
-
About half of the Chrome OS ARM devices are using the Rockchip RK3399, which has the following cflags:
Roughly the other half uses the MediaTek MT8173C, which I don't know the cflags for. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Yep, so we can substitute I've just quickly tested, and the Crostini runtime does allow you to add the |
Beta Was this translation helpful? Give feedback.
-
I have added support for RK3399 in the CMakeList now. Does the support is enough for this ticket to be closed? |
Beta Was this translation helpful? Give feedback.
-
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
|
Beta Was this translation helpful? Give feedback.
-
I'm failing to build with the MT8183. The RK3399 build appears to succeed, but the resulting binary is non-operable. |
Beta Was this translation helpful? Give feedback.
-
MT8183 seems to be Cortex-A73/-A53. How the RK3399 is non-operable? What kind of error do you get? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
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... |
Beta Was this translation helpful? Give feedback.
-
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! |
Beta Was this translation helpful? Give feedback.
-
Good :) You will need a few more armhf libs for wine, like x11 and many other. Unfortunatly, I don't have the list. |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
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
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.) |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
https://gist.github.com/nhobson99/98d1542e542d3aa25faa3c817d3f2a67 I forgot I had an entire writeup about using Box86 to run Steam on Chrome OS. I wanted to write a section about Wine but gave up on it. I hope this helps someone. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Sure after adding that hack:
Allows you to have |
Beta Was this translation helpful? Give feedback.
-
Dear @nhobson99 & @DarkevilPT, thanks for all your hard work on top on @ptitSeb 's hard work in developing box86&64. I am a novice Linux user and just bought a Lenovo Duet 3 and am impressed with the little machine and anxious to follow all of your guidelines and try getting Windows x64 programs to work via those instructions on my machine. At your convenience, would you answer these additional questions:
https://gist.github.com/nhobson99/98d1542e542d3aa25faa3c817d3f2a67
My Snapdragon chip is apparently a "7c Gen 2 (8x Kyro 468)
I appreciate any help you all can provide on the above and suspect if the above method of getting Windows x64 programs to work on Aarch64 Chromebooks then it will be a very useful method for other Aarch ChromeOS users to use. Thank you, and have a good rest of your week. |
Beta Was this translation helpful? Give feedback.
-
Just install steam from pi-apps. Thats my suggestion. |
Beta Was this translation helpful? Give feedback.
-
Thanks, @DarkevilPT One clarification, can I just go to the link you posted and follow the instructions by @nhobson99 and the pi-apps will set everything up, or do I first have to go through the steps posted on the previous discussion page: https://gist.github.com/nhobson99/98d1542e542d3aa25faa3c817d3f2a67 ? |
Beta Was this translation helpful? Give feedback.
-
Ok, great, I'll give it a try! |
Beta Was this translation helpful? Give feedback.
-
Thanks-- will give it a try :-) |
Beta Was this translation helpful? Give feedback.
-
I spent last week trying out many of your suggestions and learned a lot, thanks! All in all, it turned out that creating a new Ubuntu container was best for my use; I was able to make a working archlinux container and install box86/box64/steam from the BredOS distribution you mentioned but still couldn't get steam to work on it (from my interpretation of the errors, it seemed to still require binfmt system integration which I did not want to do (use developer mode on my ChromeOS). Overall, that was okay for me since I primarily wanted to install Wine and use GOG more than steam. So, I played around a bit and learned more about Wine and what additionally I might need to try out more up-to-date Windows games that use Direct X 11. I figured out that the bare minimum I needed was to install Wine + DXVK + box 86 + box64. The Wine, box86 and box64 installations all came from pi-apps and DXVK from DXVK's GitHub release. Since I didn't want to activate developer mode on my ChromeOS machine, I used the workaround using @ptitSeb 's script to keep box86 & box64 active in the environment when I ran wine as I mentioned from this previous post: https://www.reddit.com/r/Crostini/comments/x4jvbs/any_way_to_run_privileged_containers_in_crostini/ I decided to install my Wine setup in a new Ubuntu container instead of the default Debian container because I saw that the Ubuntu container came with a GPU accelerated Vulkan driver (virtio-vulkan) that the Debian container didn't (uses lavapipe software rendering of Vulkan) and thought that would work better with newer games and DXVK. Bottom line: it worked! (see attached screenshot). Unfortunately, even though it did work, the graphics were still much slower than the actual gameplay is supposed to be so that that battles take way too long to complete. I tried switching to the lavapipe software Vulkan renderer which unfortunately wasn't playable at all (game kept timing out indicating the rendering loops were timing out). So, I'll think I'll keep following @ptitSeb's box64 blog to look for updates that might speed things up. I'm also going to try out installing the same Wine setup in Fex-EMU and see if it is any faster. Final question: Do you know if there is a ChromeOS or ChromeOS/Linux container user community (forum or GitHub)? I assume from your posts that you are part of FydeOS-- it would seem that the FydeOS , RaspberryPi and ChromeOS Arm64 communities might mutually benefit from sharing ideas with each other. Thanks again, and have a great week! PS,
a) Your Ubuntu example "Add A Linux" points out that interestingly one has to create an "empty"(?) container from the manage containers screen, then in virtual terminal shell (vsh) actually "delete" that container (which I presume doesn't really delete that container but just deletes the Linux operating system inside?) then you "launch" a new distribution into that previously deleted container (all works but the terminology seems confusing to a newbie). However, your later archlinux example doesn't show all of the same steps (creating then deleting, then launching) which might trip up some other newbies b) Your Ubuntu example screenshot indicates using the following syntax: "lxc launch images:ubuntu/jammy ubuntu". I preferred to use the newer noble version and couldn't get that to launch with that syntax. However, the syntax in your different text description "lxc launch Ubuntu:noble ubuntu" did work fine for me
A couple of missing punctuations that might trip up some of the newbies:
needs a ' at the end of it b) script line beginning:
should have terminal ' deleted
|
Beta Was this translation helpful? Give feedback.
-
Thank you very much, @DarkevilPT, again for all of your help. I'm going to try out FEX-emu this week and compare. If the game runs on that I'll take video shots of both to compare and report back. The limitations you mention sound frustrating but from my perspective (coming from the iOS iPad world) they are much less restrictive than Apple does (and the reason I just switched to ChromeOS after having two iPad Pros). On iOS we have two emulators that people use (iSH and UTM). For a long time, Apple banned both. iSH has been allowed on Apple store now for a little while but based on x86 and multiple bugs (cudos to the solitary developer who developed it on his own, and it is how I learned Linux but with no JIT and x86 and bugs just not practical). I've used UTM for a while on iOS which is a port of Qemu but Apple banned it for a long time. It is faster with JIT but needed to be side loaded although Apple just allowed the non-JIT version on its App Store. Non-JIT UTM is a neat concept but too slow to be really usable Linux, and Apple doesn't seem to be willing to allow JIT on its app store anytime soon. So, to now have a portable ChromeOS device that I don't have to sideload a Linux VM and can multiple programs and even has Vulkan (iOS's metal shaders puts a whole other layer of complexity) has made me very happy. I guess a matter of perspective :-) |
Beta Was this translation helpful? Give feedback.
-
Box64 vs FEX-Emu: Not a scientific comparison and sorry for my amateur video shots but FEX-Emu plays Wizardy better based on sample gameplay:
ChromeOS- Lenovo Duet 3- Snapdragon 7 series- Adreno GPU- 8G RAM/128G storage Test Game: Wine Prefix: Comparison videos: |
Beta Was this translation helpful? Give feedback.
-
Thanks-- I can try that. I could also try running wine + Box64 + dxvk in Termux app inside ChromeOS. I wasn't thinking that would be less overhead but maybe as the Android apps I use inside ChromeOS seem to run pretty fast. I don't though think anyone has gotten the virtio Vulkan driver to work thought inside Termux so would be software rendered. |
Beta Was this translation helpful? Give feedback.
-
When you are back from your holiday and get a chance: Yet, when I go back to my default Penguin Debian container and run alsamixer in it, it says appropriately my soundcard is PulseAudio and shows me a volume control. I tried removing and reinstalling alsa and pulseaudio with:
but that didn't seem to fix the problem. I was wondering if there is something else I should have installed when I initially setup the Ubuntu container. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thanks, @DarkevilPT , I'll try that today. Just double checking: download from the repository ppa:pipewire-debian and not Ubuntu? |
Beta Was this translation helpful? Give feedback.
-
@ptitSeb, mangohud sure is a nifty program-- I installed it. However, I don't think it is accurately capturing my GPU use since it remains at 0% the entire time I play (which doesn't seem possible unless it is being software rendered?). However, I don't think it is being software rendered because I couldn't even start the game before when I tried setting the driver to vulkan-lavapipe (the game would time out on the introductory screens). Thus, I'm thinking that maybe mangohud isn't accurately capturing the GPU because I'm using mesa's virtio-vulkan (Venus) that (if I understand correctly) passes Vulkan from DXVK inside the VM to Vulkan in ChromeOS to actually use on the Chromebook's GPU. CPU usage seems around 25%-- sometimes higher-- but I never saw it stay anywhere over 50% during combat. Thus, I'm still thinking it is limited by GPU speed inside of the VM (virtio-vulkan Venus being better than lavapipe but nowhere near on bare metal like you are getting outside of a VM). FPS averaging 2 fps even with virtio-vulkan :-( |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to make a compilation target for ARM-based Chromebooks running the included Linux runtime?
Beta Was this translation helpful? Give feedback.
All reactions