Retropie - An Arch Linux Guide!


7 posts
by r4_ » Mon Jun 03, 2013 4:06 pm
Hey everyone,
I recently wrote up a guide to recreate Retropie on Arch Linux. Additionally, I submitted some packages to the AUR to make this process a bit easier. Please feel free to comment and make suggestions for improving this.

Code: Select all
Retropie - Arch Linux Flavor
----------------------------
Description:
    A guide to build the Retropie setup on Arch Linux. This guide is not all
    encompassing. It is merely a basic setup to build a similar environment
    offered on the official Retropie install script.

Sections:
    i) AUR tools
    1) Install retroarch
        a) Configuration
    2) Install Emulators
    3) Install ROMs
    4) Install EmulationStation
        a) Configuration
        b) Themes
        c) Scraper
            i) Configuration
            ii) Downloading Boxart Images
    5) Launch EmulationStation at login
    6) Auto login at boot

----------------------------
Section i) AUR tools:
    This guide will make use of the AUR to ease the installation process.
    Several tools can be used, such as: packer, yaourt, cower, etc. Feel free
    to use the tool that you are most comfortable with.

Section 1) Install retroarch:
    Retroarch is found in the AUR.
        'packer -S retroarch-rbp-git'

    a) Configuration:
        Copy skeleton configuration file located at /etc/retroarch.cfg to
        ~/.retroarch.cfg
            'cp /etc/retroarch.cfg ~/.retroarch.cfg

        With your working joystick, configure your controller with the
        following command.
            'retroarch-joyconfig >> ~/.retroarch.cfg'

        Note: Ensuring your joystick is working will not be covered in this
        guide as this falls out of scope and there are plenty of other
        resources to help with this.

        Consult https://wiki.archlinux.org/index.php/RetroArch for more
        information.

Section 2) Install Emulators:
    There are several emulators for retroarch. You can get a list of them by
    issuing the command below. Install whatever is necessary.
        'packer -Ss libretro'

    Note: Some emulators may not work or may require manual building by
    downloading the associated tarball and issuing the command:
        'makepkg -Acs --asroot'
    then...
        'pacman -U /path/to/package'

