- Tue Feb 02, 2016 2:49 am
#187783
When
cat /sys/module/hellotest/sections/.text = 0x00000000
Try this way
1.
gedit /root/project_board/free_imx/myandroid/kernel_imx/kernel/module.c
//in function load_module(struct load_info *info, const char __user *uargs, int flags)
//after
err = post_relocation(mod, info);
//add
printk(KERN_WARNING ".ko name=%s coreaddr=%x\n", mod->name, mod->module_core);
[mod->module_core] will apply to add-symbol-file later
2.
root@matrix_io:/ # insmod /data/hellomod/hellotest.ko
[ 590.764322] .ko name=hellotest coreaddr=7f11c000
3.
in eclipse right click your project
Debug As -> Debug Configurations -> GDB Hardware Debugging
click [Startup tab]
uncheck the all items on startup page
add those lines under [Halt] box but do not check [Halt]
add-symbol-file /root/project_board/free_imx/out/matrix_io/uboot/u-boot 0x7f11c000
then click [Apply]
cat /sys/module/hellotest/sections/.text = 0x00000000
Try this way
1.
gedit /root/project_board/free_imx/myandroid/kernel_imx/kernel/module.c
//in function load_module(struct load_info *info, const char __user *uargs, int flags)
//after
err = post_relocation(mod, info);
//add
printk(KERN_WARNING ".ko name=%s coreaddr=%x\n", mod->name, mod->module_core);
[mod->module_core] will apply to add-symbol-file later
2.
root@matrix_io:/ # insmod /data/hellomod/hellotest.ko
[ 590.764322] .ko name=hellotest coreaddr=7f11c000
3.
in eclipse right click your project
Debug As -> Debug Configurations -> GDB Hardware Debugging
click [Startup tab]
uncheck the all items on startup page
add those lines under [Halt] box but do not check [Halt]
add-symbol-file /root/project_board/free_imx/out/matrix_io/uboot/u-boot 0x7f11c000
then click [Apply]