1、编译linux内核:linux-2.6.32-devkit8500
为了能够安装上systemtap,要对内核进行一些修改:进入到arch/arm/include/asm/ptrace.h,修改如下,在下面几行后面
#define isa_mode(regs) \ ((((regs)->ARM_cpsr & PSR_J_BIT) >> 23) | \ (((regs)->ARM_cpsr & PSR_T_BIT) >> 5)) #define processor_mode(regs) \ ((regs)->ARM_cpsr & MODE_MASK) #define interrupts_enabled(regs) \ (!((regs)->ARM_cpsr & PSR_I_BIT)) #define fast_interrupts_enabled(regs) \ (!((regs)->ARM_cpsr & PSR_F_BIT))添加:
#define condition_codes(regs) \((regs)->ARM_cpsr &(PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT))最后变成:
#define isa_mode(regs) \ ((((regs)->ARM_cpsr & PSR_J_BIT) >> 23) | \ (((regs)->ARM_cpsr & PSR_T_BIT) >> 5)) #define processor_mode(regs) \ ((regs)->ARM_cpsr & MODE_MASK) #define interrupts_enabled(regs) \ (!((regs)->ARM_cpsr & PSR_I_BIT)) #define fast_interrupts_enabled(regs) \ (!((regs)->ARM_cpsr & PSR_F_BIT)) #define condition_codes(regs) \ ((regs)->ARM_cpsr &(PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT)) /* Are the current registers suitable for user mode? * (used to maintain security in signal handlers) */然后开始编译:
cd linux-2.6.32-devkit8500make distcleanmake omap3_devkit8500_android_defconfigmake menuconfig在图形界面中开启如下选项,这些是systematp必须需要的开关:
CONFIG_KPROBES: General Setup -> Kprobes CONFIG_RELAY: General Setup -> user spacerelay support CONFIG_PROFILING: General Setup -> Profilingsupport (EXPERIMENTAL) + General Setup -> Oprofile system profiling(EXPERIMENTAL)另外还有一个开关要打开,这主要是为了符合你板子屏幕大小,打开屏幕大小选项: