Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9118455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:09:30+00:00 2026-06-17T05:09:30+00:00

Is it possible, to use a Loadable Kernel Module, compiled for 3.0.8+ mod_unload ARMv5

  • 0

Is it possible, to use a Loadable Kernel Module, compiled for 3.0.8+ mod_unload ARMv5 (my self-make’d kernel) in a kernel with version 3.0.31-gd5a18e0 SMP preempt mod_unload ARMv7 (android stock-kernel)?

The module itself contains nearly nothing, just

// Defining __KERNEL__ and MODULE allows us to access kernel-level code not usually available to userspace programs.
#undef __KERNEL__
#define __KERNEL__

#undef MODULE
#define MODULE

// Linux Kernel/LKM headers: module.h is needed by all modules and kernel.h is needed for KERN_INFO.
#include <linux/module.h>    // included for all kernel modules
#include <linux/kernel.h>    // included for KERN_INFO
#include <linux/init.h>        // included for __init and __exit macros

MODULE_AUTHOR("martin");
MODULE_LICENSE("GPL");

static int __init hello_init(void)
{
    //printk(KERN_INFO "Hello world!\n");
    return 0;    // Non-zero return means that the module couldn't be loaded.
}

static void __exit hello_cleanup(void)
{
    //printk(KERN_INFO "Cleaning up module.\n");
}

module_init(hello_init);
module_exit(hello_cleanup);

I’m forcing the insmod but then the kernel-crashes:

<1>[ 328.025360] Unable to handle kernel NULL pointer dereference at
virtual address 00000061 <1>[ 328.025695] pgd = c1be8000 <1>[
328.025848] [00000061] *pgd=00000000 <0>[ 328.026184] Internal error: Oops: 5 [#1] PREEMPT SMP <4>[ 328.026519] Modules linked in:
airstream_interceptor(+)

I use

CROSS_COMPILE=/home/adminuser/WORKING_DIRECTORY/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
KDIR    ?= /home/adminuser/WORKING_DIRECTORY/android-3.0
ARCH=arm

for both building the kernel and now building module. But the system on it should be inserted uses it’s own factory kernel.

I try to build a kernel modul which can be used on several android-phones (arm,armv5,armv7 and so on) but I want to use 1 for all (if this is possible in any way).

(edit)

CONCLUSION #1

  1. it should not be possible to compile one version for all ARM-devices:

    compile LKM for kernel 3.0.8 for ARMv5 and use it on a kernel 3.0.39 ARMv7

  2. it may (untested at the moment!) be possible, to compile on the lowest level (ARMv5) and use it in higher levels (ARMv6, ARMv7)

    compile LKM for kernel 3.0.8 for ARMv5 and use it on a kernel 3.0.8 ARMv7

  3. it may be possible to interchange the kernel-versions (maybe if simple LKM)

    compile LKM for kernel 3.0.8 for ARMv5 and use it on a kernel 3.0.39 ARMv5

Open questions at the moment:

1.)

I tried (with common-kernel 3.0.8 and omap-kernel 3.0.39) to build for ARMv7 but the result is always a ARMv5-LKM.

I manually edited the .config, removed the ARMv5-line and added the ARMv7-line (which was nowhere in the .config):

#CONFIG_CPU_32v5=y # I added the #
CONFIG_CPU_V7=y # didn't exist 
CONFIG_CPU_32v7=y # didn't exist 

but if I then re-run “make” on the kernel-source, the file get’s automatically edited and my v7-config where removed.
Some months ago, I remember this was no problem, I just added the 2 lines and it worked.

Is this a thing of the kernel-source or the used toolchain?

2.)

What is the difference between e.g. the “omap-kernel” and the “common-kernel” in view of the LKM-building? Just an other kernel-version (e.g. common-kernel has now 3.0.53 and omap-kernel 3.0.39)? I think I can “ignore” the specific variants and use the common-kernel for LKM-compiling?

Many thanks to alkalinity, auselen & Marko at the moment – you’re helping me out of the mud.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:09:31+00:00Added an answer on June 17, 2026 at 5:09 am

    No, this isn’t possible. The Linux kernel is architecture-specific, and ARMv5 modules are not compatible with ARMv7. There are different header files needed, which will have different instruction sets, or register mappings, or any number of important variants.

    In any event, the kernel versions are different in this case too, which means that the kernel API can vary, and therefore the kernel module will not work in all likelihood, even if the architecture were the same.

    You’ll have to cross-compile separate versions of your kernel module. This isn’t too difficult if you have access to the whole kernel tree. The manufacturer should have released their kernel sources (as per the GPL). If they have not, they owe you sources.

    If you’re interested in reading up on the specifics of loading kernel modules, IBM has a great “anatomy” series of articles. Here’s on on loadable kernel modules. Jump to the section on “module loading details” to understand why the kernel rejects insertion of your module in the absence of the force-load.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I develop a loadable kernel module (LKM) should I use C? Is it
Is it possible use mod_rewrite to resolve addresses hosted on another server? Say I
Is it possible use a MySQL query to perform this kind of check? If
I need a control having these features: It should be possible use it in
Is possible to use ArcSDE API in .NET(C#) ? http://edndoc.esri.com/arcsde/9.2/api/capi/dbconnects/dbconnects.htm Thanks
Is this possible to use Ajax.Beginform with update target inside of ajax form. like
Is it possible to use JMF in Android? JMF has good functionality? I'm basically
Is it theoretically possible to use in-app purchases to update an iOS app automatically?
is it possible to use chaplin with meteor? Any idea, advice, pointers or guidance
Is it possible to use a vector graphic as a custom form shape in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.