I did ./ltib -p kernel -m scbuild and ./ltib -p kernel -m scdeploy.
I could not find test.ko under the root file system. There is one warning message:
+ make ARCH=ppc CROSS_COMPILE= 'HOSTCC=/usr/bin/gcc -B/usr/bin//' DEPMOD=/bin/true INSTALL_MOD_PATH=/home/xxx/ltib-mpc8349itx-gp-20061024/tmp/kernel//opt/freescale/rootfs/ppc modules_install
Warning: you may need to install module-init-tools.
Thanks very much for helps!
Happy Holiday!
obj-m += test.oyou have to add your path at the end of the Makefile under the directory drivers :
obj-m += test/
Message Edited by aurelihein on 2007-04-1801:01 PM
fjpse,
I have tried compiling the "hello" module as you said, but I got error while compiling.
I used the your test.c and Makefile only
Error is:
LTIB> cd rpm/BUILD/test/
LTIB> make V=1 ARCH=ppc
make -C ../linux-2.6.10/ M=/home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/test
make[1]: Entering directory `/home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/linux-2.6.10'
mkdir -p /home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/test/.tmp_versions
make -f scripts/Makefile.build obj=/home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/test
rm -f /home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/test/built-in.o; ar rcs /home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/test/built-in.o
gcc -g2 -gdwarf-2 -m32 -Wp,-MD,/home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/test/.test.o.d -nostdinc -isystem /home/ppc/try/ltib-mpc8349emds-20060414/rootfs/usr/lib//include -D__KERNEL__ -Iinclude -Iarch/ppc -Wall
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O1 -fomit-frame-pointer -Iarch/ppc -msoft-float -pipe -ffixed-r2 -mmultiple -mstring -Wa,-maltivec -Wdeclaration-after-statement -DMODULE -DKBUILD_BASENAME=test -DKBUILD_MODNAME=test -c -o /home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/test/test.o /home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/test/test.c
Building modules, stage 2.
make -rR -f /home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/linux-2.6.10/scripts/Makefile.modpost
scripts/mod/modpost -i /home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/linux-2.6.10/Module.symvers vmlinux /home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/test/test.o
/bin/sh: line 1: scripts/mod/modpost: No such file or directory
make[2]: *** [__modpost] Error 127
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/linux-2.6.10'
make: *** [default] Error 2
Can you tell me what mistake I am doing?
Hi Dear !
I am facing the same Problem stated by "Rekha" . Did any one got the solutions .
This is the Error log i get ==>
LTIB> make V=1 ARCH=ppc
make -C ../linux-2.6.23 M=/home/Admin/Document/MPC8641d/Install/ltib-mpc8641hpcn-20080117/rpm/BUILD/test
make[1]: Entering directory `/home/Admin/Document/MPC8641d/Install/ltib-mpc8641hpcn-20080117/rpm/BUILD/linux-2.6.23'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
ERROR: Kernel configuration is invalid.
include/linux/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
mkdir -p /home/Admin/Document/MPC8641d/Install/ltib-mpc8641hpcn-20080117/rpm/BUILD/test/.tmp_versions
rm -f /home/Admin/Document/MPC8641d/Install/ltib-mpc8641hpcn-20080117/rpm/BUILD/test/.tmp_versions/*
WARNING: Symbol version dump /home/Admin/Document/MPC8641d/Install/ltib-mpc8641hpcn-20080117/rpm/BUILD/linux-2.6.23/Module.symvers
is missing; modules will have no dependencies and modversions.
make -f scripts/Makefile.build obj=/home/Admin/Document/MPC8641d/Install/ltib-mpc8641hpcn-20080117/rpm/BUILD/test
Building modules, stage 2.
make -f /home/Admin/Document/MPC8641d/Install/ltib-mpc8641hpcn-20080117/rpm/BUILD/linux-2.6.23/scripts/Makefile.modpost
/home/Admin/Document/MPC8641d/Install/ltib-mpc8641hpcn-20080117/rpm/BUILD/linux-2.6.23/scripts/Makefile.modpost:42: include/config/auto.conf: No such file or directory
make[2]: *** No rule to make target `include/config/auto.conf'. Stop.
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/Admin/Document/MPC8641d/Install/ltib-mpc8641hpcn-20080117/rpm/BUILD/linux-2.6.23'
make: *** [default] Error 2
Thanks and Regard's
Hrishikesh.
/home/ppc/try/ltib-mpc8349emds-20060414/rpm/BUILD/linux-2.6.10/scripts/Makefile.modpost
scripts/mod/modpost
You are under ./ltib -m shell ?
Do you have the last revision of the kernel for this board ? because It's a 2.6.10 and i used a 2.6.14 . . .
I don't remenber if I had to change some options under the kernel to enable to compile modules, like the abitility to load dynamic module . . .