Device depentency of libretro cores in EMUELEC?

after giving a test to replace default version of libretrocore, eg. mame2016_libretro.so by another latest version that is renamed mame(current)_libretro.so of another linux devices to the same (mame2016_libretro.so), I found out it’s not working with below error message in log report.
Is the core of libretro in EMUELEC device-dependent due to specific compiling, like each one of S905X4 and the ealiers from other linux devices?

[INFO] RetroArch 1.13.0 (Git 0bf818af8d)
[INFO] === Build =======================================
[INFO] CPU Model Name: Amlogic S905X4 rev d

[INFO] Capabilities: ASIMD
[INFO] Built: Nov 20 2022
[INFO] Version: 1.13.0
[INFO] Git: 0bf818af8d
[INFO] =================================================
[INFO] [Input]: Found input driver: “udev”.
[INFO] [Core]: Loading dynamic libretro core from: “/tmp/cores/mame2016_libretro.so”
[ERROR] Failed to open libretro core: “/tmp/cores/mame2016_libretro.so”
Error(s): /tmp/cores/mame2016_libretro.so: wrong ELF class: ELFCLASS32
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [Core]: Unloading core symbols…

any take on this error? Thanks.

the file you have copied is in 32-bit. You need to compile it in the EmuELEC toolchain.

Got it and it sounded like a huge effort w/ disk space required, according to wiki. Thanks for reply :slight_smile:

https://github-wiki-see.page/m/EmuELEC/EmuELEC/wiki/DEV:-How-to-compile-toolchain-only

They are “device”-dependent in the sense of a “device” in our build system, but not each actual device.

The device name is included in the image name, e.g. EmuELEC-Amlogic-ng.aarch64-4.6-Generic.img.gz is for device Amlogic-ng and sub-device Generic, the former of which decided the things built and compatible on the application layer, whereas the latter of which decided the packed-in stuffs to determine which actual device it could be run on.

The sub-device idea is from CE and its purpose is to save build time, but we never actually expand that in EE so it’s only for Amlogic-ng device.

For rockchip devices, each of them are built seperately and thus you can’t swap around stuffs like between Amlogic-ng devices.

clear exactly. thanks

Hi @Langerz82 / @7Ji , truly wondering how / where to get the source build of retroarch cores when I intend to compile latest core in toolschain. eg. “kronos” which i saw its at info file “kronos_libretro”?
grab the build of cores in retroarch or each emulator’s release?

for example: PROJECT=Amlogic-ng ARCH=aarch64 DISTRO=EmuELEC ./scripts/build **kronos**

thanks for reply.

Took a peek inside our existing source and there’s no package providing that core (or maybe I’m wrong, shanti would have a better idea of what cores we have for now but I don’t want to ping him).

You would need to add it by yourself under packages, a subfolder kronos under appropriate folder and a file package.mk (actually in Bash syntax and do Bash stuffs, not Makefile syntac even with .mk suffix) following the format documented in packages/README.md is enough.

Is not included, nor it will be included anytime soon, it does not run well.

kronos_libretro is part of the cores info package, which include all the info files for ALL the Retroarch cores, but that does not mean that the core itself is included in EmuELEC.

Hi @7Ji ,
truly sorry it’s quite new to me, speaking of “packages” and I can’t get your point in detail for next steps as I have built the core of kronos via toolchains that is placed in the folder “kronosxxxxxxxxx” like shantigilbert mentioned in wiki (DEV: How to compile toolchain only · EmuELEC/EmuELEC Wiki · GitHub) by “… ~ resulting core will be in build.xxxxxxxxx/flycast-xxxxxxx folder…”.

any instruction or resources of document in detail to help step forward? what i wonder is to connect the retroarch core (like kronos) that build via toolchains for copying it to /tmp/cores folder of the device.

Much appreciated for kind and prompt reply w/ share. :pray:

the system when it boots copies all libretro cores from /usr/lib/libretro to /tmp/cores. You shouldn’t copy manually to /tmp/cores as that is basically a ram drive and wipes each reboot.

Hi @Langerz82 ,
truly sorry to let you get me wrong likely, what i exactly inquired is about creating package.mk of the core i compiled in toolchains instead of how /where to copy the libretro core.

anyway, thanks for reply and share. :slight_smile:

EmuELEC\packages\sx05re\libretro is where you want to put a new core. Look at the other package.mk files in it and they will show you how its done for example:

makeinstall_target() {
  mkdir -p $INSTALL/usr/lib/libretro
  cp [new_core]_libretro.so $INSTALL/usr/lib/libretro/
}

Cheers and best of luck.

thanks, will give it a try. :slight_smile: