Kernel Programming
Shrikar archak
shrikar84 at gmail.com
Mon Apr 9 05:54:22 UTC 2007
Thanks it worked for me. But the only problem is the messages are getting
logged to sylog and not getting displayed on console even if the priority is
KERN_ALERT.
Please let me know what the issue is.
Thanks again,
Shrikar
On 4/6/07, ben darby <ben at cvrse.com> wrote:
>
> * Shrikar archak wrote:
> > Hi ,
> > I am a newbie to kernel programming and trying out some simple examples
> > given in a tutorial
> > the program is given below
> >
> <snip> hello1.c
> >
> > ============================================
> > I get the following error when i try to compile
> > I have installed the kernel headers as well
> >
> >
> > shrikar at shrikar-desktop:~/kernel-programming$ gcc
> -D__KERNEL__ -DMODULE
> > -DLINUX -Wall -c hello1.c
> > In file included from /usr/include/linux/sched.h:16,
> > from /usr/include/linux/module.h:9,
> > from hello1.c:1:
> > /usr/include/linux/signal.h:2:2: warning: #warning "You should include <
> > signal.h>. This time I will do it for you."
> > In file included from /usr/include/linux/resource.h:4,
> <snip>
>
> create a Makefile in ~/kernel-programming containing:
>
> #### start file #####
> obj-m += hello1.o
>
> all:
> make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
>
> clean:
> make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
> #### end file ####
>
> and then run 'make' to build the module, 'sudo insmod hello1.ko', etc.
>
>
> --
> ben darby
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFGFjYtaoRYju6rRWgRAq5BAKDvM1lSqTrLmzF1siQ1tTts0uMuQwCg5G7u
> 7Ne6hqIG7muNxc0iLNBsSQ8=
> =UwxX
> -----END PGP SIGNATURE-----
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070409/5f556169/attachment.html>
More information about the ubuntu-users
mailing list