Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which cmake option to use with Raspberry pi 5? #884

Open
martinerk0 opened this issue Nov 6, 2023 · 16 comments
Open

Which cmake option to use with Raspberry pi 5? #884

martinerk0 opened this issue Nov 6, 2023 · 16 comments

Comments

@martinerk0
Copy link

I see in cmake there is:
add_definitions(-marm -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard)

but rpi 5 has Cortex-A76.

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 6, 2023

I don't have a PI5, so I haven't not added a profile.
Also, it might depend wich OS you are using: if I understood correctly, RPiOs for RPI5 is using a 16K page size (instead of the default 4K used on x86), while ubuntu still use a 4K page size?
So, you can use profile a generic ARM64 profile for now. But you might also need to use PAGE16K switch too. And a finale not: while box64 support different pagesize, most x86 program are designed for a 4K pagesize, and box64 doesn't not emulate 4K page, so many things (like wine) will not work on 16K pagesize (some linux games do works).

@martinerk0
Copy link
Author

I'm getting:
box86: error while loading shared libraries: libm.so.6: ELF load command address/offset not page-aligned
when running box86, I didn't get that while trying it on RPi 4, do you think it might be because of the 16K page size?
I will try the Ubuntu next, which should have 4K page as you said.

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 6, 2023

Oh, yeah! I forgot that I have not added custom pagesize in box86, it's only on box64 for now!

@martinerk0
Copy link
Author

martinerk0 commented Nov 6, 2023

I'm able to run steam launcher with Ubutnu 23.10 now.
I've compiled from source using generic profile box86, box64 and then ran install_steam.sh

BTW, where does the install script install the steam?
I thought you need
sudo dpkg - steam_latest.deb
To install it.

and with your script I got
mv: cannot move './usr/bin' to '../bin': Directory not empty mv: cannot move './usr/lib' to '../lib': Directory not empty mv: cannot move './usr/share' to '../share': Directory not empty

I then downloaded steam from website and used dpkg -i but after trying to run Counter Strike I got:
Failed to create SDL window

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 6, 2023

you don't need to install steam_latest.deb because it might install i386 arch and setup qemu-user which will conflict with box86.

the install_steam.sh script install steam in ~/.steam and create a startup script in /usr/local/bin/steam

@martinerk0
Copy link
Author

I see. For some reason the install_steam.sh didn't create ~/steam directory, but when I tried commands from it one by one it worked.
BTW what is this line supposed to do? ~/steam/bin/steam $@" > steam
What is purpose of $@ here? Because I think echo expands it to nothing.

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 7, 2023

Ah, I should have escape the $ and @, because that needs to go inside steam shell script, and is not supposed to be interpreted there. I'll try to fix the script later.
It's not mandory, but it's needed if you plan to launch steam game from command line. If you just plan to use the GUI of steam, it's ok.

@martinerk0
Copy link
Author

I ran Counter Strike on large display, so that's nice 👏 I will try more games later. I guess with newer games and higher proton versions there is chance that there is some incompatibility between ubuntu's 23.10 mesa and proton?
Do some games like Witcher 3 need Wine? I thought proton is essentially Wine for games.

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 7, 2023

Witcher 3 is a windows only game, so it'll use Proton on steam yes.

@martinerk0
Copy link
Author

Do I need som other variables set? I have:

#!/bin/bash
export STEAMOS=1
export STEAM_RUNTIME=1
export DBUS_FATAL_WARNINGS=0

in /usr/bin/local/steam

Screenshot from 2023-11-07 14-48-24

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 7, 2023

On PI, you might want to add MESA_GL_VERSION_OVERRIDE=3.3 because I think opengl is still 2.1 only even on PI5?

(side note: Elden Ring will not work, it use EAC and it's not supported on box86/box64 for now)

@martinerk0
Copy link
Author

Using glxinfo:

OpenGL core profile version string: 3.1 Mesa 23.2.1-1ubuntu3
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.2.1-1ubuntu3

@ptitSeb
Copy link
Owner

ptitSeb commented Nov 7, 2023

Yeah, but most Unity3D games needs at least OpenGL 3.3 to work, so my suggestion still applies.

@ComTols
Copy link

ComTols commented Apr 26, 2024

I have read all your comments but didn´t understand how to compile on Raspberry Pi 5. How can I set the PAGE16K? I tryed this:

$ mkdir build; cd build; cmake .. -DARM64=1 -DPAGE16K=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo

-- Found Python3: /usr/bin/python3 (found version "3.11.2") found components: Interpreter
-- The C compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-linux-gnueabihf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    PAGE16K


-- Build files have been written to: /home/comtols/Downloads/box86/build

As you see this flag was not accepted. But when i run make, I got tones of notes and warnings.

Sry if this is a dump question, but I don´t understand it.

@KreitinnSoftware
Copy link
Contributor

-RPI5ARM64PS16K -DARM_DYNAREC=1

@ptitSeb
Copy link
Owner

ptitSeb commented Apr 26, 2024

There is no 16k pagesize option in box86.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants