[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Loadable module support for Petalinux w/MMU?
John Williams wrote:
Hi Steve,
Steven Hein wrote:
Does anyone have loadable kernel module support working in
the Petalinux w/ the Microaze MMU enabled? I tried to build
the kernel with module support enabled, and I got this
compile error:
This was discussed a couple of months ago, and I posted a patch. It
will be in the archives, but let us know if you are unable to track it
down.
cheers,
Thanks John, I found it.
After applying the patch, the printk's work.....however, I am now
having troubles with strings that are statically initialized in a
structure. Here's a simple example:
#include <linux/module.h>
#include <linux/types.h>
static struct attribute tstattr = { .name = "tstattr", .mode = 0654,
.owner = THIS_MODULE };
static void __exit
hello_exit (void)
{
return;
}
static int __init
hello_init (void)
{
printk ("name=|%s| mode=0%o\n", tstattr.name, tstattr.mode);
return 0;
}
module_init (hello_init);
module_exit (hello_exit);
When I load this module (compiled with mb-linux-gcc), I see:
# insmod
/tmp/hello.ko
name=|hello| mode=0654
The value of tstattr.name is printed as "hello", not as "tstattr"
which it should be!
(Note that the string I see within the |'s varies depending on the
complexity of the loadable module. The original problem I
was trying to debug was problems creating a sysfs file. Based
on the output in those cases, I could see that this isn't a simple
printk problem, but a problem with the initialization of the
string.)
Can anyone offer any insight into this type of problem?
Thanks,
Steve
___________________________
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/