hi:
I can run module utility on uClinux-20070130 through
SkyEye.The following steps only tested on linux-2.4.x.
1. edit your module file as the following example.
/* hello example module for linux-2.4.x */
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/ioport.h>
MODULE_AUTHOR("Michael.Kang <[EMAIL PROTECTED]>");
MODULE_DESCRIPTION("SkyEye Testing ");
MODULE_LICENSE("GPL");
static int __init hello_init(void)
{
printk(KERN_INFO "hello world!\n");
return 0;
}
static void __exit hello_cleanup(void)
{
}
module_init(hello_init);
module_exit(hello_cleanup);
2.Compile your module as the following command.
arm-elf-gcc -c -D__MODULE__ -D__KERNEL__
-I/home/ksh//source/uClinux-dist/linux-
2.4.x/include hello.c
3.config your uClinux-dist to support module in linux kernel.
run make menuconfig, enter kernel config menu, than select module support menu.
And add your hello.o module to file system of uClinux.
Build your uClinux by run "make dep" and "make"
4. run your module on uClinux by SkyEye as the following command:
skyeye -e linux-2.4.x/linux
When shell prompt appears,run the following command to insert your module
/bin> ./insmod hello.o
Using hello.o
/bin> lsmod
Module Size Used by Not tainted
hello 204 0 (unused)
-- Thanks
-- Michael.Kang
On 6/22/07, Wann Eric <[EMAIL PROTECTED]> wrote:
Hi:
First, our linux platfrom should support "modprobe" to dynmanic load
some kernel modules.
We use uClinux-20070130. (kernel 2.6.19)
And our CPU arch is ARM7 without MMU.
(If uclinux with nommu arch/platform doesn't support dynmaic load
modules, please forgive me to ask this stupid problem... )
In order to support dynamic load module, we define the follow option
in .config file
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
then we type command "make", and we will the following error
...
CC arch/arm/mm/consistent-nommu.o
CC arch/arm/mm/proc-syms.o
arch/arm/mm/proc-syms.c:38: error: `__cpu_clear_user_page' undeclared
here (not in a function)
arch/arm/mm/proc-syms.c:38: warning: type defaults to `int' in
declaration of `__cpu_clear_user_page'
arch/arm/mm/proc-syms.c:39: error: `__cpu_copy_user_page' undeclared
here (not in a function)
arch/arm/mm/proc-syms.c:39: warning: type defaults to `int' in
declaration of `__cpu_copy_user_page'
make[2]: *** [arch/arm/mm/proc-syms.o] Error 1
make[1]: *** [arch/arm/mm] Error 2
(We use GDB/SkyEye with CPU ATMEL to make, we get the same error,
too.)
Does anyone can help us to fix this issue? Thanks for your help.
Best Regards
Eric Wann
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev