Coder Social home page Coder Social logo

dev-0x7c6 / meta-retro Goto Github PK

View Code? Open in Web Editor NEW
22.0 6.0 9.0 1.25 MB

OpenEmbedded / Yocto software layer for RetroArch and libretro cores

License: MIT License

BitBake 97.27% Shell 2.10% C++ 0.08% Python 0.55%
retro-gaming embedded yocto yocto-layer retroarch kodi openembedded openembedded-layer meta-retro libretro

meta-retro's Introduction

OpenEmbedded / Yocto software layer for RetroArch and libretro cores

This layer provides RetroArch front-end and libretro cores emulators recipes for use with OpenEmbedded and/or Yocto.

Raspberry Pi 4 Poky build

Building

You can test this layer and distro (retro) with reference build environment on your host computer

user@localhost:~$ git clone --recursive https://github.com/dev-0x7C6/retro-build-environment.git
user@localhost:~$ cd retro-build-environment
user@localhost:~$ source source.me
user@localhost:~$ MACHINE="raspberrypi4" bitbake retro-image-full

Images

Image (recipe name) Retroarch Libretro cores Shaders Titles Cheats Themes Overlays
retro-image-full ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
retro-image-standard ✔️ ✔️ ✔️ ✔️
retro-image-minimal ✔️ ✔️ ✔️

Recomendation: retro-image-full

Tested platforms

Machine Layer Build against Runtime testing Notice
cubietruck meta-sunxi Often Rarely Unable to run kms with lima(mesa)
intel-core2-32 meta-intel Often Sometimes As pendrive dongle
intel-corei7-64 meta-intel Often Sometimes As pendrive dongle
orange-pi-pc meta-sunxi Often Rarely ---
raspberrypi3-64 meta-raspberrypi Often Sometimes ---
raspberrypi3 meta-raspberrypi Often Sometimes ---
raspberrypi4-64 meta-raspberrypi Always Often ---
raspberrypi4 meta-raspberrypi Always Often ---
rock-pi-4a meta-rockchip Often None Thanks to @MarkusVolk for sending patches

Distro features

Meta-retro introduced a collection of switches that can be set by DISTRO_FEATURES in local.conf or distro.conf

RetroArch and system features:

  • retroarch-automount - added extra automounting in /var/run/media
  • retroarch-autostart - enabling systemd RetroArch startup as main graphics.target
  • retroarch-online - compile RetroArch with online capabilities
  • retroarch-updater - compile RetroArch with update capabilities

Graphical capabilities:

  • retroarch-gles - enable for OpenGLES 2.0 support in retroarch and libretro cores
  • retroarch-gles3 - enable for OpenGLES 3.0 support in retroarch and libretro cores
  • retroarch-opengl - enable for OpenGL >= 2.0 support in retroarch and libretro cores
  • vulkan - enable for Vulkan support in retroarch and libretro cores

Customizable variables

There is a collection of variables that can be set in local.conf or distro.conf:

Default drivers

  • RETROARCH_DEFAULT_INPUT_DRIVER - default is udev
  • RETROARCH_DEFAULT_JOYPAD_DRIVER - default is udev
  • RETROARCH_DEFAULT_VIDEO_DRIVER - default is gl
  • RETROARCH_DEFAULT_VIDEO_CONTEXT - default is kms-egl
  • RETROARCH_DEFAULT_AUDIO_DRIVER - default is pulseaudio or alsathread
  • RETROARCH_DEFAULT_RESAMPLER_DRIVER - default is sinc
  • RETROARCH_DEFAULT_MENU_DRIVER - default is ozone

Configuration

  • RETROARCH_CONFIG_FULLSCREEN - default is true, go for fullscreen mode, this respects initial resolutions (tested with rpi4)
  • RETROARCH_CONFIG_THREADED_VIDEO - default is true, use another thread for renderer
  • RETROARCH_CONFIG_AUDIO_LATENCY - default is 256, stock value is 64, I got better performance with higher values on rpi platforms

Video settings

  • RETROARCH_CONFIG_FONT_SIZE

Themes

  • RETROARCH_CONFIG_XMB_SHADOWS
  • RETROARCH_CONFIG_XMB_THEME_COLOR
  • RETROARCH_CONFIG_XMB_THEME_INDEX

For more information see file: retroarch.inc

Layer dependencies

