Invalid kernel header included in userspace; multi-line string literals are deprecated

Invalid kernel header included in userspace; multi-line string literals are deprecated

am 13.09.2004 08:52:43 von Donald Duckie

hi!

can somebody please tell me what's going on with this.
i have been changing my makefiles, in which i have
been going in circles now.


gcc -Wall -D__KERNEL__ -DMODULE
-I/usr/src/linux-sh-2.4.18//include -O -g
-DSNULL_DEBUG -I.. -M snull.c > .depend
In file included from
/usr/src/linux-sh-2.4.18/include/linux/config.h:4,
from snull.c:25:
/usr/include/linux/autoconf.h:1:2: #error Invalid
kernel header included in userspace
In file included from snull.c:51:
/usr/src/linux-sh-2.4.18/include/asm/checksum.h:72:30:
warning: multi-line string literals are deprecated
/usr/src/linux-sh-2.4.18/include/asm/checksum.h:105:17:
warning: multi-line string literals are deprecated
/usr/src/linux-sh-2.4.18/include/asm/checksum.h:121:13:
warning: multi-line string literals are deprecated
/usr/src/linux-sh-2.4.18/include/asm/checksum.h:161:17:
warning: multi-line string literals are deprecated
make: *** [.depend] Error 1


thanks.



__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Invalid kernel header included in userspace; multi-line string literals are deprecated

am 13.09.2004 14:06:13 von Richard Adams

On Monday 13 September 2004 08:52, Donald Duckie wrote:
> hi!
>
> can somebody please tell me what's going on with this.
> i have been changing my makefiles, in which i have
> been going in circles now.

You should have told us just what you are tying to do and how you are trying
to achive it, yes one can see you are compiling, but what commands did you do
beforehand, no way should you need to change Makefiles period, you may want
to edit the Top dir Makefile and add an EXTRAVERSION number tho'. which may
well save you a lot of problems if you succed in compiling and then the
kernel wont boot.
Anyway, your directory sructure is broken, as i see it you have a directory or
a symlink called /usr/src/inux-sh-2.4.18 you can have your source in any
directory you want, _however_ you are well advised to create a symlink called
linux pointing to where ever your source is, here is an example.

cd /usr/src
ls -al
linux -> linux-sh-2.4.18
linux-sh-2.4.18

>
> gcc -Wall -D__KERNEL__ -DMODULE
> -I/usr/src/linux-sh-2.4.18//include -O -g
> -DSNULL_DEBUG -I.. -M snull.c > .depend
> In file included from
> /usr/src/linux-sh-2.4.18/include/linux/config.h:4,
> from snull.c:25:
> /usr/include/linux/autoconf.h:1:2: #error Invalid
> kernel header included in userspace
> In file included from snull.c:51:
> /usr/src/linux-sh-2.4.18/include/asm/checksum.h:72:30:
> warning: multi-line string literals are deprecated
> /usr/src/linux-sh-2.4.18/include/asm/checksum.h:105:17:
> warning: multi-line string literals are deprecated
> /usr/src/linux-sh-2.4.18/include/asm/checksum.h:121:13:
> warning: multi-line string literals are deprecated
> /usr/src/linux-sh-2.4.18/include/asm/checksum.h:161:17:
> warning: multi-line string literals are deprecated
> make: *** [.depend] Error 1

All the errors are from 'depend' that means you possably have NOT configured
your kernel to start with.

For a quick HOWTO on making kernels goto;
http://people.zeelandnet.nl/pa3gcu/kernel.htm
Its old but is still valid for 2.4.x kernels.

Or read the README in the kernel source or read the Kernel-HOWTO found mostly
in /usr/share/doc/*
Or
http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO.html

> thanks.

--
If the Linux community is a bunch of theives because they
try to imitate windows programs, then the Windows community
is built on organized crime.

Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Invalid kernel header included in userspace; multi-line string literals are deprecated

am 14.09.2004 02:27:24 von Donald Duckie

hi!

thank you very much for your information.
and i'm so sorry for not stating everything that i was
doing.

anyway, i was trying to compile the snull sample that
i got from
http://www.oreilly.com.tw/editor_column/a138_read.html
on linux-sh-2.4.18. since i found some problem, i
modified the Rules.make (not exactly the Makefile as
previously mentioned).

the original errors were:
[aphrodite@aphrodite2 snull2]$ make clean;make
rm -f *.o *~ core .depend
gcc -Wall -D__KERNEL__ -DMODULE
-I/usr/src/linux/include -O -g -DSNULL_DEBUG -I.. -M
snull.c > .depend
In file included from
/usr/src/linux/include/linux/config.h:4,
from snull.c:25:
/usr/include/linux/autoconf.h:1:2: #error Invalid
kernel header included in userspace
In file included from snull.c:51:
/usr/src/linux/include/asm/checksum.h:72:30: warning:
multi-line string literals are deprecated
/usr/src/linux/include/asm/checksum.h:105:17: warning:
multi-line string literals are deprecated
/usr/src/linux/include/asm/checksum.h:121:13: warning:
multi-line string literals are deprecated
/usr/src/linux/include/asm/checksum.h:161:17: warning:
multi-line string literals are deprecated
make: *** [.depend] Error 1

linux wass already linked as
linux -> linux-sh-2.4.18


and now, seeing on the
/usr/include/linux/autoconf.h:1:2: #error Invalid
kernel header included in userspace

in the /usr/src/linux-sh-2.4.18/include/linux
i just put an empty autoconf.c
(i read this in one of the m-lists)
but got these errors:
[aprhodite@aprhodite2 snull2]$ make clean;make
rm -f *.o *~ core .depend
gcc -Wall -D__KERNEL__ -DMODULE
-I/usr/src/linux/include -O -g -DSNULL_DEBUG -I.. -M
snull.c > .depend
In file included from snull.c:51:
/usr/src/linux/include/asm/checksum.h:72:30: warning:
multi-line string literals are deprecated
/usr/src/linux/include/asm/checksum.h:105:17: warning:
multi-line string literals are deprecated
/usr/src/linux/include/asm/checksum.h:121:13: warning:
multi-line string literals are deprecated
/usr/src/linux/include/asm/checksum.h:161:17: warning:
multi-line string literals are deprecated
gcc -Wall -D__KERNEL__ -DMODULE
-I/usr/src/linux/include -O -g -DSNULL_DEBUG -I..
-c -o snull.o snull.c
In file included from
/usr/src/linux/include/linux/prefetch.h:13,
from
/usr/src/linux/include/linux/list.h:6,
from
/usr/src/linux/include/linux/module.h:12,
from snull.c:26:
/usr/src/linux/include/asm/processor.h:56:
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a
function)
/usr/src/linux/include/asm/processor.h:56: requested
alignment is not a constant
In file included from
/usr/src/linux/include/asm/hardirq.h:6,
from
/usr/src/linux/include/linux/interrupt.h:45,
from snull.c:34:
/usr/src/linux/include/linux/irq.h:65:
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a
function)
/usr/src/linux/include/linux/irq.h:65: requested
alignment is not a constant
In file included from
/usr/src/linux/include/linux/interrupt.h:45,
from snull.c:34:
/usr/src/linux/include/asm/hardirq.h:16:
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a
function)
/usr/src/linux/include/asm/hardirq.h:16: requested
alignment is not a constant
In file included from snull.c:34:
/usr/src/linux/include/linux/interrupt.h:128:
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a
function)
/usr/src/linux/include/linux/interrupt.h:128:
requested alignment is not a constant
In file included from snull.c:37:
/usr/src/linux/include/linux/netdevice.h:164:
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a
function)
/usr/src/linux/include/linux/netdevice.h:164:
requested alignment is not a constant
In file included from snull.c:37:
/usr/src/linux/include/linux/netdevice.h:481:
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a
function)
/usr/src/linux/include/linux/netdevice.h:481:
requested alignment is not a constant
In file included from snull.c:51:
/usr/src/linux/include/asm/checksum.h:72:30: warning:
multi-line string literals are deprecated
/usr/src/linux/include/asm/checksum.h:105:17: warning:
multi-line string literals are deprecated
/usr/src/linux/include/asm/checksum.h:121:13: warning:
multi-line string literals are deprecated
/usr/src/linux/include/asm/checksum.h:161:17: warning:
multi-line string literals are deprecated
make: *** [snull.o] Error 1




i am quite confused now since i think that i am just
going in circles with this compilation . . .



any kind of information are greatly appreciated.
(anyway, i will still also need to read the links that
were given)



--- Richard Adams wrote:

> On Monday 13 September 2004 08:52, Donald Duckie
> wrote:
> > hi!
> >
> > can somebody please tell me what's going on with
> this.
> > i have been changing my makefiles, in which i have
> > been going in circles now.
>
> You should have told us just what you are tying to
> do and how you are trying
> to achive it, yes one can see you are compiling, but
> what commands did you do
> beforehand, no way should you need to change
> Makefiles period, you may want
> to edit the Top dir Makefile and add an EXTRAVERSION
> number tho'. which may
> well save you a lot of problems if you succed in
> compiling and then the
> kernel wont boot.
> Anyway, your directory sructure is broken, as i see
> it you have a directory or
> a symlink called /usr/src/inux-sh-2.4.18 you can
> have your source in any
> directory you want, _however_ you are well advised
> to create a symlink called
> linux pointing to where ever your source is, here is
> an example.
>
> cd /usr/src
> ls -al
> linux -> linux-sh-2.4.18
> linux-sh-2.4.18
>
> >
> > gcc -Wall -D__KERNEL__ -DMODULE
> > -I/usr/src/linux-sh-2.4.18//include -O -g
> > -DSNULL_DEBUG -I.. -M snull.c > .depend
> > In file included from
> > /usr/src/linux-sh-2.4.18/include/linux/config.h:4,
> > from snull.c:25:
> > /usr/include/linux/autoconf.h:1:2: #error Invalid
> > kernel header included in userspace
> > In file included from snull.c:51:
> >
>
/usr/src/linux-sh-2.4.18/include/asm/checksum.h:72:30:
> > warning: multi-line string literals are deprecated
> >
>
/usr/src/linux-sh-2.4.18/include/asm/checksum.h:105:17:
> > warning: multi-line string literals are deprecated
> >
>
/usr/src/linux-sh-2.4.18/include/asm/checksum.h:121:13:
> > warning: multi-line string literals are deprecated
> >
>
/usr/src/linux-sh-2.4.18/include/asm/checksum.h:161:17:
> > warning: multi-line string literals are deprecated
> > make: *** [.depend] Error 1
>
> All the errors are from 'depend' that means you
> possably have NOT configured
> your kernel to start with.
>
> For a quick HOWTO on making kernels goto;
> http://people.zeelandnet.nl/pa3gcu/kernel.htm
> Its old but is still valid for 2.4.x kernels.
>
> Or read the README in the kernel source or read the
> Kernel-HOWTO found mostly
> in /usr/share/doc/*
> Or
> http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO.html
>
> > thanks.
>
> --
> If the Linux community is a bunch of theives because
> they
> try to imitate windows programs, then the Windows
> community
> is built on organized crime.
>
> Regards Richard
> pa3gcu@zeelandnet.nl
> http://people.zeelandnet.nl/pa3gcu/
>
>
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at
> http://www.linux-learn.org/faqs
>




__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Invalid kernel header included in userspace; multi-line string literals are deprecated

am 14.09.2004 10:25:10 von Richard Adams

On Tuesday 14 September 2004 02:27, Donald Duckie wrote:
> hi!
>
> thank you very much for your information.
> and i'm so sorry for not stating everything that i was
> doing.
>
> anyway, i was trying to compile the snull sample that
> i got from
> http://www.oreilly.com.tw/editor_column/a138_read.html

Unless you understand the langauage of China then i suggest you use,=20
http://www.oreilly.com/ forget the tw.

> on linux-sh-2.4.18. since i found some problem, i
> modified the Rules.make (not exactly the Makefile as
> previously mentioned).

You should not touch that file _at all_.

>
> the original errors were:
> [aphrodite@aphrodite2 snull2]$ make clean;make
> rm -f *.o *~ core .depend
> gcc -Wall -D__KERNEL__ -DMODULE
> -I/usr/src/linux/include -O -g -DSNULL_DEBUG =A0-I.. -M
> snull.c > .depend
> In file included from
> /usr/src/linux/include/linux/config.h:4,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0from snull.c:25:
> /usr/include/linux/autoconf.h:1:2: #error Invalid
> kernel header included in userspace

You are indeed doing things _all_ wrong, firstly one needs a fully config=
ured=20
kernel source, you do not need to fully compile a new kernel simply use y=
our=20
running kernels .config file, most distro's include a sample configuratio=
n=20
file for the running kernel, it can be found in /boot, it could also be=20
located in /usr/src/linux/configs/ (i have seen at lease one distro) that=
=20
does that.
Now _before doing anything do;

cd /usr/src/linux
make mrproper

Now copy your sample config file to /usr/src/linux rename it .config and =
do=20
the following.

make oldconfig
make dep

change to the directory where you have the snull source, i had it in
/home/pa3gcu/source/ldd2-samples/snull/

Now type 'make' in that directory i needed to edit nothing, i did get 2=20
warnings but you can safely ignore then, snull.o gets created ok.

Thats it, no going around in circels at all, remember one thing, third pa=
rty=20
code most always depends on a _configured_ kernel source, if one has a=20
configured kernel source then files like autoconf.h and all the nessacary=
=20
symlinks are in place and ready to go.

I compiled snull on a machine running 2.4.26 with gcc 3.3.4.
Considering snull was first written for 2.0.x kernels and has been change=
d to=20
suit most all kernel versions then i see no problem with 2.4.18.

--=20
If the Linux community is a bunch of theives because they
try to imitate windows programs, then the Windows community
is built on organized crime.

Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Invalid kernel header included in userspace; multi-line string literals are deprecated

am 14.09.2004 11:48:38 von Donald Duckie

hi!

thank you very much :-)
the make mrproper; make oldconfig; and make dep were
all that was lacking . . . whew!!!

for my next steps though, where can i find some
information on snull_load and snull_unload?
running them gave me the following errors:

[aphrodite@aphrodite2 snull]$ snull_load
../snull.o: ELF file ./snull.o not for this
architecture
local0: Host name lookup failure
ifconfig: `--help' gives usage information.
local1: Host name lookup failure
ifconfig: `--help' gives usage information.

[aphrodite@aphrodite2 snull]$ snull_unload
sn0: unknown interface: No such device
sn1: unknown interface: No such device
snull: Operation not permitted



--- Richard Adams wrote:

> On Tuesday 14 September 2004 02:27, Donald Duckie
> wrote:
> > hi!
> >
> > thank you very much for your information.
> > and i'm so sorry for not stating everything that i
> was
> > doing.
> >
> > anyway, i was trying to compile the snull sample
> that
> > i got from
> >
>
http://www.oreilly.com.tw/editor_column/a138_read.html
>=20
> Unless you understand the langauage of China then i
> suggest you use,=20
> http://www.oreilly.com/ forget the tw.
>=20
> > on linux-sh-2.4.18. since i found some problem, i
> > modified the Rules.make (not exactly the Makefile
> as
> > previously mentioned).
>=20
> You should not touch that file _at all_.
>=20
> >
> > the original errors were:
> > [aphrodite@aphrodite2 snull2]$ make clean;make
> > rm -f *.o *~ core .depend
> > gcc -Wall -D__KERNEL__ -DMODULE
> > -I/usr/src/linux/include -O -g -DSNULL_DEBUG =A0-I..
> -M
> > snull.c > .depend
> > In file included from
> > /usr/src/linux/include/linux/config.h:4,
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0from snull.c:25:
> > /usr/include/linux/autoconf.h:1:2: #error Invalid
> > kernel header included in userspace
>=20
> You are indeed doing things _all_ wrong, firstly one
> needs a fully configured=20
> kernel source, you do not need to fully compile a
> new kernel simply use your=20
> running kernels .config file, most distro's include
> a sample configuration=20
> file for the running kernel, it can be found in
> /boot, it could also be=20
> located in /usr/src/linux/configs/ (i have seen at
> lease one distro) that=20
> does that.
> Now _before doing anything do;
>=20
> cd /usr/src/linux
> make mrproper
>=20
> Now copy your sample config file to /usr/src/linux
> rename it .config and do=20
> the following.
>=20
> make oldconfig
> make dep
>=20
> change to the directory where you have the snull
> source, i had it in
> /home/pa3gcu/source/ldd2-samples/snull/
>=20
> Now type 'make' in that directory i needed to edit
> nothing, i did get 2=20
> warnings but you can safely ignore then, snull.o
> gets created ok.
>=20
> Thats it, no going around in circels at all,
> remember one thing, third party=20
> code most always depends on a _configured_ kernel
> source, if one has a=20
> configured kernel source then files like autoconf.h
> and all the nessacary=20
> symlinks are in place and ready to go.
>=20
> I compiled snull on a machine running 2.4.26 with
> gcc 3.3.4.
> Considering snull was first written for 2.0.x
> kernels and has been changed to=20
> suit most all kernel versions then i see no problem
> with 2.4.18.
>=20
> --=20
> If the Linux community is a bunch of theives because
> they
> try to imitate windows programs, then the Windows
> community
> is built on organized crime.
>=20
> Regards Richard
> pa3gcu@zeelandnet.nl
> http://people.zeelandnet.nl/pa3gcu/
>=20
>=20
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at=20
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at
> http://www.linux-learn.org/faqs
>=20



=09
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail=20
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Invalid kernel header included in userspace; multi-line string literals are deprecated

am 14.09.2004 17:21:12 von Richard Adams

On Tuesday 14 Sep 2004 05:48, Donald Duckie wrote:
> hi!
>
> thank you very much :-)
> the make mrproper; make oldconfig; and make dep were
> all that was lacking . . . whew!!!
>
> for my next steps though, where can i find some
> information on snull_load and snull_unload?
> running them gave me the following errors:

No idea, but here is your answer(s).

> [aphrodite@aphrodite2 snull]$ snull_load
> ./snull.o: ELF file ./snull.o not for this
> architecture

You need to be root to insert modules.
As root do;
cd /to/where/snull_load/file/is
chmod a+x snull_load

../snull_load
But you will still get some errors because local0 and local1 are not know on
your system, either define them in /etc/hosts or edit snull_load and replace
local0 and local1 with an internal IP# as in.
ifconfig sn0 10.1.2.11
ifconfig sn1 10.1.2.12


> local0: Host name lookup failure
> ifconfig: `--help' gives usage information.
> local1: Host name lookup failure
> ifconfig: `--help' gives usage information.

They are not defined in /etc/hosts.

>
> [aphrodite@aphrodite2 snull]$ snull_unload
> sn0: unknown interface: No such device
> sn1: unknown interface: No such device
> snull: Operation not permitted

Because the ifconfig line had an invalid host nothing gets configured.

You can as root simply do;
cd /to/snull/dir
modprobe snull
ifconfig sn0 10.1.2.11 up
ifconfig sn1 10.1.2.12 up
route add -net 10.1.2.0 netmask 255.255.255.0 sn0
route add -net 10.1.2.0 netmask 255.255.255.0 sn1

You can also place the snull modules in /lib/modules/2.4.18/kernel/drivers/net
run depmod -a
place the following in /etc/modules.conf
alias sn0 snull
alias sn1 snull
Now if you use ifconfig to up the interface without loading the module first
then it should get loaded automaticly altho, i have not tryed it here because
i do not intend to use snX ifc's.

--
If the Linux community is a bunch of thieves because they
try to imitate windows programs, then the Windows community
is built on organized crime.

Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Invalid kernel header included in userspace; multi-line string literals are deprecated

am 15.09.2004 03:30:54 von Donald Duckie

hi!

i do not want to be assuming now, since i only got
some errors from my assumptions. i have performed the
options mentioned below but got some errors.


what is sn0 and sn1?
can modprobe or insmod know that snull.o is snull? (or
am i getting the wrong idea here?)


planning to do the following:
> cd /to/snull/dir
> modprobe snull
> ifconfig sn0 10.1.2.11 up
> ifconfig sn1 10.1.2.12 up
> route add -net 10.1.2.0 netmask 255.255.255.0 sn0
> route add -net 10.1.2.0 netmask 255.255.255.0 sn1

and the result:
---> cd /lib/modules/2.4.18-sh/misc
ls
snull.o
modprobe snull
modprobe: Can't locate module snull
(i supposed that i cant continue from here, but
just tried)
ifconfig sn0 101.11.21.111 up
SIOCSIFADDR: No such device
sn0: unknown interface: No such device
sn0: unknown interface: No such device
ifconfig sn1 101.11.21.121 up
SIOCSIFADDR: No such device
sn1: unknown interface: No such device
sn1: unknown interface: No such device
route add -net 101.11.21.0 netmask 255.255.255.0
sn0
SIOCADDRT: No such device
route add -net 101.11.21.0 netmask 255.255.255.0
sn1
SIOCADDRT: No such device


planning to do the following:
> You can also place the snull modules in
/lib/modules/2.4.18/kernel/drivers/net
> run depmod -a
> place the following in /etc/modules.conf
> alias sn0 snull
> alias sn1 snull

and the result:
---> cp /lib/modules/2.4.18-sh/misc/snull.o
/lib/modules/2.4.18-sh/kernel/drivers/net/.
depmod -a
then edited /etc/modules.conf to add the
mentioned aliases
the redo the procedures: modprobe snull; ifconfig
sn0 101.11.21.111 up; ifconfig sn1 101.11.21.121 up;
route add -net 101.11.21.0 netmask 255.255.255.0 sn0;
route add -net 101.11.21.0 netmask 255.255.255.0 sn1
the same results were seen


what seems to be wrong with sn?
am i doing something wrong in here?

thanks for all the information and assistance . . .



--- Richard Adams wrote:

> On Tuesday 14 Sep 2004 05:48, Donald Duckie wrote:
> > hi!
> >
> > thank you very much :-)
> > the make mrproper; make oldconfig; and make dep
> were
> > all that was lacking . . . whew!!!
> >
> > for my next steps though, where can i find some
> > information on snull_load and snull_unload?
> > running them gave me the following errors:
>
> No idea, but here is your answer(s).
>
> > [aphrodite@aphrodite2 snull]$ snull_load
> > ./snull.o: ELF file ./snull.o not for this
> > architecture
>
> You need to be root to insert modules.
> As root do;
> cd /to/where/snull_load/file/is
> chmod a+x snull_load
>
> ./snull_load
> But you will still get some errors because local0
> and local1 are not know on
> your system, either define them in /etc/hosts or
> edit snull_load and replace
> local0 and local1 with an internal IP# as in.
> ifconfig sn0 10.1.2.11
> ifconfig sn1 10.1.2.12
>
>
> > local0: Host name lookup failure
> > ifconfig: `--help' gives usage information.
> > local1: Host name lookup failure
> > ifconfig: `--help' gives usage information.
>
> They are not defined in /etc/hosts.
>
> >
> > [aphrodite@aphrodite2 snull]$ snull_unload
> > sn0: unknown interface: No such device
> > sn1: unknown interface: No such device
> > snull: Operation not permitted
>
> Because the ifconfig line had an invalid host
> nothing gets configured.
>
> You can as root simply do;
> cd /to/snull/dir
> modprobe snull
> ifconfig sn0 10.1.2.11 up
> ifconfig sn1 10.1.2.12 up
> route add -net 10.1.2.0 netmask 255.255.255.0 sn0
> route add -net 10.1.2.0 netmask 255.255.255.0 sn1
>
> You can also place the snull modules in
> /lib/modules/2.4.18/kernel/drivers/net
> run depmod -a
> place the following in /etc/modules.conf
> alias sn0 snull
> alias sn1 snull
> Now if you use ifconfig to up the interface without
> loading the module first
> then it should get loaded automaticly altho, i have
> not tryed it here because
> i do not intend to use snX ifc's.
>
> --
> If the Linux community is a bunch of thieves because
> they
> try to imitate windows programs, then the Windows
> community
> is built on organized crime.
>
> Regards Richard
> pa3gcu@zeelandnet.nl
> http://people.zeelandnet.nl/pa3gcu/
>
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at
> http://www.linux-learn.org/faqs
>




__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Invalid kernel header included in userspace; multi-line string literals are deprecated

am 15.09.2004 14:04:55 von Richard Adams

On Wednesday 15 September 2004 03:30, Donald Duckie wrote:
> hi!
>
> i do not want to be assuming now, since i only got
> some errors from my assumptions. i have performed the
> options mentioned below but got some errors.
>
>
> what is sn0 and sn1?

They are interface names, that and that only, compare them to ethernet
devices, they are called ethX.

> can modprobe or insmod know that snull.o is snull? (or
> am i getting the wrong idea here?)

Modprobe is the best to use as it is more intelligent, i suggest you read the
manual page for modprobe.
Basicly modprobe looks in /lib/modules/`uname -r`/ for modules, now that
suggests there is somthing wrong with your system IF everything is like you
say below.

>
> planning to do the following:
> > cd /to/snull/dir
> > modprobe snull
> > ifconfig sn0 10.1.2.11 up
> > ifconfig sn1 10.1.2.12 up
> > route add -net 10.1.2.0 netmask 255.255.255.0 sn0
> > route add -net 10.1.2.0 netmask 255.255.255.0 sn1
>
> and the result:
> ---> cd /lib/modules/2.4.18-sh/misc
> ls
> snull.o
> modprobe snull
> modprobe: Can't locate module snull

This can be cause by at least 3 main factors,
1) You have not run 'depmod -a'
2) Your kernel is not called 2.4.18-sh
3) Your not root.

> (i supposed that i cant continue from here, but
> just tried)
> ifconfig sn0 101.11.21.111 up
> SIOCSIFADDR: No such device
> sn0: unknown interface: No such device
> sn0: unknown interface: No such device
> ifconfig sn1 101.11.21.121 up
> SIOCSIFADDR: No such device
> sn1: unknown interface: No such device
> sn1: unknown interface: No such device
> route add -net 101.11.21.0 netmask 255.255.255.0
> sn0
> SIOCADDRT: No such device
> route add -net 101.11.21.0 netmask 255.255.255.0
> sn1
> SIOCADDRT: No such device

You told me in a previous mail that you could load the module right.?
But now trying it in anther way it fails right.???

>
> planning to do the following:
> > You can also place the snull modules in
>
> /lib/modules/2.4.18/kernel/drivers/net
>
> > run depmod -a
> > place the following in /etc/modules.conf
> > alias sn0 snull
> > alias sn1 snull
>
> and the result:
> ---> cp /lib/modules/2.4.18-sh/misc/snull.o
> /lib/modules/2.4.18-sh/kernel/drivers/net/.
> depmod -a
> then edited /etc/modules.conf to add the
> mentioned aliases

Here you need to do 'depmod -a' to update the modules database, if its not run
and you use modprobe you "should get a message" saying something like,
modules.conf is more recent than bla bla bla.

> the redo the procedures: modprobe snull; ifconfig
> sn0 101.11.21.111 up; ifconfig sn1 101.11.21.121 up;
> route add -net 101.11.21.0 netmask 255.255.255.0 sn0;
> route add -net 101.11.21.0 netmask 255.255.255.0 sn1
> the same results were seen
>
>
> what seems to be wrong with sn?

There should be nothing wrong with sn0 or sn1, you said the module compiled,
i suggest you do the following to see once again if all is well.

su -
enter passwd for root. (and press enter of course)
cd /path/to/ldd2-samples-1.0.1/snull
insmod snull
ifconfig sn0 10.11.21.111 up
ifconfig sn1 10.11.21.121 up

That works here and "should work there as well".

> am i doing something wrong in here?


With all due respect, it certainly looks like it.

Now a few questions here,
1) What is the output of the command uname -r
2) What do you whant to use snull for.?
3) What distro are you using.
4) Again with all due respect, if one needs so much basic help to get
something like this to work then surely one would not even know what to use
them for would one, now i hope i am wrong on that one.

The following is showing that you dont seem to understand what i am saying,

> > [aphrodite@aphrodite2 snull]$ snull_unload
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The above indicates that you are NOT root.

> > snull: Operation not permitted
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This almost certainly indicates that you are _NOT_ root.

>
> thanks for all the information and assistance . . .

--
If the Linux community is a bunch of theives because they
try to imitate windows programs, then the Windows community
is built on organized crime.

Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Invalid kernel header included in userspace; multi-line string literals are deprecated

am 22.09.2004 04:51:39 von Donald Duckie

hi!

thank you for the patience in explaining things.
there are some other things in linux that i still need
to understand.
and to answer the questions:
> 1) What is the output of the command uname -r
in my compilation machine, it is 2.4.21-4.EL.
- and i was cross-compiling with 2.4.18-SH.
the /linux was linked to 2.4.18-SH/linux.
- how do I set my environment such that uname -r
can get the 2.4.18-SH? i think depmod uses it right?
in the machine where i run modprobe but got the
unresolved linking errors (this is a separate
machine), it is 2.4.18-SH.
> 2) What do you whant to use snull for.?
- currently i am studying the socket_buffers and
ifc2 implementation and happen to see the snull
sample, and thought this would be a good example to
see how it runs/works.
> 3) What distro are you using.
- using 2.4.18-SH (redhat)
> 4) [aphrodite@aphrodite2] whoami will return root.
(though maybe i would admit that in the several
attempts that i have done, there might be a time
wherein i was not root). but i performed the suggested
operations (insuring that i was root) and still got
the same results.

and here are what i have just noticed lately:
in the machine where i run modprobe with unresolved
linking errors, there is no depmod command, so i
assume that i will run depmod where i compiled the
snull files, transfer the makefile.dep to the other
machine for modprobe to use. is this okey?


and just a minute ago (just came back to this task
today since last week); i renamed /lib to /lib.redhat
and am no longer able to perform any other command to
the machine where i compiled. i can't run mv anymore.
is there a way for me to be able to return /lib.redhat
to /lib?

thank you very for your help . . .


--- Richard Adams wrote:

> On Wednesday 15 September 2004 03:30, Donald Duckie
> wrote:
> > hi!
> >
> > i do not want to be assuming now, since i only got
> > some errors from my assumptions. i have performed
> the
> > options mentioned below but got some errors.
> >
> >
> > what is sn0 and sn1?
>
> They are interface names, that and that only,
> compare them to ethernet
> devices, they are called ethX.
>
> > can modprobe or insmod know that snull.o is snull?
> (or
> > am i getting the wrong idea here?)
>
> Modprobe is the best to use as it is more
> intelligent, i suggest you read the
> manual page for modprobe.
> Basicly modprobe looks in /lib/modules/`uname -r`/
> for modules, now that
> suggests there is somthing wrong with your system IF
> everything is like you
> say below.
>
> >
> > planning to do the following:
> > > cd /to/snull/dir
> > > modprobe snull
> > > ifconfig sn0 10.1.2.11 up
> > > ifconfig sn1 10.1.2.12 up
> > > route add -net 10.1.2.0 netmask 255.255.255.0
> sn0
> > > route add -net 10.1.2.0 netmask 255.255.255.0
> sn1
> >
> > and the result:
> > ---> cd /lib/modules/2.4.18-sh/misc
> > ls
> > snull.o
> > modprobe snull
> > modprobe: Can't locate module snull
>
> This can be cause by at least 3 main factors,
> 1) You have not run 'depmod -a'
> 2) Your kernel is not called 2.4.18-sh
> 3) Your not root.
>
> > (i supposed that i cant continue from here,
> but
> > just tried)
> > ifconfig sn0 101.11.21.111 up
> > SIOCSIFADDR: No such device
> > sn0: unknown interface: No such device
> > sn0: unknown interface: No such device
> > ifconfig sn1 101.11.21.121 up
> > SIOCSIFADDR: No such device
> > sn1: unknown interface: No such device
> > sn1: unknown interface: No such device
> > route add -net 101.11.21.0 netmask
> 255.255.255.0
> > sn0
> > SIOCADDRT: No such device
> > route add -net 101.11.21.0 netmask
> 255.255.255.0
> > sn1
> > SIOCADDRT: No such device
>
> You told me in a previous mail that you could load
> the module right.?
> But now trying it in anther way it fails right.???
>
> >
> > planning to do the following:
> > > You can also place the snull modules in
> >
> > /lib/modules/2.4.18/kernel/drivers/net
> >
> > > run depmod -a
> > > place the following in /etc/modules.conf
> > > alias sn0 snull
> > > alias sn1 snull
> >
> > and the result:
> > ---> cp /lib/modules/2.4.18-sh/misc/snull.o
> > /lib/modules/2.4.18-sh/kernel/drivers/net/.
> > depmod -a
> > then edited /etc/modules.conf to add the
> > mentioned aliases
>
> Here you need to do 'depmod -a' to update the
> modules database, if its not run
> and you use modprobe you "should get a message"
> saying something like,
> modules.conf is more recent than bla bla bla.
>
> > the redo the procedures: modprobe snull;
> ifconfig
> > sn0 101.11.21.111 up; ifconfig sn1 101.11.21.121
> up;
> > route add -net 101.11.21.0 netmask 255.255.255.0
> sn0;
> > route add -net 101.11.21.0 netmask 255.255.255.0
> sn1
> > the same results were seen
> >
> >
> > what seems to be wrong with sn?
>
> There should be nothing wrong with sn0 or sn1, you
> said the module compiled,
> i suggest you do the following to see once again if
> all is well.
>
> su -
> enter passwd for root. (and press enter of course)
> cd /path/to/ldd2-samples-1.0.1/snull
> insmod snull
> ifconfig sn0 10.11.21.111 up
> ifconfig sn1 10.11.21.121 up
>
> That works here and "should work there as well".
>
> > am i doing something wrong in here?
>
>
> With all due respect, it certainly looks like it.
>
> Now a few questions here,
> 1) What is the output of the command uname -r
> 2) What do you whant to use snull for.?
> 3) What distro are you using.
> 4) Again with all due respect, if one needs so much
> basic help to get
> something like this to work then surely one would
> not even know what to use
> them for would one, now i hope i am wrong on that
> one.
>
> The following is showing that you dont seem to
> understand what i am saying,
>
> > > [aphrodite@aphrodite2 snull]$ snull_unload
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> The above indicates that you are NOT root.
>
> > > snull: Operation not permitted
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> This almost certainly indicates that you are _NOT_
> root.
>
> >
> > thanks for all the information and assistance . .
> .
>
> --
> If the Linux community is a bunch of theives because
> they
> try to imitate windows programs, then the Windows
> community
> is built on organized crime.
>
> Regards Richard
> pa3gcu@zeelandnet.nl
> http://people.zeelandnet.nl/pa3gcu/
>
>
>




_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

unresolved symbol __udivsi3_i4

am 22.09.2004 12:23:18 von Donald Duckie

hi!


Thank you very much for your help on
Subject: Invalid kernel header included in userspace;
multi-line string literals are deprecated :-)
I finally understood where I should be doing depmod
and what I need to do with its generated files.


There is one thing that is currently bugging me
though. Upon running modprobe, this is what I
currently got:
Using /lib/modules/2.4.18-sh/kernel/drivers/net/snull.

modprobe: unresolved symbol __udivsi3_i4



The gcc version that is used is:
[aprhodite@aphrodite2 bin]$ sh-linux-gcc -v
Reading specs from
/usr/lib/gcc-lib/sh-linux/3.0.3/specs
Configured with: ../configure --prefix=/usr
--mandir=/usr/share/man --target=sh-linux
--host=i686-pc-linux-gnu --build=i
686-pc-linux-gnu --disable-c99 --disable-nls
--enable-languages=c,c++ --with-system-zlib
--with-gxx-include-dir=/usr/sh-
linux/include/g++-v3
--includedir=/usr/sh-linux/include
--enable-threads=posix --enable-long-long
Thread model: posix
gcc version 3.0.3


Running nm -l-s snull.o
00000000 a *ABS*

U __udivsi3_i4
/home/aphrodite/snull/snull3/snull/snull.c:355



the block in snull.c that contains ine 355 is:
352 if (lockup && ((priv->stats.tx_packets +
1) % lockup) == 0) {
353 /* Simulate a dropped transmit
interrupt */
354 netif_stop_queue(dev);
355 PDEBUG("Simulate lockup at %ld, txp
%ld\n", jiffies,
356 (unsigned long)
priv->stats.tx_packets);
357 }
(which seems to be okey)


