Questions tagged [kernel-modules]
Use this tag for questions about loading, configuring, or compiling them. See also /drivers for questions about which modules to use for specific hardware. A kernel module is a bit of code that can be added into the kernel by the administrator while the system is running, typically providing one feature such as a filesystem.
1,230 questions
1
vote
0
answers
18
views
Load new version of non-removable running kernel module
I have an embedded Linux device (Ubiquiti EdgeRouter-X, see this thread for more detail) for which I cross-compiled the kernel module nf_conntrack.ko (part of netfilter) to support a protocol that was ...
1
vote
1
answer
28
views
How to debug the Linux kernel or device driver if the motherboard has no serial port?
I am used to debug Linux device driver through the serial port on the motherboard to see the real-time message before the system hang.
But now I have a brand-new server board, MSI MPG Z890 CARBON WIFI,...
0
votes
0
answers
61
views
Allocating contiguous physical memory using huge pages in kernel module
0
I need a kernel module that allocates 8MB of physically contiguous memory using 2MB huge pages, in response to a user-space mmap() request. While I’ve successfully used alloc_pages() with 4KB pages ...
1
vote
0
answers
53
views
Realtek RTL8822CE WiFi not working - Pop_OS 22.04
I'm having trouble getting WiFi working on Pop!_OS 22.04 with a Realtek RTL8822CE card. It worked fine until recently but now:
WiFi randomly disconnects
Sometimes the WiFi option disappears from ...
0
votes
0
answers
26
views
Kernel APIs to disable/enable CPU cores within a driver module
I have a linux kernel version 6.8.0-57-generic (Ubuntu Jammy).
I want try disabling and enabling the cores in the CPU through the linux kernel module (from kernel space) What is the right way to do ...
0
votes
0
answers
21
views
Limit length of a scatterlist entry produced by dma_map_sg
The documentation for DMA in Linux kernel states:
The implementation [of dma_map_sg] is free to merge several consecutive sglist entries
into one (e.g. with an IOMMU, or if several pages just happen ...
0
votes
1
answer
20
views
ftdi ft4232h shows up as 2 not 4 ports? with no udev rules present?
So in my case I have a quad channel FTDI 4232H chip - lsusb and dmesg show that the chip is being recognized - that is all correct, example:
Bus 001 Device 005: ID 0403:6001 Future Technology Devices ...
1
vote
1
answer
91
views
Installing Debian kernel headers package does not install all kernel headers
I am currently running the most recent update of Debian bookworm (which I think is built on Linux 6.1.0.32-amd64 or Linux-6.1.129-1, that's what uname -r returns). I have been trying to install a set ...
0
votes
0
answers
39
views
How do I delete a faulty device class from the command line
I was writing a simple character device driver. There was an issue in the cleanup function, cdev_del was called before device_destroy, Which means I deleted the cdev structure before deleting the ...
1
vote
0
answers
36
views
Cannot compile kernel modules on TrueNAS Scale
I have a Ugreen DXP 6800 Pro and the OS disk died. No actual NAS data was lost but I cannot figure out how to get the OS back to the same state. I was previously able to compile modules and add them ...
2
votes
2
answers
85
views
How do I find out Linux kernel version for an API change?
How do I find out, since which Linux version a kernel API function/macro is availible, or have undergone breaking changes (was removed, change of the type or number of arguments).
For example while ...
0
votes
1
answer
35
views
Does a .h file for external kernel modules need compilation in another, particular manner?
I have an external kernel module and a Makefile. I was using Kbuild but decided to go with a straight Makefile and make. I have my headers installed, build-essential and kmod installed, and I am ...
2
votes
1
answer
77
views
TPM2 in qemu running aarch64 alpine linux
I want to run an Alpine Linux VM and want to connect the host's TPM to the VM. The host is x86_64 based. The command for qemu is
qemu-system-aarch64 \
-m 1024 -cpu cortex-a57 -M virt \
-bios /...
0
votes
0
answers
57
views
Failed loading second kernel
I have cloned the kernel and switched to version v6.11 (mine is 6.11.0-14) which I have builded and run the /sbin/installkernel script (which ubuntu provides) and everything was fine but the when I ...
2
votes
1
answer
90
views
Roughly how camera sensor drivers work
I am trying to write a MIPI CSI-2 camera sensor driver for an embedded Linux image. Of course, there are tons of driver source codes on the Github etc. but I am having a hard time understanding how ...