Having problems to compile a new kernel
I have a task for the school where i must do a system call with a new kernel. The only problem that im having is that when i run the code "sudo make install" it shows the following errors:enter image...
View ArticleWhat is importance of using GPL license in linux device driver?
What is the exactly benefit of using MODULE_LICENSE("GPL") in linux device driver development?What will we lack or gain by not using or using it?Which kernel symbols we will not able to use when we...
View ArticleSemaphore behaviour between the thread and an ISR
I have this question lingering in my mind since I’m new to RTOS concepts.Let’s suppose a task/thread and an ISR are using a semaphore resource. Now Interrupt triggers and ISR tries toacquire a...
View Articlemiss asm/types.h in linux compile
lenge@lenge-pc:/lenge/linux/kernel_online$ git branch master * tag_v4.15 CONFIG is defconfig. when I compile kernel(v4.15), error occurred, as follows:In file included from...
View Article"Docker Desktop - WSL kernel version too low" error [closed]
After installing and running Docker, unfortunately the following error comes up"Docker Desktop - WSL kernel version too low"The rest of the error message:Docker Desktop requires a newer WSL kernel...
View ArticleDebugging PCIe Switch Configuration in Linux Kernel Code
I’m debugging PCIe enumeration and configuration on x86-64 with a PCIe switch between the RC and endpoints. I want to add printks in Linux kernel to observe CONFIG 0 and CONFIG 1 TLP handling.Which...
View ArticleKernel Code : where can I find and how to debug the kernel
Recently I have installed Ubuntu 12.04 LTS ISO image in my desktop. Below is the output of the kernel version I have installed:# uname -r3.5.0-41-genericI am trying to develop a VFS and want the kernel...
View ArticleMap an address to itself in protected mode?
I'm experimenting with Linux kernel, trying to reduce its codebase to a minimal "hello, world" that is made of as few files as possible, so that I can get a good understanding of its build and boot...
View ArticleLinux kernel lock-free increment WITHOUT synchronization primitives
I am developing a Linux kernel module and need to increment a number stored in a hashtable element. However, I want to achieve this in a lock-free manner and without using traditional synchronization...
View ArticleHow to install Virtualbox on Rock 9 linux server [closed]
I'm trying to install VirtualBox on my Rocky Linux 9 server. Could anyone provide the step-by-step instructions or a guide to successfully set it up?Requirements:Rocky Linux 9 (x86_64)
View Articlesetfattr operation not supported
$ touch foobar$ setfattr -n user.foo -v bar foobarsetfattr: foobar: Operation not supportedThe file as all permission, same for folder. What could be the issue here? It's Ubuntu 9.10This is in my...
View ArticleConvert a char array into an integer (big and little endian)
I am trying to convert a char array into integer, then I have to increment that integer (both in little and big endian).Example:char ary[6 ] = { 01,02,03,04,05,06};long int b=0; // 64 bitsthis char...
View ArticleWhat limits the number of IRQ descriptors a Linux platform can support?
So I have an older hardware platform, which has a hard-coded NR_IRQS defined in the kernel to specify the number of available IRQ descriptors. This limit corresponds to the total number of hardware...
View ArticleTrace the ip_recv() function using BPF, but only packets from the lo...
I wrote a BPF program to trace the ip_rcv function, but it only captures packets from the lo interface.#include "vmlinux.h"#include <bpf/bpf_core_read.h>#include <bpf/bpf_helpers.h>#include...
View ArticleWriting character device driver, ioctl() vs normal read/write?
I've been toying with writing a character device module for the linux kernel and I came to a bit of a confusing stop.I see online there is talk of using ioctl() to transfer commands/data from user...
View ArticleCan a single pipe be used for 2 way communication between parent and a child?
Suppose I use pipefdn[2] and pipe() on it , can bidirectional communication be implemented using a single pipe or do you need 2 pipes ?
View ArticleHow to get the CPU usage in GO
I have a go program that run on Unix\Linux based OS, I try to get the CPU usage of my process and couldn't find a suitable solution for my problem.I asked ChatGPT for a way, and he gave me this:func...
View ArticleAndroid app virtual memory space layout problem
I have a 64 bit app run on Android 8.1 in docker container, system info:system: Linux 5.4.40-gd8a93235f #2 SMP PREEMPT Tue Sep 8 08:26:34 CST 2020 aarch64 GNU/Linuxcpu: arm64when the app starts, the...
View ArticleProblem calculating CPU usage of my program running on Linux [closed]
I have a go program that run on Unix\Linux based OS, I try to get the CPU usage of my process and couldn't find a suitable solution for my problem.I asked ChatGPT for a way, and he gave me this:func...
View ArticleWhy is a vendor specific kernel module not loaded?
I modified a vendor kernel module for a Pixel Device based on the AOSP kernel. This module is gs_thermal.ko. I pushed it to the device with adb push gs_thermal.ko vendor/lib/modules/ (the location...
View Article