Jump to content

Compiling sysdig for 4.4.1-sunxi


Rui Ribeiro

Recommended Posts

Been trying to compile the handy sysdig util in armbian.

 

Installed it with:

 

apt-get install -t jessie-backports sysdig sysdig-dkms

 

After the normal install that worked, but when running gave this error:

 

error opening device /dev/sysdig0. Make sure you have root credentials and that the sysdig-probe module is loaded.

 

I tried:

 

/usr/lib/dkms/dkms_autoinstaller start

 

One of the compilation errors I manage to correct commenting the include of asm-offsets.h in /var/lib/dkms/sysdig/0.5.1/build/main.c

 

I also managed to solve the complaints about the lack of fixdep with:

 

make fixdep

make bin2c

 

However  now when trying to compile it with /usr/lib/dkms/dkms_autoinstaller start

 

if fails with:

 

/bin/sh: 1: scripts/mod/modpost: not found

scripts/Makefile.modpost:91: recipe for target '__modpost' failed

make[1]: *** [__modpost] Error 127

Makefile:1387: recipe for target 'modules' failed

make: *** [modules] Error 2

make: Leaving directory '/usr/src/linux-headers-4.4.1-sunxi'

 

It seems I need to do

 

make modules_prepare

 

either in the linux source or headers directory. I do not have the linux source installed, and it is giving this error in the headers directory:

 

oot@ruir:/usr/src# cd linux-headers-4.4.1-sunxi/

root@ruir:/usr/src/linux-headers-4.4.1-sunxi# make modules_prepare

  CHK     include/config/kernel.release

  CHK     include/generated/uapi/linux/version.h

  CHK     include/generated/utsrelease.h

make[1]: *** No rule to make target 'arch/arm/tools/gen-mach-types', needed by 'include/generated/mach-types.h'.  Stop.

arch/arm/Makefile:313: recipe for target 'archprepare' failed

make: *** [archprepare] Error 2

 

 

Any idea?

 

TIA,

Rui

Link to comment
Share on other sites

@Rui

 

I have probably already put my little workaround script on the forum for DKMS modules after I update Armbian kernel (and before reboot)

#!/bin/bash
sudo rm /tmp/.reboot_required
pushd .
for f in $(ls -d /usr/src/linux-headers-*-sunxi)
do
        cd $f
        sudo make scripts
done
popd
sudo dpkg -i frandom-dkms_1.1-0centrych4_armhf.deb
sudo apt-get install --reinstall -t jessie-backports sysdig sysdig-dkms

Link to comment
Share on other sites

Something must be amiss with the  kernel sources?

 

I had to change in /lib/modules/4.4.1-sunxi/build the following occurrences of 4.4.1 to 4.4.1-sunxi

 

include/generated/utsrelease.h:#define UTS_RELEASE "4.4.1"
include/config/auto.conf.cmd:ifneq "$(KERNELVERSION)" "4.4.1"
include/config/kernel.release:4.4.1

 

And then I was able to compile the sysdig module without problems. 

 

Now insmod does not load due to other problem:

 

# insmod ./sysdig-probe.ko 

insmod: ERROR: could not insert module ./sysdig-probe.ko: Unknown symbol in module

root@ruir:/lib/modules/4.4.1-sunxi/updates/dkms# dmesg | tail

[165564.069037] sysdig_probe: Unknown symbol tracepoint_probe_register (err 0)

[165565.581076] sysdig_probe: Unknown symbol tracepoint_probe_unregister (err 0)

[165565.581439] sysdig_probe: Unknown symbol for_each_kernel_tracepoint (err 0)

[165565.581493] sysdig_probe: Unknown symbol tracepoint_probe_register (err 0)

[165571.445442] sysdig_probe: Unknown symbol tracepoint_probe_unregister (err 0)

[165571.445804] sysdig_probe: Unknown symbol for_each_kernel_tracepoint (err 0)

[165571.445858] sysdig_probe: Unknown symbol tracepoint_probe_register (err 0)

[165961.635924] sysdig_probe: Unknown symbol tracepoint_probe_unregister (err 0)

[165961.636286] sysdig_probe: Unknown symbol for_each_kernel_tracepoint (err 0)

[165961.636338] sysdig_probe: Unknown symbol tracepoint_probe_register (err 0)

Link to comment
Share on other sites

I was arriving at that zador, thanks. CONFIG_DYNAMIC_FTRACE However "ARM presently does not support ftrace syscall?" This one from 2011...not sure wether still holds up. Will check out later, I have not compiled kernels for ages, and not fancying compiling one from scratch right one.

Link to comment
Share on other sites

It's available now

  | Symbol: DYNAMIC_FTRACE [=n]                                             
  | Type  : boolean                                                         
  | Prompt: enable/disable function tracing dynamically                     
  |   Location:                                                             
  |     -> Kernel hacking                                                   
  | (1)   -> Tracers (FTRACE [=n])                                          
  |   Defined at kernel/trace/Kconfig:446                                   
  |   Depends on: TRACING_SUPPORT [=y] && FTRACE [=n] && FUNCTION_TRACER [=n] && HAVE_DYNAMIC_FTRACE [=y] 
Link to comment
Share on other sites

Thanks for the attention Zador. I understand you guys in ArmBian are cross compiling; is the /usr/src/linux-headers-4.4.1-sunxi/.config file that we have more or less up-to-date? I have an SSD disk, maybe give it a go natively. 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines