Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

kexec format error possibly due to wrong version of insmod used (loading custom kernel modules into stock kernel)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    kexec format error possibly due to wrong version of insmod used (loading custom kernel modules into stock kernel)

    Hi,


    I just want to share with you my experience on building custom kernel module oneself. I tried rk3188 kernel source with AP6210 driver.

    make help
    make rk3188_dongle_defconfig
    make drivers/net/tun.ko

    I used a gentoo stage3 softfloat tarball and simply chrooted into that from the terminal emulator, right on the device. Compiling the kernel worked like a charme and make menuconfig does work fine as well.

    However, I made a fundemental mistake in trying to load the resulting module, which yielded "exec format error" or "module version mismatch" or "kernel version too old" all the time. Since insmod does not seem to be in PATH I used

    busybox insmod -v tun.ko

    The right thing to use is

    /system/bin/insmod tun.ko

    Once I entered that, no complaining about "exec format error" anymore. It seems the busybox binary in stock fimware is too old (2009) or does not match 3.0.36+ for another reason, I did not look further into that. So again, I think this is a huge pitfall, since there are busybox installers on the market that make it easy to install arbitrary busybox versions and have them symlink insmod to busybox.

    If you can't load any modules ALWAYS try loading with /system/bin/insmod before giving up.

    Please feel free to share this information any place you might see it fits. There are probably better places for this info.

    Thanks,
    cmuelle8


    __________________________________________________ _____
    MK809III with mk802 iv stock rom from rikomagic.com, 1080p and AP6210 WLAN working unscaled

    #2
    Re: kexec format error possibly due to wrong version of insmod used (loading custom kernel modules into stock kernel)

    Originally posted by cm8 View Post
    Hi,


    I just want to share with you my experience on building custom kernel module oneself. I tried rk3188 kernel source with AP6210 driver.

    make help
    make rk3188_dongle_defconfig
    make drivers/net/tun.ko

    I used a gentoo stage3 softfloat tarball and simply chrooted into that from the terminal emulator, right on the device. Compiling the kernel worked like a charme and make menuconfig does work fine as well.

    However, I made a fundemental mistake in trying to load the resulting module, which yielded "exec format error" or "module version mismatch" or "kernel version too old" all the time. Since insmod does not seem to be in PATH I used

    busybox insmod -v tun.ko

    The right thing to use is

    /system/bin/insmod tun.ko

    Once I entered that, no complaining about "exec format error" anymore. It seems the busybox binary in stock fimware is too old (2009) or does not match 3.0.36+ for another reason, I did not look further into that. So again, I think this is a huge pitfall, since there are busybox installers on the market that make it easy to install arbitrary busybox versions and have them symlink insmod to busybox.

    If you can't load any modules ALWAYS try loading with /system/bin/insmod before giving up.

    Please feel free to share this information any place you might see it fits. There are probably better places for this info.

    Thanks,
    cmuelle8


    __________________________________________________ _____
    MK809III with mk802 iv stock rom from rikomagic.com, 1080p and AP6210 WLAN working unscaled
    Thanks, a lot of times some busybox versions don't work well, anyway you can test other versions or binary to do that.

    leolas.
    REMEMBER, YOUR FEEDBACK IS VERY IMPORTANT TO US.
    My devices:
    Minix Neo X7; Minix Neo X8-H , Minix Neo Z64W & Z64 (Sponsored by Minix)
    MK902 & MK902II(Sponsored by RKM)
    Beelink M8B & Beelink R89 (Sponsored by Beelink)
    Tronsmart VEGA S89H (Sponsored by
    Gearbest.com)
    MELE-PCG03 (Sponsored by Gearbest.com) Discount Coupon:MPCG03
    Ainol Intel Z3735 MiniPC(Sponsored by Gearbest.com)
    Thanks to them I can try to support your devices http://freaktab.com/core/images/smilies/wink.png

    Comment

    Working...
    X