How to build custom-linux-nvidia module using manjaro-tools buildpkg?

Hi,

I’m trying to build a custom version of 5.11 kernel using manjaro-tools and the build/installation went successful. I’m using a nvidia gpu, so need the custom nvidia module package too.

When I try to compile the nvidia package, it says that the dependencies are missing.

I’ve changed the _linuxprefix to “custom-linux511” in the PKGBUILD as that’s the name that I’m using for my custom kernel build.

○ → buildpkg -p custom-linux511-nvidia 
 --> Loading compiler settings: x86_64
==> Updating chroot for [stable] (x86_64)...
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
 --> Time chroot_init: 0.02 minutes
==> Start building [custom-linux511-nvidia]
==> Making package: custom-linux511-nvidia 460.56-2 (Mon Mar  1 01:43:01 2021)
==> Retrieving sources...
  -> Found NVIDIA-Linux-x86_64-460.56-no-compat32.run
==> Validating source files with sha256sums...
    NVIDIA-Linux-x86_64-460.56-no-compat32.run ... Passed
==> Making package: custom-linux511-nvidia 460.56-2 (Sun 28 Feb 2021 08:13:02 PM UTC)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: custom-linux511
error: target not found: nvidia-utils=460.56
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> custom-linux511
  -> nvidia-utils=460.56
==> Checking buildtime dependencies...
==> Installing missing dependencies...
error: target not found: custom-linux511-headers-5.11.2-1
==> ERROR: 'pacman' failed to install missing dependencies.
==> Missing dependencies:
  -> custom-linux511-headers-5.11.2-1
==> ERROR: Could not resolve all dependencies.

Request someone to guide me.

I’m using buildpkg because I’m planning to distribute the builds. Thanks.

custom-linux511 doesn’t exist in the repos, so it can’t find it.

You can install foreign packages in the build environment with the -i flag:

buildpkg -p package-name -c -i /path/to/foreign-package
1 Like

Thank you very much. It worked.

But why the following command does not install the package?

buildpkg -i PACKAGE_NAME-VERSION-x86_64.pkg.tar.zst

Now another question related to the same custom kernel build process.

What configs should I edit in the PKGBUILD, so that the custom 5.11 kernel does not replace the stock 5.11 kernel?

Is it even possible to have 2 different kernel builds [with different names] of the same kernel version, say 5.11 in manjaro?

Because you have to use -p to tell it what you’re building first.

Perhaps @nightmare-2021 can answer your other questions, that’s his area of expertise.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.