Understanding Lakka Duplicate Directory Structure

System files seem to be located in /tmp after install.

Where would be the best location to move them?
/storage/ or /storage/.config/retroarch/?


There are duplicate folders in 4 directories.

What are each of these directories used for?

/storage/
/storage/.config/retroarch/
/tmp/
/usr/share/

Directory Structure:

root
└─ storage
│   └─ .config
│   │   └─ retroarch
│   │      └─ assets
│   │      └─ autoconfig
│   │      └─ cores
│   │      └─ database
│   │      └─ overlays
│   │      └─ saves
│   │      └─ shaders
│   │      └─ states
│   │      └─ thumbnails
│   │      └─ content_favorites.lpl
│   │      └─ retroarch.cfg
│   │
│   └─ assets
│   └─ cores
│   └─ database
│   └─ playlists
│   └─ remappings
│   └─ roms
│   └─ savestates
│   └─ savefiles
│   └─ shaders
│   └─ system
│   └─ thumbnails
│
└─ tmp
│   (unknown why these are in temp folder)
│   └─ assets
│   └─ cores
│   └─ database
│   └─ joypads
│   └─ overlays
│   └─ shaders
│   └─ system
│
└─ usr
    └─ share
        (don't know what these are used for)
        └─ retroarch-assets
        └─ retroarch-overlays
        └─ retroarch-system

Lakka has mostly everything preinstalled (cores, database, assets …)

Everything in /tmp is a link to /usr/share/* and /usr/lib/*
So actually /tmp is empty and only used as a placeholder.

  • /usr/lib/libretro: cores and info files
  • /usr/share/libretro-database: database, cursor, cheats
  • usr/share/retroarch-assets/overlays/system: it does as the name suggests

In /storage/.config/retroarch are all the configuration files such as core overrides and configs.
Not sure what the other folders are for

The folders in /storage are for user provided content such as roms, custom assets, savegames and savestates …

3 Likes

This has explained everything, thanks.

2 Likes

The folders in /tmp are the mount points for the Overlay File System (overlayfs). This allows combining data from a read only file system with data from a writable file system.

This works by taking the read only folder ‘lower’ and overlaying the write enabled folder ‘upper’ on top. This way the mount point folder appears as the lower folder with updates or changes from the upper folder.

For example this is part of the configuration for the ‘cores’ folder:

[Mount]
What=none
Where=/tmp/cores
Type=overlay 
Options=lowerdir=/usr/lib/libretro,upperdir=/storage/cores,workdir=/storage/.tmp/cores-workdir

Retroarch is configured to look in /tmp/cores which includes any cores shipped in /usr/lib/libretro but you can also add or update cores by placing them in /storage/cores

2 Likes