I have a vmlinuz ELF image file. I need to get the kernel version from the image file without disassembling it. Is it possible to get kerenel version from offsets of that compressed image file? The file is ELF 64-bit MSB executable, statically linked, not stripped. Answer As previously mentioned, the version number is hardcoded into the compressed image file.
Tag: linux-kernel
How to compile / link / build a small sized Loadable Kernel Module ( LKM )?
I successfully built this trivial LKM with gcc but the resulting binary is of size 70kB. What CFLAGS and make arguments would you suggest to make it smaller? Answer The standard Linux kernel is compiled in an optimal way already unless it’s a debug version or some very specific options are turned on. So the simplest Makefile for an external
Is there a netfilter hook that has the receiving socket already associated?
The NF_INET_LOCAL_OUT hook has skb->sk pointing to a struct sock for the socket that sent the packet. If there a hook that has it set for the socket that receives the packet? In the NF_INET_LOCAL_IN hook, skb->sk is null. Will I have to use __inet_lookup_skb()? If so, what is the complexity of that function? EDIT: looks like __inet_lookup_skb() is for
YOCTO Change kernel version and select drivers
I am trying to compile a new Linux kernel obtained from https://github.com/qoriq-open-source/linux (version 4.9) for T1042D4RDB-64B embedded board using Yocto. It’s currently using 4.1.35-rt41. I followed these steps: bitbake virtual/kernel -c cleansstate bitbake virtual/kernel -c patch replacing git folder with my new kernels source code (https://github.com/qoriq-open-source/linux) make ARCH=powerpc menuconfig bitbake virtual/kernel Result is The new kernel has compiled successfully but
What is the state of page tables after kexec’ing into an ELF x86_64 binary?
I’m kexec’ing into a binary i wrote compiled to an x86_64 ELF. It runs fine. Since it’s a 64-bit binary, i know the processor must be in 64-bit long mode. Which requires paging to be used, so I know paging must be turned on. My question is, what is the state of these page tables? Is there some area, such
How to extract testNG results in Jenkins console using Linux command
I’m trying to extract the user who is triggered the Jenkins job and testNG execution status from Jenkins console. Need to get below details from Jenkins console using Linux command. Jenkins console log: Started by user achuMohan =============================================== TransferMoneyTest Tests run: 10, Pass: 5 Failures: 3, Skips: 2 =============================================== Output: I tried the below command to get all the console
How to get function name after ‘ } ‘ in ftrace/ trace-cmd
I have recently started working with ftrace. I able to get function graph trace using With the above commands I can see time taken by function to finish before ‘ } ‘ But I want to script for listing functions taking more time than 10ms. Can anyone help me to achieve this? Answer TLDR it can be achieved by explanation
Ubuntu compiling kernel module first time
I’m trying to compile a simple kernel module for the first time: I’ve used obj-m += hello-1.o (that’s the name of the module) but i’m getting an error: obj−m: command not found Why is this happening? I tried looking online for a solution, but nothing I found helped.. EDIT: After modifying based on @Mathieu answer , I get the following
How to send actions directly to input event?
I have a touch screen with events at /dev/input/event12 and /dev/input/event13. /dev/input/event12 is the main touch input, and in essence, I’d like to send instructions to the event directly to control behavior (ie, click location etc). Tools like xdotool do not want to work because this device is being set as a second pointer (see: https://dwm.suckless.org/multi-pointer/) and the recommendation of
Linux kernel does not see all components on my at91sam9g20 board
I am working with a Stamp9g20 embedded chip. It is based on the Atmel at91sam9g20 platform. For a client I need to upgrade the kernel to a newer version. After a bit of research, I landed on the Linux4SAM pages and their additional yocto layer, complete with a 4.14 kernel! However, when I compile that kernel, I don’t see all