Giter Site home page Giter Site logo

Comments (4)

travisdowns avatar travisdowns commented on July 30, 2024

As far as I know, this is the "standard" way to build a kernel module. There should be a directory called build in /usr/lib/modules/4.12.8-2-ARCH/, and then make is invoked there with the modules target (which is a standard target defined by the kernel module build infra, it doesn't come from this project).

What does your /lib/modules/ tree look like? You mention /usr/lib/modules/4.12.8-2-ARCH/ but the build is trying to use /lib/modules/4.12.8-2-ARCH/build (no /usr/*).

Here's some info from my Ubuntu 16.04 system:

ls /lib/modules/
4.10.0-33-generic  4.10.0-35-generic  4.10.0-37-generic  4.4.0-93-generic  4.4.0-96-generic  4.4.0-97-generic
ls -l /lib/modules/4.10.0-37-generic/build
lrwxrwxrwx 1 root root 40 Oct  6 18:40 /lib/modules/4.10.0-37-generic/build -> /usr/src/linux-headers-4.10.0-37-generic

Here's info on building kernel modules on Arch. It seems to follow the pattern above. Check that you have the dependencies installed, like base-devel and linux-headers?

from uarch-bench.

travisdowns avatar travisdowns commented on July 30, 2024

Actually after taking a better look at the link I gave above, it seems you need to do a bit of work to get the source needed to build the kernel module. See the part under "Source configuration" here. Once you do that, it should work.

from uarch-bench.

pcordes avatar pcordes commented on July 30, 2024

Silly me, I didn't have linux-headers installed. Probably I don't have that on the Ubuntu machine either. I guess I was expecting the error message to be something different if that was the problem.

On Arch, /lib is a symlink to /usr/lib by default. You could change that if you wanted to have /usr not on the root FS. That's why pwd finds /usr/lib/...

$ ll /lib/modules/4.12.8-2-ARCH/build/
total 23M
-rw-r--r-- 1 root root 29M Aug 18 11:09 vmlinux

So yes there is a build directory, even without linux-headers installed.

Arch is a rolling-release distro, so headers for the kernel I'm running aren't still available in the main repos. I'll have to remember to install kernel headers next time I'm ready to reboot and upgrade my kernel (+ the rest of the system).

from uarch-bench.

travisdowns avatar travisdowns commented on July 30, 2024

Closing this as @pcordes confirmed above the issue was missing kernel module build environment on the local box.

from uarch-bench.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.