ML403: module make fails with interesting error
Wade Maxfield
wmaxfield at gmail.com
Tue Aug 22 07:28:48 EST 2006
I created an NFS disk using devrocket 2.03, copied the kernel image from a
devrocket build to the system.ace. I booted the ml403 board and did an nfs
mount. I copied the kernel directory created under the devrocket
2.03kernel project into /usr/src/linux
I created a simple module:
-----------------------------------------------------------------------------------------------------------------
root at ml403:/home/moduletest# cat moduletest.c
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
MODULE_DESCRIPTION("Test Kernel Module");
MODULE_AUTHOR("wade maxfield (maxfield at ctelcom.net)");
MODULE_LICENSE("$LICENSE$");
static int moduletest_init_module(void)
{
printk( KERN_DEBUG "Module moduletest init\nHello World!\n" );
return 0;
}
static void moduletest_exit_module(void)
{
printk( KERN_DEBUG "Module moduletest exit\nGoodbye Cruel World!\n"
);
}
module_init(moduletest_init_module);
module_exit(moduletest_exit_module);
---------------------------------------------------------------------------------------------------------------------------
This has compiled under RHEL 4.0 and worked.
if I go do a build on the ml403 board I get the following (ignore the
time problems)
----------------------------------------------------------------------------------------------------------------------
root at ml403:/home/moduletest# make
make: Warning: File `Makefile' has modification time 1.2e+09 s in the future
make -C /lib/modules/2.6.10_mvl401-ml40x/build SUBDIRS=/home/moduletest
modules
make[1]: Entering directory `/usr/src/linux'
Makefile:503: .config: No such file or directory
make[1]: Warning: File `/usr/src/linux/arch/ppc/Makefile' has modification
time 1.2e+09 s in the future
make[2]: Warning: File `scripts/Makefile.lib' has modification time
1.1e+09s in the future
CC [M] /home/moduletest/moduletest.o
/bin/sh: line 1: scripts/basic/fixdep: cannot execute binary file
make[2]: *** [/home/moduletest/moduletest.o] Error 126
make[1]: *** [_module_/home/moduletest] Error 2
make[1]: Leaving directory `/usr/src/linux'
make: *** [default] Error 2
----------------------------------------------------------------------------------------------------------
I think that "fixdep" was created as x86. Any suggestions as to getting
fixdep to be powerpc executable?
thanks,
wade
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060821/e6f9394a/attachment.htm
More information about the Linuxppc-embedded
mailing list