This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DS-5: Install gator.ko error: unknown symbol

Note: This was originally posted on 29th August 2013 at http://forums.arm.com

Hi all,

I tried to install gator.ko compiled from the latest version of DS-5 v5.15 on galaxy tab 10.1, but it failed. My host machine runs win8 and the target device is galaxy tab 10.1 wifi with cm 10.1. (which I compiled following the instructions listed here http://wiki.cyanogen...uild_for_p4wifi ) However, when I tried to install gator.ko on galaxy tab 10.1 using "insmod gator.ko", the following error appears:

the following error: init_module '/sdcard/gator.ko' failed (No such file or directory)

Then I entered dmesg command in the terminal and the error message is as follows:

gator: Unknown symbol perf_event_release_kernel (err 0)
gator: Unknown symbol perf_event_create_kernel_counter (err 0)

But as I read the kernel code of galaxy tab 10.1 (p4wifi), I could find the corresponding definition of these two functions and they have already been exported by macros such as EXPORT_SYMBOL_GPL. Could anyone help me? Thank you! :)
Parents
  • Note: This was originally posted on 30th August 2013 at http://forums.arm.com


    I did use the exact same toolchain I used to build the kernel to build gator.ko. And I did not use Android NDK, instead, I used the cross compiler of the prebuilt tools downloaded along with the kernel source when building cm 10.1 ( http://wiki.cyanogen...uild_for_p4wifi).


    Fantastic, thank you for confirming this.


    To the kernel module gator.ko side:

    export ARCH=arm
    export CROSS_COMPILE=/p/arch/Xdong/android_src/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-
    make -C /home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4 M=`pwd` clean
    make -C /home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4 M=`pwd` CFLAGS_MODULE=-fno-pic modules

    And here is the output when compiling gator.ko:

    make: Entering directory `/home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4'
      CLEAN   /home/vax7/p2/arch/Xdong/android_modules/gator-driver
      CLEAN   /home/vax7/p2/arch/Xdong/android_modules/gator-driver/.tmp_versions
      CLEAN   /home/vax7/p2/arch/Xdong/android_modules/gator-driver/Module.symvers
    make: Leaving directory `/home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4'
    make: Entering directory `/home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4'
      CHK  gator_events.h
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_main.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_irq.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_sched.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_net.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_block.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_meminfo.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_perf_pmu.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_mmaped.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_armv6.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_armv7.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_l2c-310.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_scorpion.o
      LD [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator.o
      Building modules, stage 2.
      MODPOST 1 modules
      CC      /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator.mod.o
      LD [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator.ko
    make: Leaving directory `/home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4


    That looks perfect.


    To the kernel side:
    export ARCH=arm
    export CROSS_COMPILE=/p/arch/Xdong/android_src/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-
    make cyanogenmod_samsung_p4wifi-jb_defconfig
    make modules -j4

    where cyanogenmod_samsung_p4wifi-jb_defconfig have already been edited to enable those options listed in README_Streamline.txt.


    I see you building the kernel modules here, but not the kernel itself.  Usually a uImage or zImage is built then installed on the device.  Are you also doing this?


    I have run "cat /proc/kallsyms" and there are a lot of lines in the output. However, when I run "cat /proc/kallsyms | grep perf_event", I got nothing.


    That is concerning - you should see the perf_event entries.  My best guess is that the kernel config you have on your host machine (where you are cross compiling everything) has been updated to include CONFIG_PERF_EVENTS but the kernel running on the device has not yet been updated.  I do not know how to do this for your device, but I think if you can do it it will resolve the "Unknown symbol" errors.
Reply
  • Note: This was originally posted on 30th August 2013 at http://forums.arm.com


    I did use the exact same toolchain I used to build the kernel to build gator.ko. And I did not use Android NDK, instead, I used the cross compiler of the prebuilt tools downloaded along with the kernel source when building cm 10.1 ( http://wiki.cyanogen...uild_for_p4wifi).


    Fantastic, thank you for confirming this.


    To the kernel module gator.ko side:

    export ARCH=arm
    export CROSS_COMPILE=/p/arch/Xdong/android_src/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-
    make -C /home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4 M=`pwd` clean
    make -C /home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4 M=`pwd` CFLAGS_MODULE=-fno-pic modules

    And here is the output when compiling gator.ko:

    make: Entering directory `/home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4'
      CLEAN   /home/vax7/p2/arch/Xdong/android_modules/gator-driver
      CLEAN   /home/vax7/p2/arch/Xdong/android_modules/gator-driver/.tmp_versions
      CLEAN   /home/vax7/p2/arch/Xdong/android_modules/gator-driver/Module.symvers
    make: Leaving directory `/home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4'
    make: Entering directory `/home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4'
      CHK  gator_events.h
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_main.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_irq.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_sched.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_net.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_block.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_meminfo.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_perf_pmu.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_mmaped.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_armv6.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_armv7.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_l2c-310.o
      CC [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator_events_scorpion.o
      LD [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator.o
      Building modules, stage 2.
      MODPOST 1 modules
      CC      /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator.mod.o
      LD [M]  /home/vax7/p2/arch/Xdong/android_modules/gator-driver/gator.ko
    make: Leaving directory `/home/vax7/p2/arch/Xdong/android_src/android/system/kernel/samsung/p4


    That looks perfect.


    To the kernel side:
    export ARCH=arm
    export CROSS_COMPILE=/p/arch/Xdong/android_src/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-
    make cyanogenmod_samsung_p4wifi-jb_defconfig
    make modules -j4

    where cyanogenmod_samsung_p4wifi-jb_defconfig have already been edited to enable those options listed in README_Streamline.txt.


    I see you building the kernel modules here, but not the kernel itself.  Usually a uImage or zImage is built then installed on the device.  Are you also doing this?


    I have run "cat /proc/kallsyms" and there are a lot of lines in the output. However, when I run "cat /proc/kallsyms | grep perf_event", I got nothing.


    That is concerning - you should see the perf_event entries.  My best guess is that the kernel config you have on your host machine (where you are cross compiling everything) has been updated to include CONFIG_PERF_EVENTS but the kernel running on the device has not yet been updated.  I do not know how to do this for your device, but I think if you can do it it will resolve the "Unknown symbol" errors.
Children
No data