linux-device-driver

usb Mass Storage driver for am335x

让人想犯罪 __ 提交于 2020-07-22 06:07:31
问题 i want to loard a usb drive storage module so i make when i load usb mass storage module the usb drive detect in /media or /dev/sda1 I have one customized bord using an am335x processor and this board has one USB port(for USB drive connector) and one micro USB port. and also have kernel source code and version is 4.4.16 now i follow the command to compile kernel source code make distclean CROSS_COMPILE=arm-linux-gnueabihf- make am335x_fujitel_defconfig CROSS_COMPILE=arm-linux-gnueabihf- note=

usb Mass Storage driver for am335x

你离开我真会死。 提交于 2020-07-22 06:06:30
问题 i want to loard a usb drive storage module so i make when i load usb mass storage module the usb drive detect in /media or /dev/sda1 I have one customized bord using an am335x processor and this board has one USB port(for USB drive connector) and one micro USB port. and also have kernel source code and version is 4.4.16 now i follow the command to compile kernel source code make distclean CROSS_COMPILE=arm-linux-gnueabihf- make am335x_fujitel_defconfig CROSS_COMPILE=arm-linux-gnueabihf- note=

Setting device permission from driver code fails

混江龙づ霸主 提交于 2020-06-29 04:21:33
问题 I want to access I2C device driver nodes from user space in a linux kernel 3.10.14. I added i2c-dev in the kernel configuration and got the /dev/i2c-* device nodes. However they have permission $ ls -l /dev/i2c-* crw------- root root 89, 1 2014-08-21 20:00 i2c-1 In drivers/i2c/i2c-dev.c I added the callback static char *i2c_dev_devnode(struct device *dev, umode_t *mode) { if (!mode) return NULL; if (MAJOR(dev->devt) == I2C_MAJOR) *mode = 0666; return NULL; } and in the same file I added the

How do Linux GPIO numbers get their values?

喜欢而已 提交于 2020-06-28 18:09:28
问题 I am trying to understand how the Linux GPIO numbers get their values. e.g. GPIO mapping for Joule. I tried reading linux documentation on Pinctrl Subsystem and also looked at the code of GPIO driver being used in Intel Joule : https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/intel/pinctrl-broxton.c However going this way looks very platform-specific. I am looking for some generic industry standard. Please help or please direct me to some good article. 回答1: First of all, one has

How do Linux GPIO numbers get their values?

淺唱寂寞╮ 提交于 2020-06-28 18:03:20
问题 I am trying to understand how the Linux GPIO numbers get their values. e.g. GPIO mapping for Joule. I tried reading linux documentation on Pinctrl Subsystem and also looked at the code of GPIO driver being used in Intel Joule : https://elixir.bootlin.com/linux/latest/source/drivers/pinctrl/intel/pinctrl-broxton.c However going this way looks very platform-specific. I am looking for some generic industry standard. Please help or please direct me to some good article. 回答1: First of all, one has

kernel output weird dmesg of my driver module

北战南征 提交于 2020-06-23 14:48:28
问题 from my previsou question Why does module failed to load? (/dev/scull0 : no such device or address) I managed to load the module via /sbin/insmod , but after that, I have log out the dmesg: [ 2765.707018] scull: loading out-of-tree module taints kernel. [ 2765.707106] scull: module verification failed: signature and/or required key missing - tainting kernel [ 2765.707929] Passed scull_init_module at 41 (debug info - successful load of init module) [ 6027.843914] acer_wmi: Unknown function

mmap /dev/fb0 fails with “Invalid argument”

我的未来我决定 提交于 2020-06-12 06:04:53
问题 I have an embedded system and want to use /dev/fb0 directly. As a first test, I use some code based on example-code found everywhere in the net and SO. Opening succeeds, also fstat and similar. But mmap fails with EINVAL. Source: #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <fcntl.h> #include <linux/fb.h> #include <sys/mman.h> #include <sys/ioctl.h> int main() { int fbfd = 0; struct fb_var_screeninfo vinfo; struct fb_fix_screeninfo finfo; long int screensize = 0; char

Bypassing 4KB block size limitation on block layer/device

╄→尐↘猪︶ㄣ 提交于 2020-06-12 04:30:12
问题 We are developing an ssd-type storage hardware device that can take read/write request for big block size >4KB at a time (even in MBs size). My understanding is that linux and its filesystem will "chop down" files into 4KB block size that will be passed to block device driver, which will need to physically fill the block with data from the device (ex., for write) I am also aware the kernel page size has a role in this limitation as it is set at 4KB. For experiment, I want to find out if there

How to build external modules in ubuntu?

馋奶兔 提交于 2020-06-09 05:27:10
问题 I am trying to build a scull device, and have build a .ko file without problem. But when insmod ed, then cat of /var/log/kern.log : May 14 00:33:06 XLM kernel: [ 4251.407594] scull: loading out-of-tree module taints kernel. May 14 00:33:06 XLM kernel: [ 4251.407680] scull: module verification failed: signature and/or required key missing - tainting kernel So therefor this error occured bash: /dev/scull: No such device or address (because I have tried to write to /dev/scull0 after mknod /dev

How to build external modules in ubuntu?

前提是你 提交于 2020-06-09 05:27:07
问题 I am trying to build a scull device, and have build a .ko file without problem. But when insmod ed, then cat of /var/log/kern.log : May 14 00:33:06 XLM kernel: [ 4251.407594] scull: loading out-of-tree module taints kernel. May 14 00:33:06 XLM kernel: [ 4251.407680] scull: module verification failed: signature and/or required key missing - tainting kernel So therefor this error occured bash: /dev/scull: No such device or address (because I have tried to write to /dev/scull0 after mknod /dev