1

I need to write a kernel module for a Linux system as shown below.

# uname -a
Linux (none) 3.7.1 #1 SMP Mon Dec 23 06:07:19 PST 2013 i686 GNU/Linux

# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 6
model name      : QEMU Virtual CPU version 2.5+
stepping        : 3
cpu MHz         : 2793.012
cache size      : 4096 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 4
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic sep pge cmov mmx fxsr sse sse2 pni hypervisor
bogomips        : 5586.02
clflush size    : 32
cache_alignment : 32
address sizes   : 36 bits physical, 32 bits virtual
power management:

The Linux box doesn't have kernel headers or the build system (gcc/ld) installed. Hence I need to set it up locally on my system. How can I find the kernel headers for this particular system? The linux kernel on github has only the releases below, none of which matches exactly with the version (v3.7.1) of kernel installed there.

$ git tag | grep v3.7
v3.7
v3.7-rc1
v3.7-rc2
v3.7-rc3
v3.7-rc4
v3.7-rc5
v3.7-rc6
v3.7-rc7
v3.7-rc8
  • 2
    Actually you need to know who provided the kernel. But if you don't care, this is good enough. Likewise, this may help. – Thomas Dickey Jun 15 '18 at 0:08
  • The module needs to be written to solve a challenge. I guess I have no other means to know any more info. What I can conclude is it is running some sort of custom 32 bit kernel, tagged as v3.7.1, inside Qemu emulator. – Holmes.Sherlock Jun 15 '18 at 0:31
2

The archived sources are at kernel.org and are available as compressed tarballs and patchsets in the CDN repository. For version 3.7.1, the following tarballs are available:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.