Layer Sublayer Required Software Recommended BSPs
openembedded-core meta ✔️ ✔️
meta-openembedded meta-oe ✔️ ✔️
↪️ meta-multimedia ✔️ ✔️
↪️ meta-python ✔️ ✔️
↪️ meta-networking ✔️ ✔️
meta-python2 . ✔️ ✔️
meta-qt5 . ✔️ ✔️
meta-kodi . ✔️
meta-raspberrypi . ✔️ ✔️
meta-raspberrypi-extras . ✔️ ✔️
meta-intel . ✔️ ✔️
meta-rockchip . ✔️ ✔️

Patches

Please submit patches against the dev-0x7C6/meta-retro layer by pull requests.

Adding the meta-retro layer to your build

In order to use this layer, you need to make the build system aware of it.

Assuming the meta-retro layer exists at the top-level of your yocto build tree, you can add it to the build system by adding the location of the meta-retro layer to bblayers.conf, along with any other layers needed. e.g.:

BBLAYERS ?= " \
  /path/to/yocto/meta \
  /path/to/yocto/meta-yocto \
  /path/to/yocto/meta-yocto-bsp \
  /path/to/yocto/meta-retro \
"

meta-retro's People

Contributors

dev-0x7c6 avatar hansenlabs avatar jclsn avatar markusvolk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

meta-retro's Issues

Error building

 Processing files: retroarch-assets-2021+git0+ee33f8ef69-r0.noarch
| error: File not found: /home/builderuser/retro-build-environment/build/tmp/work/all-poky-linux/retroarch-assets/2021+gitAUTOINC+ee33f8ef69-r0/package/usr/share/retroarch/assets/xmb/daite/png/Nintendo - Wii ?Motion?.png

Other errors related to Wii png assets follow.

this is how it ends.

| DEBUG: Python function do_package_write_rpm finished
ERROR: Task (/home/builderuser/retro-build-environment/layers/meta-retro/recipes-retroarch/retroarch-assets/retroarch-assets.bb:do_package_write_rpm) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4060 tasks of which 0 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/builderuser/retro-build-environment/layers/meta-retro/recipes-retroarch/retroarch-assets/retroarch-assets.bb:do_package_write_rpm
Summary: There were 48 WARNING messages.
Summary: There was 1 ERROR message, returning a non-zero exit code.

Built on an Ubuntu 20.04 Docker image. Commit is cb9ca62ddff4ee0c185a0a3e906696c7ce340b4c

Thank you very much,

Could not find compiler "gcc" in PATH

By following the build instructions I get this error:

ERROR: Error running gcc --version: ccache: error: Could not find compiler "gcc" in PATH

after entering

MACHINE="raspberrypi3" bitbake retro-image-full

I am on Ubuntu 20.04.

Validated host distributions list

What are the distributions that are validated to build this?

I am trying on Ubuntu 22.04 and getting this warning

WARNING: Host distribution "ubuntu-22.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.

Would it be possible to have a list of supported build systems?
Specifically, my build is failing with
ERROR: Error running gcc --version: ccache: error: Could not find compiler "gcc" in PATH
I do have both gcc and ccache installed and in the host system's path for what it's worth it.

Thank you,

retroarch: linker error

Hi,
i just tried to build your reference distribution for my rock pi. There were some minor issues but finally it built and is running awesome. Thanks for the great work. In a second step i switched from retro-image-minimal to retro-image-full to test if it still can be built and for some reason had a linker error in the retroarch build this time:

libHLSL.a(hlslParseables.cpp.o): undefined reference to symbol '_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc@@GLIBCXX_3.4.21'
libstdc++.so.6: error adding symbols: DSO missing from command line

I didn't have to search long for the reason. In retroarch Makefile line 2 is a switch for setting the linker to g++ that is disabled by default. Changing NEED_CXX_LINKER?=0 to NEED_CXX_LINKER?=1 did do the trick.

I thought about fixing this with a line 'EXTRA_OEMAKE += "NEED_CXX_LINKER=1"' in retroarch.inc. If that would be a proper solution for you i will send a pull request

Are you interested in supporting rockchip boards? If so i also could send a pull request to retro-build-environment. There are some minor drawbacks. Arms trusted-firmware-a refused to build with ccache enabled. Not sure why this is. Maybe because this is not c++ but baremetal. It wont build with gatesgarth but works with current poky master because changes to the rock-pi devicetree are needed that require kernel 5.10 and therefore also a recent uboot source is needed. For the same reason there needs a patch to be merged into meta-rockchip. But i guess all of those issues will be fixed once the buildsystem gets ported to Hardknott.

I had two unbuildable cores but didn't have a closer look at the problem yet and only disabled them for now

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.