The only modification to the downloaded snull files is
on snull.c:
30 //#include /* kmalloc() */
31 #include /* kmalloc()
deprecated use slab.h instead*/


can anyone please tell me how to deal with this
unresolved symbol __udivsi3_i4?


thank you very much.
-donald

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Invalid kernel header included in userspace; multi-line string literals are deprecated

am 02.10.2004 07:45:10 von Richard Adams

On Wednesday 22 Sep 2004 04:51, Donald Duckie wrote:
> hi!

Sorry for the long delay, i just returned from holiday.

> thank you for the patience in explaining things.
> there are some other things in linux that i still need
> to understand.
> and to answer the questions:
> > 1) What is the output of the command uname -r
>
> in my compilation machine, it is 2.4.21-4.EL.

Then you are using a kernel named 2.4.21-4.EL

> - and i was cross-compiling with 2.4.18-SH.

I doubt _very much_ that you were cross compiling,
Simply because the linux symlink points to another name other than the running
kernel does _not_ mean you are cross compiling.

> the /linux was linked to 2.4.18-SH/linux.
> - how do I set my environment such that uname -r
> can get the 2.4.18-SH? i think depmod uses it right?

WRONG, if you want uname-r to show 2.4.18-SH then you _must_ boot that kernel
then and only then will uname -r show 2.4.18-SH as that would then be the
running kernel.

Kernel modules compiled against 2.4.18-SH source will not normally be usable
with another kernel.

> in the machine where i run modprobe but got the
> unresolved linking errors (this is a separate
> machine), it is 2.4.18-SH.

You can compile a kernel and its modules on one machine and transfer them to
another machine _only_ if the kernel is the same, if the kernel versions do
not match then modules will give unresolved symbols period.

>
> > 2) What do you whant to use snull for.?
>
> - currently i am studying the socket_buffers and
> ifc2 implementation and happen to see the snull
> sample, and thought this would be a good example to
> see how it runs/works.
>
> > 3) What distro are you using.
>
> - using 2.4.18-SH (redhat)

Then compile modules on that machine and not on another using a different
kernel.

>
> > 4) [aphrodite@aphrodite2] whoami will return root.
>
> (though maybe i would admit that in the several
> attempts that i have done, there might be a time
> wherein i was not root). but i performed the suggested
> operations (insuring that i was root) and still got
> the same results.
>
> and here are what i have just noticed lately:
> in the machine where i run modprobe with unresolved
> linking errors, there is no depmod command, so i
> assume that i will run depmod where i compiled the
> snull files, transfer the makefile.dep to the other
> machine for modprobe to use. is this okey?

If you do not have the depmod command then you installation is !ucked up, it
cannot possably work properly without it, depmod normally resides in /sbin
Use the 'whereis' command to dind it.
whereis depmod
You run 'depmod -a' after;
1) Installing a new module
2) After editing /etc/modules.conf
3) Possably at startup (done automaticly).

