How do I extract the kernel configuration from a kernel image file? The kernel image file type is: The kernel has been compiled with CONFIG_IKCONFIG enabled. However, returns Note: I am trying the get the config without booting the kernel. Answer If the kernel has been compiled with CONFIG_IKCONFIG=m (note the m), the configuration in stored in a module (configs.ko)
Tag: linux-kernel
How to add a member to task_struct to bypass “compiletime_assert”
I need to add members to task_struct in Linux kernel 4.8.0. However, when I did it and tried to build the kernel, the error message shows: How to get rid of such errors and build my kernel successfully? Answer The assertion you’re encountering is triggered by a macro (CHECK_MEMBER_AT_END_OF) that checks that the thread member of struct task_struct is its
Linux console output on multiple UARTs
My embedded board has 2 UARTs. I want to have console output on both the UARTs. In kernel/Documentation/console/console.txt it’s mentioned that: you can only define one console per device type (serial, video). Does this mean I can use only one UART as console? Or, is it possible to redirect the console output to both of these UARTs? Answer It’s possible
Linux layer on macOS [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
PC bootstrap process step by step
The bootstrapping process is a bit confusing, I hope I understand it correctly. I will try to describe my understandings and hopefully can be corrected. As this is an extremely important and I want to dive into the small details. BIOS: It sets up an interrupt descriptor table and initializes various devices. After initializing all the important devices the BIOS
With hypervisor, How to surveillance the time when target process is created or terminated
I would like to make my hypervisor on linux for detecting and surveillance target process like a malware. To achieve this, the hypervisor need to detect processes that is created or terminated or task switched. On intel CPU, I knew that cr3 register indicate those roles. for example, when cr3 register value is changed, vmexit caused. And it means executed
How to avoid double creating directories in /proc?
I’m writing a Linux kernel module, and I’d like to create a subdirectory, /proc/foo/, and then expose several artificial files inside it that will be generated on the fly by my module. I know I can use proc_mkdir to create the foo directory, but if it already exists dmesg will display a warning, and I’d prefer to keep the log
Example device-tree-aware i2c gpio driver for Linux?
Is there a good example device-tree-aware i2c gpio driver for Linux? I’ve been looking at gpio-pcf857x but it has a header file containing struct pcf857x_platform_data which is used in board files. I am looking for a similar example, but where the i2c id is defined-in/retrieved-from the device tree. Answer Take a look at max732x.c driver (code). As for I2C ID
How does Docker run a Linux kernel under macOS host?
I installed Docker on my macOS Sierra as follows. Note I don’t have VirtualBox installed. My macOS details. Once I run Docker from launchpad, I am able to run Docker containers. My question is how does Docker manage to run a Linux kernel within macOS? I thought Docker would at least require boot2docker or some other such Linux kernel running
Kernel API to get Physical RAM Offset
I’m writing a device driver (for Linux kernel 2.6.x) that interacts directly with physical RAM using physical addresses. For my device’s memory layout (according to the output of cat /proc/iomem), System RAM begins at physical address 0x80000000; however, this code may run on other devices with different memory layouts so I don’t want to hard-code that offset. Is there a