--- Quote Start ---
originally posted by repa@Jun 29 2006, 05:12 AM
(...)
"make menuconfig" it says i have to run "make dep" next, but when i do, it says that it's unnecessary now.
another problem: i can't find the module in uclinux, for some reason. what's the default location for it, if i've followed the instructions?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16520)
--- quote end ---
--- Quote End ---
In the 2.6 series the module dependencies are created when you run make modules_install. You probably shouldn't run that command (unless you know what you're doing).
If you followed the huide your module will be in drivers/misc/hello.ko
I don't want to question the way the examples works but I personally never write kernel modules INSIDE the kernel tree when developing them. I make a seperate directory with a makefile like:
# If KERNELRELEASE is defined, we've been invoked from the# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
obj-m := hello.ko# Otherwise we were called directly from the command# line; invoke the kernel build system.
else
KERNELDIR = /usr/src/cross/linux-2.6.11
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif
I found this somewhere on the net so: credits to the guy who wrote this (I forgot where I found it).
You can make your module everywhere now.
You should replace KERNELDIR with the correct directory for you and add your object to the obj-m variable.
you can then build the code with:
ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- make
or a similar command depending on your compiler.
Hope this helps you!