Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

"Invalid module format" when running a cross-compiled linux kernel module

I'm trying to cross compile the ad7192 linux driver for a raspberry pi 4 running the latest 64 bit raspberry pi OS(kernel 6.6.20). pi@raspberrypi:~/projects$ uname -a Linux raspberrypi 6.6.20+rpt-rpi-...
Arun Cheriyan's user avatar
0 votes
0 answers
719 views

Kernel and header Version not the same

So i wanted to build the driver for my wifi adapter for my raspberry pi 400: https://github.com/morrownr/88x2bu-20210702 And i did everything what was said and then got the error: Your kernel files ...
Jakob's user avatar
  • 1
3 votes
2 answers
1k views

Why does `apt install linux-headers-generic` install old headers for the newest stable kernel?

I can boot a vanilla pi-4 with kernel8.img (Feb 15, 2023) to release 5.15.84-v8+ ... the pi-4 runs admirably. # ls -ltr /boot/*.img -rwxr-xr-x 1 root root 8194604 Feb 15 18:02 /boot/kernel8.img # ...
NevilleDNZ's user avatar
1 vote
0 answers
394 views

On Raspberry Pi 4 with Ubuntu 22.04 don't work ioctl

I have Raspberry Pi 4 (aarch64 Cortex-A72) with OS Ubuntu 22.04 LTS 64-bit installed. I try read frame from webcam. When I run this code: if (ioctl(fd, VIDIOC_DQBUF, &buf) < 0) { std::cout &...
ZeusBios's user avatar
  • 111
0 votes
0 answers
879 views

Pi 3B (without +) regularly losing Ethernet connection (smsc95xx)

I have a problem with some of my PIs losing Ethernet connection. This happens between every few days to a month. After the Ethernet connection is lost, it does not come back up. Besides the Ethernet ...
user643011's user avatar
3 votes
0 answers
322 views

How to write a Kernel module using SPI properly?

I have no experience writing kernel modules. I build some examples with gpio interrupts and they worked prety well. Now I want to use SPI from my kernel module and I will explain why I need it. I am ...
Murilo Machado Pinto's user avatar
1 vote
1 answer
945 views

How is spidev and the spi-bcm2835 module related?

Removing either one deletes the SPI devices from /dev/ What's the difference between the two modules and how do they relate?
Eon's user avatar
  • 119
0 votes
0 answers
280 views

Userspace and Kernel space graphics drivers for the pi 4

I recently bought a raspberry pi 4 to aid in my computer architecture studies. Also, one of my study projects is to build a kiosk application using buildroot (not raspbien). I have taken some time to ...
Cerezo's user avatar
  • 101
3 votes
1 answer
1k views

Editing heartbeat LED trigger

I am trying to edit the timer of heartbeat trigger on RPi Zero. I have found original .c file of kernel driver here https://github.com/raspberrypi/linux/blob/rpi-5.4.y/drivers/leds/trigger/ledtrig-...
Hynek Bernard's user avatar
0 votes
2 answers
536 views

How do I know that a Dual-Band USB WiFi dongle will work on Raspbian or other Linux distrobution?

How do I know if a Dual band USB WiFi dongle will work on a Raspberry Pi running Linux? I know that Linux must have a driver that supports the wifi chipset used in the dongle. But with the number of ...
Chimera's user avatar
  • 105
0 votes
0 answers
25 views

Which one is sensor from IIO?

I am looking for list of sensors from the kernel drivers. I am not sure which one is sensor and which one is not. Are all of them sensors? If not then how can I get those I mean is there any API ...
testuser's user avatar
2 votes
0 answers
116 views

Problem in initiating i2c driver module for bmp180 i2c based sensor at kernel level

For leaning purpose i am writing a i2c client kernel module for bmp180 pressure sensor. My kernel code is -> #include <linux/version.h> #include <linux/module.h> #include <linux/init....
Prateek Singh's user avatar
2 votes
1 answer
522 views

where can I get the driver of imx219

I'm building kernel(xilinx) and rootfs(debain10) for Avnet96v2 board which has connetted a imx219 via mipi adapter, where can I get newest official driver for the camera, if it is existing. By the ...
coolicelee's user avatar
0 votes
2 answers
980 views

Help Patching a driver

I've been tasked with updating a driver on a Raspberry Pi 4 running Raspbian. I'm told I need to apply this patch https://lkml.org/lkml/2019/4/1/1050 in order to get my USB modem to work. When I run ...
fullyjosh's user avatar
1 vote
1 answer
428 views

Trouble adding a gpio device to the device tree

I'm trying to connect an hx711 to GPIO23 and GPIO24 pins on an RPI3 A+, and I need to specify this in the device tree to have the hx711.ko driver be probed. I've been stuck on this problem for some ...
gabson's user avatar
  • 69
1 vote
0 answers
473 views

How to get maximum GPIO output speed in Kernel module?

I'm writing a Linux kernel module on RPi2 to push an array to RGB Led matrix, so I want to have maximum speed of GPIO to reduce the 'flick' when it run Bit Angle Modulation. According to this site, ...
msshhp's user avatar
  • 11
0 votes
0 answers
131 views

Creating device driver which feeds GPS Co-ordinates from phone to raspberry pi

I don't have GPS module, so I was thinking whether I can feed GPS coordinates from my android/ios phone to raspberry pi over wireless protocol like bluetooth/TCPIP. Can I create a virtual device ...
user1910228's user avatar
3 votes
0 answers
621 views

Kernel error : [drm] Resetting GPU

I am using an app which is using the vc4-drivers. Sometimes videos freeze for an instant, and I see a kernel message saying : [drm] Resetting GPU After that, some font are no more displayed but the ...
etiennedm's user avatar
  • 185
0 votes
0 answers
618 views

Direct memory access to Cypress CYW43455 wireless LAN chip

Where can I find the direct memory addresses or GPIO pinouts for directly controlling the Cypress CYW43455 Wi-Fi chip on the Raspberry Pi Zero W from a custom unikernel, or a modified Raspbian? My ...
Petrus Theron's user avatar
-1 votes
1 answer
2k views

dmi: Firmware registration failed

I have installed Gentoo kernel 4.14.y from https://github.com/raspberrypi/linux. dmesg shows the following errors ... ... [ 0.182547] dmi: Firmware registration failed. ... ... [ 2.224843] mmc1:...
Necktwi's user avatar
  • 179
0 votes
0 answers
977 views

Kernel module can't be loaded - "invalid module format"

Headline: I've cross-compiled a kernel module for the Raspberry Pi, but on attempting to load it, I get the following error: insmod: ERROR: could not insert module testmod.ko: Invalid module format ...
Tom's user avatar
  • 181
1 vote
1 answer
3k views

Header files not being found (sys/stat.h)

I am trying to compile a device driver to control some LEDs connected via GPIO pins. First, I got errors that /lib/modules/4.14.31-v7+/build was not found, so I ran sudo apt-get install raspberrypi-...
Jebus's user avatar
  • 21
1 vote
1 answer
1k views

Problems with compiling drivers for rtl8192cu

I'm trying to use realtek 8188cu module in concurrent mode(both station and AP mode simultaneously). I downloaded the driver source files from here: https://github.com/raspberrypi/linux/tree/...
Chakravarthy Raghunandan's user avatar
1 vote
0 answers
281 views

How do you add new "driver.c" files to get built with kernel

I've been following this guide to it's entirety when building existing kernel modules with no issues. My problem arises when I try to add my own driver.c files to the /linux/drivers/input/touchscreen ...
f2a8's user avatar
  • 31
2 votes
2 answers
223 views

Fastest way to copy gpio state to memory?

Following an impressive write-up in MagPi 32,there has been other write-ups for better parallel ADC control from a Raspberry Pi. It appears that the ADC can be driven by Raspberry on-board clock at ...
Kelu124's user avatar
  • 49
1 vote
1 answer
2k views

Modifying libcomposite module doesn't work

I'm trying to modify the libcomposite module in a way that it prints the functions of which are loaded to the log file. I'm using an Raspberry Pi Zero W with the 4.9.20+ Kernel. I updated everything ...
ilovemilk's user avatar
0 votes
0 answers
2k views

How to install diver for TL WN823N wifi adapter

[I know this question might be marked as a duplicated - but the point is that previous solutions didn't work for me...] Wifi Adapter: TP Link WN823N (EU) V2 Device: Raspberry Pi Zero Kernel 4.4.50+ ...
giuseppe's user avatar
  • 101
1 vote
1 answer
7k views

Installed kernel headers and $(uname -r) differ

Raspberry Pi 1 Model B. If I run: uname -a I get: 4.9.16+ Gcc version: 4.9.2 If I execute: sudo apt-get install raspberrypi-kernel-headers it installs me 4.4.50+ Why and how can I install the ...
XMight's user avatar
  • 121
1 vote
1 answer
1k views

Touchscreen LCD USB (HannsG and elo) behaving unexpected on raspi 3

I tried to connect a Hanns­G HT225HPB 21.5'' touchscreen or an Elo ET1502L to my Raspberry Pi 3. Both connect via HDMI and USB for touch. Both seem to work at first glance but are not really usable. ...
A. Ziegler's user avatar
-1 votes
1 answer
2k views

Error compiling and loading driver on the Raspberry Pi

I bought a temperature sensor with a usb adapter and needed to install a driver for it, but I could not compile the driver provided by the manufacturer. pi@raspberrypi:~/CH341SER_LINUX $ make make -...
owenhu99's user avatar
1 vote
1 answer
398 views

I cannot change the kernel on 4.4.11-v7+

I have a pi 2B where I installed raspbian using noobs on 6-14-16. I have been trying to compile drivers for a wireless nic, specifically the archer T4UH. Doing this requires that the kernel be ...
user3062323's user avatar
1 vote
2 answers
418 views

Using GPIO to emulate another device

I'm looking to connecting some devices to the GPIO pins on the Raspberry Pi Zero, (namely a VGA connector). So I was wondering what are the steps to tell the Kernel to say these pins aren't GPIO, but ...
SailorCire's user avatar
3 votes
1 answer
2k views

Raspberry Pi-2 with mainline Linux kernel

With several nice commits landing into the mainline of Linux Kernel for version 4.5, is it already possible to compile and boot a mainline kernel (e.g. 4.5-rc6) on a Raspberry Pi 2? If yes, then what ...
jotik's user avatar
  • 133
1 vote
1 answer
2k views

Installing ESP8266 SDIO driver; "make" command gives "Kernel build tree not found" error

I'm attempting to add a kernel module on a Raspbian Debian installation for an SDIO-based wifi module driver( found here: https://hackaday.io/post/28712) The stable image comes with kernel 4.1, so ...
Falkenad's user avatar
15 votes
2 answers
19k views

Enable monitoring mode for RTL8188CUS via USB on Raspbian

I am trying to enable monitoring mode for a USB wifi dongle with the RTL8188CUS chipset on a raspberry pi model b+ (or any raspberry pi for that matter). $ lsusb Bus 001 Device 005: ID 0bda:8176 ...
Matt M's user avatar
  • 331
0 votes
0 answers
385 views

SPI problem when install CAN controller driver

I updated my raspi to 3.18.7+ last days and i also need new driver for my modules. I was waiting for PICAN board driver for pi and yesterday i uploaded it. Before uploaded; ls -al /dev/spi* crw-rw---...
mezzocannone's user avatar
2 votes
0 answers
3k views

Why I cannot read the temperature / humidity sensor SHT20?

I use a temperature and humidity sensor sht20. According to this link: http://www.sensirion.com/en/products/humidity-temperature/humidity-temperature-sensor-sht2x/ It is compatible with sht21, which ...
Tom Xue's user avatar
  • 241
0 votes
2 answers
3k views

Do we need to put i2c code into kernel?

I see codes to make i2c device (e.g. i2c sensors) work in user space, just need kernel to support /dev/i2c-0 or /dev/i2c-1. But whether do we need to put the codes into Linux kernel? For example, if ...
Tom Xue's user avatar
  • 241
2 votes
3 answers
11k views

Compile linux device driver in Raspbian

I have some problems with compiling & building a simple gpio driver that I wrote( after THIS documentation). I have a Raspberry Pi Model B+ ( not sure if it's relevant to the question) with a ...
23ars's user avatar
  • 304
17 votes
4 answers
16k views

Kernel .config necessary options

I'm interested in compiling a custom kernel for the pi. I have the source from the github archive, which includes a make target for a default configuration: make ARCH=arm bcmrpi_defconfig But (as ...
goldilocks's user avatar
  • 60.1k
0 votes
1 answer
739 views

Does the kernel support a BMP180 BMP85 digital pressure sensor out of the box?

The kernel generates a virtual file with the values for the famous temperature sensor DS 18B20. Is there a plug and play kernel support for the I2C digital pressure sensors BMP180 and BMP85 too? ...
Jonas Stein's user avatar
1 vote
0 answers
106 views

What's the difference between Rpi kernel source and Rpi distro kernels?

I need a specific kernel module (driver for a USB grabber), which is included in kernel 3.12. So, I went for Pidora, which features kernel 3.12 but was surprised, that the module wasn't included in ...
Chris's user avatar
  • 11
0 votes
1 answer
1k views

buildroot and rpi-firmware

I am able to bring up a minimal kernel using raspberrypi_defconfig in buildroot. I noticed that there are some .ko files in the rpi-firmware package downloaded from git. How can I include those into ...
vpillai's user avatar
  • 111
2 votes
2 answers
2k views

How to use the DS2482 kernel module

I want to use the ds2482 kernel module/driver but I'm struggling to find an example to start with. I've googled many searches but I swamped with git trees and source trees. I've loaded it OK and it ...
AndyNC's user avatar
  • 21
2 votes
1 answer
630 views

Building Linux Kernel for Driver Creation

I am attempting to compile the kernel for the RPI using Raspbian. These are the steps I took... (1) Imaged the SD card from http://www.raspberrypi.org/downloads (2) Downloaded the kernel from and ...
Matthew's user avatar
  • 231
12 votes
3 answers
19k views

Learning Linux driver development with Raspberry Pi

I'd like to write a Linux device driver for some real hardware device. What Raspberry Pi peripherals are a good fit? Basically I need the following: It must be small enough for a beginner (few month ...
user avatar
4 votes
1 answer
3k views

Unloading kernel module does not remove /dev/ device file

I have had success following tutorials for developing kernel modules, running them on a Ubuntu 12.04 LTS virtual machine. Particularly the example in this tutorial works fine on Ubuntu on a 3.2.0 ...
Dylan's user avatar
  • 141