Skip to content
Advertisement

Tag: linux-kernel

Unable to write on /dev/* files

I’m writing a basic char device driver for Linux kernel. For this, the code flow I have considered is as follows: alloc_chrdev_region() -> to use dynamic allocation of major number class_create() -> to create device class in sysfs device_creat() -> to create device under /dev/ cdv_init() -> to initialize char device structure cdev_add() -> to add my device structure in

Regarding gcov output in Linux kernel?

I am running gcov in Linux kernel tree , I am getting correct report but some summary that printed at every file header is coming incorrect like below :- Here we can see number of runs and programs runs are coming zero which is not correct. what could be reason of this bug ? Answer From here: https://www.kernel.org/doc/Documentation/gcov.txt And are

android Use Linux tools stored at assets folder

I want to use tools from Linux which not available in Android by default such as iw and iperf. I saw Android applications that use this tools (like this). There are two ways to do it. First: get root rights on device and put file of the tool to the system/bin/ folder. Second: put file of the tool to assets

Linux Kernel – What does it mean to “put” an inode?

I saw the following comment atop the iput function: To me that sounds like it’s not “putting” anything, but “dropping” it. I’m aware of the drop_inode function, which gets called from iput in some cases, so the usage of the term “put” is even more confusing here. Answer put is common terminology in kernel code for decrementing an object’s reference

How to print value of C macro in configure

I have configure.in script. I want to invoke configure ( after autoheader && autoconf ) and see value of PAGE_SHIFT macro from system header page_types.h. Something like this: checking PAGE_SHIFT… 12 I’ve tried those: 1. Result: macro PAGE_SHIFT was detected, but haven’t been printed 2. Result: doesn’t work 3. Result: works, but can’t be used with cross-compile method was suggested

Unbound workqueue’s kthreads CPU affinity

Is there a way to set CPU affinity for unbound workqueue’s kthreads (those that named kthread/uXX:y)? Something like cpu mask for regular workqueues. Is it a good idea to set it for each kthread using taskset? Answer Workqueue subsystem exports sysfs attribute for setting cpu affinity for unbound workers. Code can be found in Workqueue.c: So any user space application

Kernel booting error – Can I get the log?

I replaced the kernel with the new one I built. Unfortunately, the system hangs during the booting process of the kernel. The booting messages shown just in few seconds, is that possible to get these booting messages ( logs ) ? Thanks Answer They are stored in /var/log/kern.log

modify the kernel version information in the menuconfig

I downloaded the kernel source and by typing the following command I can see the linux kernel version is 3.02.02 for example. However, due to some reasons, I have to change it to say… 3.01.01-12-generic I found the appending option in the menuconfig but this does not meet my need. Please let me know if this is doable and how

Advertisement