linux-device-driver

Linux Kernel C code to simulate userland writing / setting a value to /proc filesystem file [closed]

孤街浪徒 提交于 2020-08-10 22:55:05
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 days ago . Improve this question What's the best way to simulate the same thing as a user doing an "echo a > /proc/file" But doing it from the KERNEL (2.6 in my case) even when the ROOT partition is unreachable. As far as I know the /proc file system is created by the kernel and resides in memory so it should

Linux Kernel C code to simulate userland writing / setting a value to /proc filesystem file [closed]

流过昼夜 提交于 2020-08-10 22:53:45
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 days ago . Improve this question What's the best way to simulate the same thing as a user doing an "echo a > /proc/file" But doing it from the KERNEL (2.6 in my case) even when the ROOT partition is unreachable. As far as I know the /proc file system is created by the kernel and resides in memory so it should

Linux Kernel C code to simulate userland writing / setting a value to /proc filesystem file [closed]

旧城冷巷雨未停 提交于 2020-08-10 22:50:36
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 days ago . Improve this question What's the best way to simulate the same thing as a user doing an "echo a > /proc/file" But doing it from the KERNEL (2.6 in my case) even when the ROOT partition is unreachable. As far as I know the /proc file system is created by the kernel and resides in memory so it should

how to make i2c-core as module

久未见 提交于 2020-08-10 19:20:21
问题 Hello I have beagleboneblack board and have kernel source code I want to make my i2c work as a module so for that, I have done some changes in .config file # # I2C support # CONFIG_I2C=m and cross compile kernel make dtbs zImage -j8 CROSS_COMPILE=arm-linux-gnueabihf- But after compile successfully, CONFIG_I2C change from 'm' to 'y' how to solve this problem? 来源: https://stackoverflow.com/questions/62752609/how-to-make-i2c-core-as-module

Event notification from kernel space to user space

谁都会走 提交于 2020-08-07 20:10:57
问题 How to notify the user space application whenever an event occurs in the kernel space? A hardware generates an interrupt when the data arrives at some GPIO. This data is copied to the kernel buffer. At this point, I want the driver to notify the application that it can call read function to copy the data form kernel buffer to user space buffer. I thought of using epoll method, but epoll indicates whether the device is ready to be read from. What I want is that, epoll to indicate whenever

Enlarge Linux Kernel Log Buffer more that 2M

孤街醉人 提交于 2020-07-28 16:53:16
问题 I am in the process of collecting some sort of Linux Kernel activities. I have placed multiple printk statements with in the kernel source code and would like to monitor those during regular kernel activities. Unfortunately, I have realized that the Kernel Log Buffer size ( CONFIG_LOG_BUF_SHIFT ) cannot be more that 2^21 which is essentially equal to 2M entries. Is there any other way to record more than 2M Kernel messages ? 回答1: You can set the kernel log buffer to log_buf_len=4M in your

Enlarge Linux Kernel Log Buffer more that 2M

放肆的年华 提交于 2020-07-28 16:51:57
问题 I am in the process of collecting some sort of Linux Kernel activities. I have placed multiple printk statements with in the kernel source code and would like to monitor those during regular kernel activities. Unfortunately, I have realized that the Kernel Log Buffer size ( CONFIG_LOG_BUF_SHIFT ) cannot be more that 2^21 which is essentially equal to 2M entries. Is there any other way to record more than 2M Kernel messages ? 回答1: You can set the kernel log buffer to log_buf_len=4M in your