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

Entire RPI Userland unnecessarily(?) brought in for CRT Switch Res #9966

Open
dankcushions opened this issue Jan 8, 2020 · 3 comments · May be fixed by #15972
Open

Entire RPI Userland unnecessarily(?) brought in for CRT Switch Res #9966

dankcushions opened this issue Jan 8, 2020 · 3 comments · May be fixed by #15972

Comments

@dankcushions
Copy link
Contributor

#8132

image

Surely the RPI Userland already exists on RPI platforms, so does not need to be in Retroarch for us to make use of it? What happens when it is updated upstream? This seems like a whole bunch of bloat that we don't need or want, right?

Tagging @alphanu1

@alphanu1
Copy link
Contributor

alphanu1 commented Jan 10, 2020

You do have a fair point.

Userland source is usually located in /opt/vc/lib. However depending on your distro this may not be the case. This guarantees that the source will compile regardless of your distro and the Userland source location. I'm sure in most cases it will compile fine using /opt/vc/lib as the include but not always. In the small % of cases were it does not, we would need to include a guide on how to download the source or move it to the correct location and then link it.

If the consensus is to remove the Userlane source from RetroArch and change the include please bear the above in mind.

@dankcushions
Copy link
Contributor Author

Thanks for coming back @alphanu1 :)

I think the assumption about library locations is already catered for in Retroarch, which already had various videocore/dispmanx hooks. see here:

if [ "$HAVE_VIDEOCORE" != "no" ]; then
check_pkgconf VC_TEST bcm_host
# use fallback if pkgconfig is not available
if [ -z "$VC_TEST_LIBS" ]; then
[ -d /opt/vc/lib ] && add_dirs LIBRARY /opt/vc/lib /opt/vc/lib/GL
check_lib '' VIDEOCORE -lbcm_host bcm_host_init "-lvcos -lvchiq_arm"
else
add_opt VIDEOCORE "$HAVE_VC_TEST"
fi
fi
if [ "$HAVE_VIDEOCORE" = 'yes' ]; then
HAVE_OPENGLES='auto'
VC_PREFIX='brcm'
INCLUDES="${INCLUDES} opt/vc/include"
# use fallback if pkgconfig is not available
if [ -z "$VC_TEST_LIBS" ]; then
[ -d /opt/vc/include ] && add_dirs INCLUDE /opt/vc/include
[ -d /opt/vc/include/interface/vcos/pthreads ] && add_dirs INCLUDE /opt/vc/include/interface/vcos/pthreads
[ -d /opt/vc/include/interface/vmcs_host/linux ] && add_dirs INCLUDE /opt/vc/include/interface/vmcs_host/linux
EXTRA_GL_LIBS="-lbrcmEGL -lbrcmGLESv2 -lbcm_host -lvcos -lvchiq_arm"
fi
fi

looks like it looks for the package via

# check_pkgconf:
, and then falling back on the usual locations if it can't find it.

if you need additional userland libraries you could do a similar approach?

@dankcushions
Copy link
Contributor Author

bumping this - whenever i want to search for something in this repo via github i'm reminded of it, as you get so much noise from the vast raspi userland :(

@zoltanvb zoltanvb linked a pull request Dec 1, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants