Compiling LibreELEC from git - depmod: ERROR nvidia.ko No such file or directory

  • Hi - I have what a believe is a working build system (it builds a CoreELEC S912 image with no issues), but when I attempt to make an x86_64 image from the latest version of LibreELEC, I get an error regarding the nvidia kernel driver.

    $ git clone GitHub - LibreELEC/LibreELEC.tv: Just enough OS for KODI

    $ cd LibreELEC.tv

    $ PROJECT=Generic ARCH=x86_64 make image

    Several hours later, and after everything is built successfully, I see this error message:

    Since I'm getting this error compiling the code from git as is (and assuming I didn't check out a broken build), I'm wondering what I missed? Can anyone please help - thanks in advance!!

  • I got the same error while building 8.90.008. After a

    Code
    make clean

    error is gone and everything compiled without a problem. Perhaps some caching problem from an old build?

  • I'm having this issue building within a Ubuntu 16.04 LTS VM. After poking around a bit, I found that the build was looking for a copy of nvidia.ko that was a symlink to /var/lib/nvidia.ko

    Code
    dapharsyde@dapharsyde-vm:/storage/LibreELEC.tv$ ls -l build.LibreELEC-Generic.x86_64-9.0-devel/image/system/usr/lib/kernel-overlays/base/lib/modules/4.19.4/nvidia/nvidia.ko
    lrwxrwxrwx 1 dapharsyde dapharsyde 18 Dec  3 21:20 build.LibreELEC-Generic.x86_64-9.0-devel/image/system/usr/lib/kernel-overlays/base/lib/modules/4.19.4/nvidia/nvidia.ko -> /var/lib/nvidia.ko

    I manually copied the built nvidia.ko to /var/lib, and this seems to have gotten past the error.

    sudo cp build.LibreELEC-Generic.x86_64-9.0-devel/xf86-video-nvidia-legacy-340.107/kernel/nvidia.ko /var/lib

    (I have an ION box so I require the legacy driver)

    This still seems like a terrible hack though, and the proper solution is to have that symlink point to the actual location of nvidia.ko, instead of the /var/lib directory of the build server.

    Edited once, last by dapharsyde (December 4, 2018 at 10:48 PM).

  • Code
    dapharsyde@dapharsyde-vm:/storage/LibreELEC.tv$ find build.LibreELEC-Generic*/image/system/ -name nvidia.ko | xargs ls -l
    lrwxrwxrwx 1 dapharsyde dapharsyde       18 Dec  3 21:20 build.LibreELEC-Generic.x86_64-9.0-devel/image/system/usr/lib/kernel-overlays/base/lib/modules/4.19.4/nvidia/nvidia.ko -> /var/lib/nvidia.ko
    -rw-rw-r-- 1 dapharsyde dapharsyde 14430168 Dec  3 21:20 build.LibreELEC-Generic.x86_64-9.0-devel/image/system/usr/lib/nvidia-legacy/nvidia.ko
    -rw-rw-r-- 1 dapharsyde dapharsyde 21978448 Dec  3 21:20 build.LibreELEC-Generic.x86_64-9.0-devel/image/system/usr/lib/nvidia/nvidia.ko
  • It still seems weird to me that the build has a symlink to /var/lib

    Is there a file I need to modify to choose whether I want to use the legacy Nvidia driver or the latest? If I missed this step, that could explain why the symlink points to /var/lib instead of the driver I plan to use.