Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-23-2016, 04:31 AM   #1
LQ Newbie
Registered: May 2016
Posts: 1

Rep: Reputation: 0
insmod gets error

I'm writing a kernel module that receives interrupts for mpc8308 (PowerPC) board. when I make the code for Ubuntu and my current version of kernel it works well with interrupt of keyboard, but when I Cross build it for mpc8308 board ( kernel) and I want to load it into kernel with insmod command I get error:

insmod: cannot insert './intrpt.ko': Function not implemented
my code is:
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>

#define DRIVER_DESC "A sample driver"

static irqreturn_t irq_handler(int irq, void *dev_id, struct pt_regs *regs)
  printk(KERN_ALERT "Hello Interrupt world.\n");
  return IRQ_HANDLED;
* Initialize the module − register the IRQ handler
int init_module()
  free_irq(1, NULL);
  return request_irq(1, irq_handler, IRQF_SHARED, "test_keyboard_irq_handler",
                    (void *)(irq_handler));
* Cleanup
void cleanup_module()
  free_irq(1, NULL);

and output of modinfo ./intrpt.ko is:

filename: ./intrpt.ko
description: A sample driver
license: GPL
vermagic: mod_unload
Old 05-24-2016, 03:47 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Not sure if you're missing something in your code, it looks mostly fine. However, have you tried to insert any module in the kernel? Are you sure that dynamic modules are supported in your kernel image? There is a kernel config option to enable/disable dynamic modules.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
insmod error xakeriah Linux - Newbie 6 09-17-2006 08:57 AM
insmod error 98steve600 Linux - General 1 03-28-2005 04:50 AM
Insmod error Horos23 Linux - Software 2 01-27-2005 11:28 AM
insmod error cstringer18 Linux - Newbie 1 03-01-2004 05:15 PM
insmod error Rex_chaos Linux - General 4 05-17-2002 11:43 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration