Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow

How to compile Linux Kernel module from several files?

I am writing to you because I am having an issue with my module compilation written in C for Kernel and I even can't find documentation which would be helpful for me.My issue looks like following:There...

View Article


Several `/dev/uioX` devices fail to enumerate for uio_pdrv_genirq driver

I use the uio_pdrv_genirq driver to control a number of FPGA modules on a Xilinx MPSoC system. I've used this for several months with quite a few FPGA modules (~170) and never had any difficulties...

View Article


How does Linux DMA implement scatter-gather functionality for MEM_TO_MEM mode?

In the DMA engine API, I only see the dmaengine_prep_slave_sg() function supporting DMA scatter-gather functionality. However, when examining DMA drivers from different manufacturers, this function...

View Article

Linux device node for sd card as mmcblk to access CSD register

I am trying to access the CSD (Card Specific Data) register on a SD card. The only way I know to do this is by having the linux system recognize it as a mmc device (Multi Media Card?) (eg....

View Article

ERROR: modinfo: could not find module

I am installing new kernel 3.12.x on redhat 6 machine. Below is my steps which I followed to install the new kernel.extract kernel in /usr/src/ directorySwitch to cd /usr/src/linux-3.12.xmake...

View Article


Boot Time Calculation using TSC (Time Stamp Counter) in Yocto

I’ve added a custom inline assembly function to read the TSC counter in the kernel’s init/main.c:static inline u64 read_tsc(void) { u32 hi, lo; asm volatile("rdtsc" : "=a"(lo), "=d"(hi)); return...

View Article

What is SRCREV_machine and SRCREV_meta in Yocto kernel recipes?

Why doesn't the kernel recipe simply use SRCREV="${AUTOREV}" or a git commit hash?Instead, I find these lines inside the Raspberry Pi kernel recipe:SRCREV_machine =...

View Article

crashkernel doesn't load for raspberry pi 3B arm64 linux kernel

I have built 6.6.x linux kernel : https://github.com/raspberrypi/linux/tree/rpi-6.6.y for RPi3B+ (arm64 target). The rootfs came from buildroot-2025.05-arm64. I am running it on RPi3B+ and following...

View Article


AF_XDP `xsk_socket__create` fails with "Bad address" on Intel i226 (igc driver)

Does the igc driver support AF_XDP TX at all — even in copy mode?Has anyone successfully used AF_XDP with an Intel i225/i226 NIC using igc?Would really appreciate confirmation, success stories, or...

View Article


Add timestamp support to PCF85363 RTC

I'm working with a custom board that integrates the NXP PCF85263 RTC. This RTC supports timestamp functionalities (e.g., tamper detection and battery switch-over events), but unfortunately, the...

View Article

kernel compilation error when CONFIG_DEBUG_INFO_BTF is enabled

FAILED: load BTF from vmlinux: No such file or directorymake: *** [Makefile:1164: vmlinux] Error 255make: *** Deleting file 'vmlinux'root@akb:/home/akb/SRC/net/net-next# I have to enable BTF for my BPF...

View Article

How to configure a GPIO button with interrupt in the Device Tree on...

I'm developing a Linux kernel driver for the BeagleBone Black and want to use two GPIOs available on the P9 expansion header:P9.15→gpio1_16→ connected to an LEDP9.23→gpio1_17→ connected to a push...

View Article

Image may be NSFW.
Clik here to view.

Insert new page in between old ones, shifting addresses but conserving the...

In linux is it possible to advise the kernel to map a new empty page D in between two already mapped pages A and B, conserving the contents of each but, just changing the virtual memory addresses of B?...

View Article


Is it possible to specify scheduler for MPTCP socket in modern linux kernels?

In early versions of MPTCP (0.96, for example) there was a possibility to specify multipath scheduler for each MPTCP socket separatelly: char scheduler[] = "redundant"; int rc = setsockopt(sock,...

View Article

Set kernel config fragment variable from Yocto recipe

I have a Yocto layer with kernel bbappend file, that adds my own kernel configuration fragmets and dependency on linux-firmware package. I want to embed i915 firmware directly into Linux kernel. All I...

View Article


GDB: lx-symbols undefined command

I am following the guide below:Debugging kernel and modules via gdbWhen I try to load the module symbols using the command below:(gdb) lx-symbolsgdb says that the command is undefined. How do I add...

View Article

Why do we have memory zones in linux?

Linux Kernel Development by Robert Love, p. 233, says:Because of hardware limitations, the kernel cannot treat all pages as identical. Some pages, because of their physical address in memory, cannot be...

View Article


Add a /etc/sysctl.d/50-foo.conf to a kernel image build

I'm building a kernel image, with my own kernel module being added to the build, using my own Makefile and Kbuild scripts. The final complete kernel image gets flashed to a ROM. I have a few kernel...

View Article

How does the process of reading data from the recv buffer work?

I know that the send() and recv() will write and read data from sender buffer & receiver buffer which is limited in size.That's way if we want to send big data like we want to send 200mb data...

View Article

Failing to initialize BPF timer due to in_nmi()

I'm writing an ebpf program where I would run a callback function at an interval. I'm attaching my initialization function (to initialize my bpf timer) in kfree, similar to:...

View Article

Raspberry Pi (xrdp Connection Issues)

I've installed xrdp on three Raspberry Pi machines with the following result:P#01 (RPi 5/4Gb x64, IP: ..1.3) - WorkingP#02 (RPi 4/4Gb x64, IP: ..1.6) - Not Working (Blank/Blank Screen)P#03 (RPi 5/8Gb...

View Article


Memory barriers - problems with Linux headers

To understand better locks and semaphores I've started reading about memory barriers and built-in functions used to acquire and release semantics and I've a simple multithreading program in C to test...

View Article


What is the relation between virt_to_phys and the CPU's MMU in the Linux kernel?

I am reading about Linux memory management. I know that The Linux kernel is responsible for creating and maintaining page tables but employs the CPU’s memory management unit (MMU) to translate the...

View Article

creating a bitbake recipe for jool to generate kernel modules

Generally do_compile in bitbake executes make and generates the binaries. But in case of jool, kernel modules are generated by executing dkms command as in the below...

View Article

Is the main thread of a userspace process a kernel thread running in kernel...

I thought I understood kernel threads vs user threads, but there's something I can't figure out that suggests I'm missing something.I thought these were facts:when the kernel creates a process it also...

View Article


USB-storage does not work with my Garmin GPSmap 60CSx [closed]

I got a used Garmin GPSmap 60CSx. When I plug it into the USB port, this is logged in /var/log/kern.log:Jul 10 12:33:38 ThinkPad-T450s kernel: [78381.495019] usb 2-2: new full-speed USB device number...

View Article

Get GPIO active high/low setting in Linux kernel v6.6

My DT describes GPIO as following:my-gpio = <&gpio4 20 0>;In Linux kernel v5.10 I usegpionum = of_get_named_gpio(np, "my-gpio", 0);of_get_named_gpio_flags(np, "my-gpio", 0,...

View Article

Why SWAP not releasing automatically [closed]

I’m running an application on a Red Hat Enterprise Linux 8.8 system. Over time, I’ve observed that SWAP usage gradually increases and reaches up to 20%, even when no additional requests are being sent...

View Article

how to solve Kernel configuration is invalid issues

I'm trying to build module.But here's some issues.ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make...

View Article



mscc linux driver rx timestamping (MICROSEMI_PHY)

in linux driver mscc (which can be enabled menuconfig via MICROSEMI_PHY) rx timestamping is done within atomic context, but mdio bus locking required, and when thread waits for unlocking mutex it can...

View Article


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>