Section 3) Install ROMs:
    Make directory and install ROMs to ~/roms/<system>.

    Example:
        mkdir -p ~/roms/snes
        cp /path/to/roms/* ~/roms/snes/
   

Section 4) Install EmulationStation:
    EmulationStation is found in the AUR.
        'packer -S emulationstation-git'

    a) Configuration:
        Taken from https://github.com/Aloshi/EmulationStation.

        ~/.emulationstation/es_systems.cfg: When first run, an example systems
        configuration file will be created at
        $HOME/.emulationstation/es_systems.cfg. This example has some comments
        explaining how to write the configuration file, and an example
        RetroArch launch command. See the "Writing an es_systems.cfg" section
        for more information.

        ~/.emulationstation/es_input.cfg: When you first start
        EmulationStation, you will be prompted to configure any input devices
        you wish to use. The process is thus:

        Press a button on any device you wish to use. This includes the
        keyboard. If you are unable to configure a device, hold a button on the
        first device to continue to step 2.

        Press the displayed input for each device in sequence. You will be
        prompted for Up, Down, Left, Right, A (Select), B (Back), Menu, Select
        (fast select), PageUp, and PageDown. If your controller doesn't have
        enough buttons to map PageUp/PageDown, it will be skipped.

        Your config will be saved to ~/.emulationstation/es_input.cfg. If you
        wish to reconfigure, just delete this file.

        NOTE: If ~/.emulationstation/es_input.cfg is present but does not
        contain any available joysticks or a keyboard, an emergency default
        keyboard mapping will be provided.

        As long as ES hasn't frozen, you can always press F4 to close the
        application.
       
    b) Themes:
        EmulationStation themes can be found in the AUR.
            'packer -S emulationstation-themes'

        To get a list of all themes available..
            'ls -l /usr/share/EmulationStation/themes/

        Create the necessary symlinks to the themes of interest.
            'ln -s /usr/share/EmulationStation/themes/snes ~/.emulationstation/'

        Consult http://aloshi.com/emulationstation for more information.

    c) Scraper:
        The scraper tool can be found in the AUR.
            'packer -S emulationstation-scraper'

        i) Configuration
               Open your systems config file ($HOME/.emulationstation/es_systems.cfg)
               and append the corresponding platform ID to each system:

               Example:
                   NAME=nes
                   DESCNAME=Nintendo Entertainment System
                   PATH=~/roms/nes/
                   EXTENSION=.nes
                   COMMAND=retroarch -L /path/to/core %ROM%
                   PLATFORMID=7
               
               A list of supported platforms can be found here.
                   https://github.com/elpendor/ES-scraper

        ii) Downloading Boxart Images
                Grab all boxart and descriptions by issuing the command below:
                    'scraper -m -w 275'

                The -m flag will put the tool in manual mode and prompt the user on
                which image to download if more than one result shows. The -w flag will
                modify the size of an image with a width larger than 275 pixels.

                Note: I highly suggest manual mode as to ensure it grabs the right
                      images.

                Consult https://github.com/elpendor/ES-scraper for more information.

Section 5) Launch EmulationStation at login:
    Taken from https://wiki.archlinux.org/index.php/Start_X_at_Login and
    adapted.

    Issue the command below to ensure EmulationStation starts at login.
        'echo '[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && emulationstation' >> ~/.bash_profile'

        Note: The single quotes around the string being echoed are important!

Section 6) Auto login at boot
    Taken from
    https://wiki.archlinux.org/index.php/Automatic_login_to_virtual_console.

    First create a new directory named getty@tty1.service.d under /etc/systemd/system:
        'mkdir /etc/systemd/system/getty@tty1.service.d'

    Then create a new file named autologin.conf and add it into the directory:
        /etc/systemd/system/getty@tty1.service.d/autologin.conf
        ---
        [Service]
        ExecStart=
        ExecStart=-/sbin/agetty --autologin <username> --noclear %I 38400 linux

----------------------------

Now you should have a working environment similar to what retropie offers but
in Arch Linux. Enjoy! :)
Posts: 3
Joined: Mon Jun 03, 2013 4:00 pm
by Aloshi » Mon Jun 03, 2013 11:34 pm
Awesome! You might want to put this on the RetroPie GitHub wiki, too. You shouldn't need any special permissions to make a page for it. :)
User avatar
Posts: 349
Joined: Sat Jun 23, 2012 6:42 pm
by ulysess » Tue Jun 04, 2013 7:58 am
r4_ wrote:Hey everyone,
I recently wrote up a guide to recreate Retropie on Arch Linux. Additionally, I submitted some packages to the AUR to make this process a bit easier. Please feel free to comment and make suggestions for improving this.


Cool! I post this thread on my blog if you don't mind :D
Mis apuntes de...Raspberry Pi: http://misapuntesde.com
Google Docs RPi: http://goo.gl/Iwhbq
Posts: 238
Joined: Thu Aug 02, 2012 6:35 am
Location: Spain
by r4_ » Tue Jun 04, 2013 1:12 pm
@Aloshi
Already in talks with Florian. I believe he will be adding it shortly.

@ulysess
Be my guest!
Posts: 3
Joined: Mon Jun 03, 2013 4:00 pm
by mattie47 » Thu Jun 13, 2013 8:57 am
Just wanted to say that's a really nice well written guide! :) While I'm not using Arch Linux, it's a lot of the core info without waffling on.
Posts: 9
Joined: Sun Jun 02, 2013 12:23 pm
by r4_ » Fri Jun 14, 2013 4:41 pm
Thanks! :)
Posts: 3
Joined: Mon Jun 03, 2013 4:00 pm
by tarasian666 » Sun Apr 27, 2014 6:49 am
Code: Select all
Makefile:384: recipe for target 'gfx/context/vc_egl_ctx.o' failed
make: *** [gfx/context/vc_egl_ctx.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
The build failed.
Posts: 1
Joined: Sun Apr 27, 2014 6:48 am