[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Problem with 'hello world' module



Hi people,


I'm trying to do a simple hello world module for uClinux, the ismod
command starts the module (it's shown by lsmod) but it doesn't print
anything. I follow the steps of chapters two and four of Linux Device
Drivers (2nd edition) but it doesn't work yet. So i have both busybox
syslogd and klogd running, and the other messages, like sucessfull
login message, are correctly logged into the log file.
I also try reading from /proc/kmsg without syslogd/klogd running but
the message never are there and also not appear in the terminal (I
have the option "Console on UARTLITE" checked if it's mind (but with
this option unchecked also doesn't work)).

I put the hello.c on uClinux-dist/linux-2.4.x/drivers/char and add a
line 'obj-m +=hello.o' to the Makefile on this folder. I try with the
original hello world module example from LDD and the source (desperate
edited :)) you can see bellow.

I'm using the version from CVS the uname -a gives: "Linux uclinux-auto
2.4.34.5-uc0 #120 Ter Ago 14 11:37:36 BRT 2007 microblaze".

I am running the system in a a Digilent XUVP board. I know that is a
very boring topic but I already search the list but don't find
anything useful.

Hope somebody can give me some light.


Thanks in advance, Josue.




#define MODULE
#include <linux/module.h>
#include <linux/kernel.h>

int init_module(void)
{
   printk(KERN_CRIT "Hello, world\n");
   printk("<0>Hello, world\n");
   printk("<1>Hello, world\n");
   printk("<4>Hello, world\n");
   printk("<6>Hello, world\n");

   printk(KERN_CRIT "<1>I'm trashed; giving up on");
}

void cleanup_module(void)
{
    printk("Goodbye cruel world\n");
    printk("<0>Goodbye cruel world\n");
    printk("<1>Goodbye cruel world\n");
    printk("<4>Goodbye cruel world\n");
    printk("<6>Goodbye cruel world\n");
}

module_init(init_module);
module_exit(cleanup_module);
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/