No you _dont_ run depmod on another machine at all if the module(s) are to be
transfered to another machine.

No you dont even use makefile.dep at all.

>
> and just a minute ago (just came back to this task
> today since last week); i renamed /lib to /lib.redhat
> and am no longer able to perform any other command to
> the machine where i compiled. i can't run mv anymore.
> is there a way for me to be able to return /lib.redhat
> to /lib?

You seem to be trying to run before you can walk, you say you are studing
socket_buffers and there workings which gives me the impression you know
about things, then again you !uck up your system by doing a chilish 'mv'
operation.
No unix system in the world will run without lib's, in its path enviroment.

You will quite possably need to use the install cd to boot your machine into
resuce mode or start an install to be able to access a console.

I dont know how redhat does it anymore as i do not have a running redhat
system here to try, The idea behind is to use a install boot meduim to be
able to 'mount' the damaged partition, once mounted you can simply 'mv' back
what you did wrong, then simply reboot start the system like you always do
and all should then be fine.
I can explane into more detail but as i said i do not have a redhat system
here so i may well get some or other redhat spesific then wrong and mislead
you, with slackware i would do;

Place the install cd in the drive and start the system, at the lilo boot
prompt i would smply hit enter to boot the default CD image.
Type root to start.
I now have a root console
mount -t auto /dev/hda1 /mnt
cd /mnt/
mv lib.redhat lib
reboot

Under redhat i would try the same.
boot, let redhat start its installer
When it has started hit CTRL-ALT-F1 or 2 or 3 or 4 etc, find a console with a
shell, there should be one where you can enter commands, now use my example
above to change the dir structure back to how it should be.

As i said, its redhat so your mileage may vary.

--
If the Linux community is a bunch of thieves because they
try to imitate windows programs, then the Windows community
is built on organized crime.

Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: unresolved symbol __udivsi3_i4

am 02.10.2004 07:49:02 von Richard Adams

On Wednesday 22 Sep 2004 12:23, Donald Duckie wrote:
> can anyone please tell me how to deal with this
> unresolved symbol __udivsi3_i4?

Compile it on the machine you intend to use it on.

--
If the Linux community is a bunch of thieves because they
try to imitate windows programs, then the Windows community
is built on organized crime.

Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs