[solved] kodi-rpi - controller + libretro

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

[solved] kodi-rpi - controller + libretro

Postby mcarni » Tue Jan 10, 2023 2:46 pm

Guys,

i might need a little support with setting up kodi...
i was running raspberrypi OS 64 and Libreelec on my raspberrypi4 but i wanted to try something more new so i decided to move to archlinuxarm, please bear with me if questions are noobish

i have been playing with it for the last 3 days, silly me, i struggled a bit with group permission but eventually i made it and now I have a working kodi system.
I would say this is already an achievement... anyway, there are 2 things which I need to fix:

$this->bbcode_list('1')
  • i cannot get the logitech gamepads to be detected by kodi
    the system detects them, but when i try to set the game controller for kodi no button is detected.

    in /usr/share/kodi/addons i see a game.controller.default (version 1.0.35)

    this is ls -la /dev/input/by-id/:
    $this->bbcode_second_pass_code('', '...
    lrwxrwxrwx 1 root root 9 Dec 22 02:37 usb-Logitech_Wireless_Gamepad_F710_C57692EE-event-joystick -> ../event7
    lrwxrwxrwx 1 root root 6 Dec 22 02:37 usb-Logitech_Wireless_Gamepad_F710_C57692EE-joystick -> ../js1
    lrwxrwxrwx 1 root root 9 Dec 22 02:37 usb-Logitech_Wireless_Gamepad_F710_F2B896E8-event-joystick -> ../event6
    lrwxrwxrwx 1 root root 6 Dec 22 02:37 usb-Logitech_Wireless_Gamepad_F710_F2B896E8-joystick -> ../js0
    ..
    ')

    if i run evtest :
    $this->bbcode_second_pass_code('', 'No device specified, trying to scan all of /dev/input/event*
    Not running as root, no devices may be available.
    Available devices:
    /dev/input/event0: SONiX OMOTON MK201 Gaming Keyboard
    /dev/input/event1: SONiX OMOTON MK201 Gaming Keyboard
    /dev/input/event2: SONiX OMOTON MK201 Gaming Keyboard
    /dev/input/event3: SONiX OMOTON MK201 Gaming Keyboard Mouse
    /dev/input/event4: vc4
    /dev/input/event5: vc4
    /dev/input/event6: Logitech Gamepad F710
    /dev/input/event7: Logitech Gamepad F710')
  • i would like to be able to use retroplayer to play libretro cores with kodi (once i setup the controller ;) )
    on libreelec i used to get the cores from https://github.com/zach-morris/kodi_libretro_buildbot_game_addons
    this repository fails to be added with: $this->bbcode_second_pass_quote('', '2')023-01-10 15:02:33.793 T:695 error <general>: Repository add-on repository.kodi_libretro_buildbot_game_addons uses old schema definition for the repository extension po>
    2023-01-10 15:02:33.793 T:695 error <general>: Repository add-on repository.kodi_libretro_buildbot_game_addons does not have any directory and won't be able to update/se>


  • should I instead install one of the libretro packages that pacman -Ss suggests? and they will be detected by kodi?
    any suggestion would be appreciated
    especially some guidance if I have to compile any addon myself, i have never compiled anything major...

    thanks in advance

    I am running:
    $this->bbcode_second_pass_code('', 'pacman -Qs kodi
    local/kodi-rpi-git 20.x.61830.f7d0f8956e-1
    Media player and entertainment hub with hw accel for RPi 3/4/400, gbm_nexus fork
    local/kodi-rpi-git-eventclients 20.x.61830.f7d0f8956e-1
    Kodi Event Clients')

    and
    $this->bbcode_second_pass_code('', 'pacman -Qs linux-rpi
    local/linux-rpi 6.1.4-1
    RPi Foundation patched Linux kernel and modules
    local/linux-rpi-headers 6.1.4-1
    RPi Foundation header and scripts for building modules for Linux kernel')

    m
    Last edited by mcarni on Mon Jan 16, 2023 7:46 pm, edited 1 time in total.
    mcarni
     
    Posts: 19
    Joined: Fri Jul 23, 2021 9:54 am

    Re: kodi-rpi - controller + libretro

    Postby graysky » Tue Jan 10, 2023 3:10 pm

    You might consider asking on the kodi forums. https://forum.kodi.tv/forumdisplay.php?fid=166
    graysky
    Developer
     
    Posts: 1876
    Joined: Sun Jun 26, 2011 6:56 am
    Location: /run/user/1000

    Re: kodi-rpi - controller + libretro

    Postby mcarni » Tue Jan 10, 2023 4:32 pm

    OK,

    done https://forum.kodi.tv/showthread.php?tid=371211

    I will report here any info i get in case it can help others....


    thanks

    M
    mcarni
     
    Posts: 19
    Joined: Fri Jul 23, 2021 9:54 am

    Re: kodi-rpi - controller + libretro

    Postby mcarni » Thu Jan 12, 2023 9:31 pm

    $this->bbcode_second_pass_quote('graysky', 'Y')ou might consider asking on the kodi forums. https://forum.kodi.tv/forumdisplay.php?fid=166


    i tried to solve my issue by studying how to build/compile ... i studied a bit (couple of days :? ) the archwiki and took a deep look at similar packages/addons already in the repo

    i made 2 PKGBUILD files which i managed to package and install... and i amazed myself when they actually worked

    I am dropping them here, it was my first time so I am not sure they are done "the right way" but i hope they can help others
    I will work more on these... for example I guess I will have to learn how to make the updates automatic

    if there are no question, I guess i can mark this as solved...

    thanks
    M

    kodi-peripheral-joystick:
    $this->bbcode_second_pass_code('', '# Maintainer: xxx <xxx DOT xxx AT xxx DOT xxx>

    pkgname=kodi-peripheral-joystick
    pkgver=20.1.0
    _codename=Nexus
    pkgrel=1
    pkgdesc="This add-on provides joystick drivers and button mapping services for Kodi. It uses the Peripheral API added to Kodi as part of PR 8807"
    arch=('any')
    url="https://github.com/xbmc/peripheral.joystick"
    license=('GPL2')
    groups=('kodi-addons' 'kodi-peripheral')
    makedepends=('cmake' 'kodi-dev' 'tinyxml')
    options=(!lto debug)
    source=("$pkgname-$pkgver.tar.gz::https://github.com/xbmc/peripheral.joystick/archive/refs/tags/$pkgver-$_codename.tar.gz")
    sha512sums=('c5016f74bee316e5b25686420125397cb1840de72be4e9a11390a1338ad920b93d2e8cf36e845feb82aba826a425152dcb621a9ef1b6aea6259d9423283957d9')

    build() {
    cd "peripheral.joystick-$pkgver-$_codename"
    cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=1 \
    -DUSE_LTO=1 \
    .
    make
    }

    package() {
    depends=('kodi-rpi-git' 'tinyxml')
    cd "peripheral.joystick-$pkgver-$_codename"
    make DESTDIR="$pkgdir/" install
    }')

    kodi-addon-game-libreto:
    $this->bbcode_second_pass_code('', '# Maintainer: xxx <xxx DOT xxx AT xxx DOT xxx>

    pkgname=kodi-addon-game-libretro
    pkgver=20.1.0
    _codename=Nexus
    pkgrel=1
    pkgdesc="This add-on provides a wrapper that allows Libretro cores to be loaded as game add-ons"
    arch=('any')
    url="https://github.com/kodi-game/game.libretro"
    license=('GPL2')
    groups=('kodi-addons' 'kodi-addons-game')
    makedepends=('cmake' 'libretro-core-info' 'kodi-platform' 'kodi-dev')
    options=(!lto debug)
    source=("$pkgname-$pkgver.tar.gz::https://github.com/kodi-game/game.libretro/archive/refs/tags/$pkgver-$_codename.tar.gz")
    sha512sums=('df1ea78b978a753b8698e808cd241fafc34d731e38d4f165b713e2bb836e9b1353ea6d8506e2f4915116e5e430286903615faa7eb6c3526f163e7cba88cedabf')

    build() {
    cd "game.libretro-$pkgver-$_codename"
    cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=1 \
    -DUSE_LTO=1 \
    .
    make
    }

    package() {
    depends=('kodi-rpi-git' 'kodi-platform' 'libretro-core-info')
    cd "game.libretro-$pkgver-$_codename"
    make DESTDIR="$pkgdir/" install
    }')
    mcarni
     
    Posts: 19
    Joined: Fri Jul 23, 2021 9:54 am

    Re: kodi-rpi - controller + libretro

    Postby graysky » Fri Jan 13, 2023 9:58 am

    They these are of general utility to others, and if you haven't yet, consider submitting them to the AUR. On change though would be defining a few values in the arches array like archet=(aarch64 x86_64 armv7h)
    graysky
    Developer
     
    Posts: 1876
    Joined: Sun Jun 26, 2011 6:56 am
    Location: /run/user/1000

    Re: kodi-rpi - controller + libretro

    Postby mcarni » Sat Jan 14, 2023 10:57 am

    @graysky, i will be happy to give back to the community...
    i have been helped a lot... it is the least i can do...
    i started looking into the AUR guidelines, i will have a couple of more questions...
    if they don't fit here, i can mark this as solved an open a new thread later... please let me know what would be the best...
    and it might take some more days... weekend is going to be hectic...

    on the bright side, i made a quick test PKGBUILD for one of the libretro cores (nestopia) kodi addons and it works fine...

    thanks for everything

    M
    mcarni
     
    Posts: 19
    Joined: Fri Jul 23, 2021 9:54 am

    Re: kodi-rpi - controller + libretro

    Postby graysky » Sat Jan 14, 2023 11:03 am

    You can post here or since these addons are not unique to archarm, ie they will work on arch linux (x86_64) you can post to the main arch bbs/aur section. That is a pretty active community.
    graysky
    Developer
     
    Posts: 1876
    Joined: Sun Jun 26, 2011 6:56 am
    Location: /run/user/1000

    Re: kodi-rpi - controller + libretro

    Postby mcarni » Mon Jan 16, 2023 6:48 pm

    hi @graysky,
    I cleaned a bit the PKGBUILDs by fixing the arch plus I reread the wiki and searched AUR and the repos
    sorry for being such a noob, I still have a couple of doubts:

    kodi-peripheral-joystick

    Not available in x86_64, armv7hf, aarch64 repos
    Not available in AUR

    source is:
    https://github.com/xbmc/peripheral.joystick
    release 20.1.0-Nexus - 01/01/2022

    my PKGBUILD builds and installs fine

    2 little doubts:

    - I saw on the source github that it depends on tinyxml.
    I added the dependency on both the makedepends and package depends, is it really needed?
    or better explained, i saw the depends in the github source, is there a better way to know the dependencie?

    - in the package depends I have kodi-rpi, is there a possibility to have alternative depends?
    I am thinking that if it was possible to have both kodi-rpi and kodi-rpi-git, the same package should work for both.
    Or possibly the same package could work also for standard kodi on non-arm architectures


    kodi-addon-game-libretro

    similar package for x86_64 available in the repos:
    https://archlinux.org/packages/community/x86_64/kodi-addon-game-libretro/

    but it is for Kodi 19.0.2-Matrix (and for x86_64)

    the PKGBUILD I prepared is for 20.1.0-Nexus - 01/01/2022
    [url]from https://github.com/kodi-game/game.libretro[/url]


    similar package in AUR:
    https://aur.archlinux.org/packages/kodi-addon-game-libretro-git

    but it is from git and installs a couple of cores (if I understand how it works, have not tried it..)
    like: game.libretro.gambatte game.libretro.snes9x game.libretro.scummvm game.libretro.yabause game.controller.snes
    which in my mind, make sense to keep separate

    question/doubt:
    - similar to my doubt above, if there a possibility to have both kodi and kodi-rpi in package depends then i guess 1 package could work (probably the Kodi 19.0.2-Matrix for x86_64 could just be updated)



    kodi-addon-game-libretro-nestopia

    there is basically the same package in repos but only for 'x86_64'

    no kodi-addon nestopia in AUR or as a armv7hf, aarch64

    silly question but not sure what is the best way
    - should i try to contact the maintainer of the x86_64 package and see if he can add arm architectures or it makes sense to have an additional package?

    the same applies for most of the other cores


    I was trying to compile some more core, including the ones that are not available for x86_64 but i got a couple of failures, so the path is still long...

    I also got distracted by the fact that steamlink doesn't work... so i might need to focus on that a bit now...but that is for another thread

    in any case, these are the PKGBUILD's, please feel free to let me have your comment
    later I will post also on the regular arch AUR forum and try to get all this sorted out

    super thanks

    M

    kodi-peripheral-joystick:
    $this->bbcode_second_pass_code('', '
    # Maintainer: xxx <xxx DOT xxx AT xxx DOT xxx>

    pkgname=kodi-peripheral-joystick
    pkgver=20.1.0
    _codename=Nexus
    pkgrel=1
    pkgdesc="This add-on provides joystick drivers and button mapping services for Kodi. It uses the Peripheral API added to Kodi as part of PR 8807"
    arch=('armv7h' 'aarch64')
    url="https://github.com/xbmc/peripheral.joystick"
    license=('GPL2')
    groups=('kodi-addons' 'kodi-peripheral')
    makedepends=('cmake' 'kodi-dev' 'tinyxml')
    options=(!lto debug)
    source=("$pkgname-$pkgver.tar.gz::https://github.com/xbmc/peripheral.joystick/archive/refs/tags/$pkgver-$_codename.tar.gz")
    sha512sums=('c5016f74bee316e5b25686420125397cb1840de72be4e9a11390a1338ad920b93d2e8cf36e845feb82aba826a425152dcb621a9ef1b6aea6259d9423283957d9')

    build() {
    cd "peripheral.joystick-$pkgver-$_codename"
    cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=1 \
    -DUSE_LTO=1 \
    .
    make
    }

    package() {
    depends=('kodi-rpi' 'tinyxml')
    cd "peripheral.joystick-$pkgver-$_codename"
    make DESTDIR="$pkgdir/" install
    }')

    kodi-addon-game-libretro:
    $this->bbcode_second_pass_code('', '# Maintainer: xxx <xxx DOT xxx AT xxx DOT xxx>

    pkgname=kodi-addon-game-libretro
    pkgver=20.1.0
    _codename=Nexus
    pkgrel=1
    pkgdesc="This add-on provides a wrapper that allows Libretro cores to be loaded as game add-ons"
    arch=('armv7hf' 'aarch64')
    url="https://github.com/kodi-game/game.libretro"
    license=('GPL2')
    groups=('kodi-addons' 'kodi-addons-game')
    makedepends=('cmake' 'libretro-core-info' 'kodi-platform' 'kodi-dev')
    options=(!lto debug)
    source=("$pkgname-$pkgver.tar.gz::https://github.com/kodi-game/game.libretro/archive/refs/tags/$pkgver-$_codename.tar.gz")
    sha512sums=('df1ea78b978a753b8698e808cd241fafc34d731e38d4f165b713e2bb836e9b1353ea6d8506e2f4915116e5e430286903615faa7eb6c3526f163e7cba88cedabf')

    build() {
    cd "game.libretro-$pkgver-$_codename"
    cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=1 \
    -DUSE_LTO=1 \
    .
    make
    }

    package() {
    depends=('kodi-rpi' 'kodi-platform' 'libretro-core-info')
    cd "game.libretro-$pkgver-$_codename"
    make DESTDIR="$pkgdir/" install
    }')

    kodi-addon-game-libretro-nestopia:
    $this->bbcode_second_pass_code('', '# Maintainer: xxx <xxx DOT xxx AT xxx DOT xxx>

    pkgname=kodi-addon-game-libretro-nestopia
    pkgver=1.51.1.26
    _codename=Matrix
    pkgrel=1
    pkgdesc="This add-on provides a wrapper that allows Libretro cores to be loaded as game add-ons"
    arch=('aarch64' 'armv7h')
    url="https://github.com/kodi-game/game.libretro.nestopia"
    license=('GPL2')
    groups=('kodi-addons' 'kodi-addons-game')
    makedepends=('cmake' 'kodi-dev' 'kodi-addon-game-libretro' 'libretro-nestopia')
    options=(!lto debug)
    source=("$pkgname-$pkgver.tar.gz::https://github.com/kodi-game/game.libretro.nestopia/archive/refs/tags/$pkgver-$_codename.tar.gz")
    sha512sums=('6e501f7fcb792d6c58ab9e3b9bba4866fb4814a92ed9b49584755ea6d3d3caee307d1a84e28b2fe9f951a0926724286efddee255ecebd79c9589250cfeaa953c')

    build() {
    cd "game.libretro.nestopia-$pkgver-$_codename"
    cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=1 \
    -DUSE_LTO=1 \
    .
    make
    }

    package() {
    depends=('kodi-addon-game-libretro' 'libretro-nestopia')
    cd "game.libretro.nestopia-$pkgver-$_codename"
    make DESTDIR="$pkgdir/" install
    }')
    mcarni
     
    Posts: 19
    Joined: Fri Jul 23, 2021 9:54 am

    Re: kodi-rpi - controller + libretro

    Postby graysky » Mon Jan 16, 2023 7:32 pm

    I don't have time to help with this but recommend you copy/paste to the AUR PKGBUILD forum on bbs.archlinux.org as people with some free time can help you with your questions. I believe your PKGBUILDs are both x86_64 and aarch64/armv7h so you will not be violating any policies about AL only.
    graysky
    Developer
     
    Posts: 1876
    Joined: Sun Jun 26, 2011 6:56 am
    Location: /run/user/1000

    Re: kodi-rpi - controller + libretro

    Postby mcarni » Mon Jan 16, 2023 7:46 pm

    sure, no problem and thanks a lot

    i will post on the main archlinux forum

    in the meantime i can mark this as solved

    thanks a lot

    m
    mcarni
     
    Posts: 19
    Joined: Fri Jul 23, 2021 9:54 am


    Return to ARMv8

    Who is online

    Users browsing this forum: No registered users and 25 guests