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 (2.6.29.6 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_AUTHOR "AVM"
#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);
}
MODULE_LICENSE("GPL");
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_SUPPORTED_DEVICE("testdevice");
and output of modinfo ./intrpt.ko
is:
filename: ./intrpt.ko
description: A sample driver
author:
license: GPL
depends:
vermagic: 2.6.29.6-rt23 mod_unload