[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] howto add a new kernel driver in the uclinux_distfiletree?
Hi Falk,
Brettschneider Falk wrote:
> I wrote a new uclinux kernel driver (irq handler called 'vsint') and
> inserted it in the kernel file-tree in a way that it is compiled when I
> compile the uclinux kernel. But on booting that kernel the new driver is not
> loaded. What is missing? I digged through the docs and archives but haven't
> found a hint.
>
> Here is what I've done:
> 1.) added directory uclinux_dist/linux-2.4.x/drivers/vsint with the source
> file vsinthandler.c and the Makefile:
It is fairly unconventional to add a new subdir directly under drivers -
normally they would be added under one of drivers/ subdirectories
(ne3t/char/misc/block etc). For example, you can see under drivers/misc
where I added the FSLFIFO driver.
Anyway, examine the command executed by make in the final stage of
linking the kernel. If you do "make linux", it will be the last few
lines of output.
Make sure that your new subdir is included in that final link.
> 2.) added stuff in uclinux_dist/linux-2.4.x/drivers/Makefile:
> ...
> mod-subdirs := ... vsint
> ...
> subdir-$(CONFIG_VSINT)+= vsint
> ...
This seems the right approach. You should double check your
linux-2.4.x/.config file, that your CONFIG_VSINT variable is set.
> 3.) added an entry in uclinux_dist/linux-2.4.x/arch/microblaze/config.in:
> ...
> #added by Baumer Optronic mha/fbr/rae
> source drivers/vsint/Config.in
> ...
Maybe check for a typo in drivers/vsint/Config.in?
> 4.) went again through the 'make xconfig'-procedure and activated the new
> driver in the graphical menu
> 5.) called 'make dep all' and have seen how the new driver successfully
> compiles,
Again, you must make sure it succesfully links into the kernel image.
If you have it set as a loadable module, then of course you must use
lsmod at runtime to load the module.
> 6.) but the driver is not loaded on bootup :-(although it works well in my
> PC linux version).
Are you statically linking the module into your PC kernel, or building
it as a module?
> What else is to do for activating the driver in that modified kernel?
It seems like you have the major parts in place, I would now be looking
for some subtle error, like a typo in a Makefile or config.in file.
Regards,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/