2008-04-21 03:20:04     error at compiling kernel with telnetd

Document created by Aaronwu Employee on Aug 6, 2013
Version 1Show Document
  • View in full screen mode

2008-04-21 03:20:04     error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54588    Hi all

 

I am begginer with this and I am getting a little crazy.

 

I can compile the kernel, without using telnet, but it's one of the specification of my project. I have to disable the console and connect to the target with telnet.

 

As I have read in this web, I must have the telnet user package enabled, and I do:

 

>> grep TELNET config/.config

 

CONFIG_USER_TELNETD_TELNETD=y

CONFIG_USER_TELNETD_DOES_NOT_USE_OPENPTY=y

CONFIG_USER_TELNET_TELNET=y

# CONFIG_USER_BUSYBOX_TELNET is not set

# CONFIG_USER_BUSYBOX_TELNETD is not set

 

 

But when I compile, I get this error:

 

inition of ‘struct sockaddr_in’

nfsmount.c: In function ‘nfsmount’:

nfsmount.c:237: error: ‘NFS_VERSION’ undeclared (first use in this function)

nfsmount.c:237: error: (Each undeclared identifier is reported only once

nfsmount.c:237: error: for each function it appears in.)

nfsmount.c:118: warning: unused variable ‘hp’

make[2]: *** [nfsmount.o] Error 1

make[2]: Leaving directory `/home/vicent2/uClinux-dist.R1.1-RC3/user/mount'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/home/vicent2/uClinux-dist.R1.1-RC3/user'

make: *** [subdirs] Error 1

 

 

Could anybody help me??, pleaseeee.

QuoteReplyEditDelete

 

 

2008-04-21 03:44:24     Re: error at compiling kernel with telnetd

Mike Frysinger (UNITED STATES)

Message: 54590    that isnt telnet failing, that is mount/nfs code.  you've probably select mount options that arent part of busybox.

 

if you're a beginner, then you should start with the 2008R1 release instead of the 2007R1.1

QuoteReplyEditDelete

 

 

2008-04-21 04:19:21     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54595    Yes, you are right, sorry. Trying to find a solution I had changed something uncorrectly. This was my mistake:

 

applets/built-in.o:(.data.rel.ro.applets+0x3d0): undefined reference to `_telnet_main'

applets/built-in.o:(.data.rel.ro.applets+0x3dc): undefined reference to `_telnetd_main'

collect2: ld returned 1 exit status

make[2]: *** [busybox_unstripped] Error 1

make[2]: Leaving directory `/home/vicent2/uClinux-dist.R1.1-RC3/user/busybox'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/home/vicent2/uClinux-dist.R1.1-RC3/user'

make: *** [subdirs] Error 1

QuoteReplyEditDelete

 

 

2008-04-21 04:52:51     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54597    I can compile now, I just had to "make clean" before make.

 

But when I use telnet, it doesn't work:

 

telnet: Unable to connect to remote host: Connection refused

QuoteReplyEditDelete

 

 

2008-04-21 05:00:30     Re: error at compiling kernel with telnetd

Manolo van Ee (NETHERLANDS)

Message: 54598    Is inetd running on your board and do you have the following line in /etc/inetd.conf:

telnet  stream tcp nowait root /bin/telnetd

QuoteReplyEditDelete

 

 

2008-04-21 05:21:10     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54599    Yes, inetd is running:

 

root:~> cat etc/inetd.conf

shell   stream tcp nowait root /bin/rshd

telnet  stream tcp nowait root /bin/telnetd

QuoteReplyEditDelete

 

 

2008-04-21 05:34:58     Re: error at compiling kernel with telnetd

Manolo van Ee (NETHERLANDS)

Message: 54605    Are you sure the network is up and running?

Can you ping the board?

QuoteReplyEditDelete

 

 

2008-04-21 05:39:13     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54606    Yes, I tried it too, when I ping it works. I don't know what to do now :(.

QuoteReplyEditDelete

 

 

2008-04-21 05:49:54     Re: error at compiling kernel with telnetd

Yi Li (CHINA)

Message: 54609    What is your kernel version? Do you have /dev/ptmx and /dev/pts/  on your board?

QuoteReplyEditDelete

 

 

2008-04-21 06:10:24     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54614    Kernel is linux-2.6.x

 

Yes I have ptmx and pts. (ptmx is not a folder, should it be?)

QuoteReplyEditDelete

 

 

2008-04-21 06:51:01     Re: error at compiling kernel with telnetd

Manolo van Ee (NETHERLANDS)

Message: 54616    Does /bin/telnetd exist? Is it executable?

Any information in /var/log/messages?

QuoteReplyEditDelete

 

 

2008-04-21 06:55:49     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54618    Yes, it exists, and when I run it this happens:

 

root:/bin> telnetd

telnetd: getpeername: Socket operation on non-socket

�� �� �

 

 

I don't have anything in /var/log/. Maybe it's because I have disabled syslog due to I was getting every few time "respawing too fast". Should I able it again?.

QuoteReplyEditDelete

 

 

2008-04-21 07:13:56     Re: error at compiling kernel with telnetd

Mike Frysinger (UNITED STATES)

Message: 54620    "respawning too fast" is a common error indicative of kernel misconfiguration such as removing too many features

 

instead of trying to configure everything from the start and ending up with a broken system, please upgrade to 2008R1 and use the default build image.  once that works, you can start customizing things.

 

default images can easily be generated by doing: make AnalogDevices/<board>_default

QuoteReplyEditDelete

 

 

2008-04-21 07:17:08     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54621    Ok, I am going to do it.

QuoteReplyEditDelete

 

 

2008-04-21 07:22:13     Re: error at compiling kernel with telnetd

Manolo van Ee (NETHERLANDS)

Message: 54622    This telnetd output is ok.

 

However, syslogd respawning too fast should not happen.

This could happen if it cannot create the /dev/log file.

Do you have a read only filesystem?

QuoteReplyEditDelete

 

 

2008-04-21 08:08:12     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54624    If I have read only filesystem?, sorry, but I don't understand what you mean.

QuoteReplyEditDelete

 

 

2008-04-21 08:48:10     Re: error at compiling kernel with telnetd

Manolo van Ee (NETHERLANDS)

Message: 54625    If the filesystem on the board is mounted as read only, you cannot write to it. So you cannot change or create files.

Sometimes this can cause problems. I experienced it with syslogd trying to create a socket: /dev/log which failed because I have a read only filesystem, so that's why I asked.

 

If you give the command: mount

It will show you the mounted filesystems and whether they are read only (ro) or read/write (rw).

 

Anyway, it's probably best to follow Mike's advise. He knows way more about this stuff than I do.

QuoteReplyEditDelete

 

 

2008-04-22 03:24:45     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54671    Thank you, I did it, but it seems like it's not the problem:

 

root:~> mount

 

rootfs on / type rootfs (rw)

/dev/root on / type nfs (rw,vers=2,rsize=4096,wsize=4096,hard,nolock,proto=udp,timeo=11,retrans=2,sec=sys,addr=XXX.XXX.X.XXX)

proc on /proc type proc (rw)

ramfs on /var type ramfs (rw)

sysfs on /sys type sysfs (rw)

devpts on /dev/pts type devpts (rw)

 

 

I have already downloaded the new kernel in another place, so I can try both.

 

PD: Sorry for the delay, I am just here until 2 pm.

QuoteReplyEditDelete

 

 

2008-04-22 03:51:50     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54673    Hi, I have already compiled, and I get errors.

 

First, why can't I choose uClibc library in the main menu?.

 

And after compile:

 

cc1: error: unrecognized command line option "-mcpu=bf537-0.2"

make[3]: *** [scripts/mod/empty.o] Error 1

make[2]: *** [scripts/mod] Error 2

make[1]: *** [scripts] Error 2

make[1]: Leaving directory `/home/vincent/uClinux-dist-2008R1-RC8/linux-2.6.x'

make: *** [linux] Error 1

 

 

QuoteReplyEditDelete

 

 

2008-04-22 04:14:53     Re: error at compiling kernel with telnetd

Mike Frysinger (UNITED STATES)

Message: 54677    you didnt upgrade your toolchain ... please review the FAQ:

http://docs.blackfin.uclinux.org/doku.php?id=faq

QuoteReplyEditDelete

 

 

2008-04-22 04:20:00     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54720    One more thing, I have seen that, after I wrote "mount" in the target, I don't get "init: /bin/syslogd respawning too fast" anymore.

 

Thanks Manolo.

 

But I still have the telnet conexion problem:

 

>>telnet xxx.xxx.x.xxx

Trying xxx.xxx.x.xxx...

telnet: Unable to connect to remote host: Connection refused

 

 

>> grep TELNET config/.config

 

CONFIG_USER_TELNETD_TELNETD=y

CONFIG_USER_TELNETD_DOES_NOT_USE_OPENPTY=y

CONFIG_USER_TELNET_TELNET=y

# CONFIG_USER_BUSYBOX_TELNET is not set

# CONFIG_USER_BUSYBOX_TELNETD is not set

 

maybe this helps too:

 

>> grep NFS linux-2.6.x/.config

CONFIG_NFS_FS=y

CONFIG_NFS_V3=y

# CONFIG_NFS_V3_ACL is not set

# CONFIG_NFS_V4 is not set

CONFIG_NFS_DIRECTIO=y

CONFIG_NFSD=y

# CONFIG_NFSD_V3 is not set

CONFIG_NFSD_TCP=y

CONFIG_ROOT_NFS=y

CONFIG_NFS_COMMON=y

 

>> grep NFS config/.config

CONFIG_USER_BUSYBOX_FEATURE_MOUNT_NFS=y

 

 

Ok, I have already read it, I have to upgrade everything... sorry again.

 

 

 

QuoteReplyEditDelete

 

 

2008-04-22 04:56:56     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54721    Hi Mike, I have upgraded to the last version, but I am still getting errors when I compile:

 

>>make

 

rm -f linux-2.6.x/usr/initramfs_data.cpio.gz

make ARCH=blackfin   CROSS_COMPILE=bfin-uclinux- -j4 -C linux-2.6.x  || exit 1

make[1]: Entering directory `/home/vincent/uClinux-dist-2008R1-RC8/linux-2.6.x'

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  CC      arch/blackfin/kernel/asm-offsets.s

In file included from include/linux/spinlock.h:53,

                 from include/linux/capability.h:47,

                 from include/linux/sched.h:46,

                 from arch/blackfin/kernel/asm-offsets.c:31:

include/linux/kernel.h:10:20: error: stdarg.h: No such file or directory

In file included from include/linux/spinlock.h:53,

                 from include/linux/capability.h:47,

                 from include/linux/sched.h:46,

                 from arch/blackfin/kernel/asm-offsets.c:31:

include/linux/kernel.h:123: error: expected declaration specifiers or ‘...’ before ‘va_list’

include/linux/kernel.h:127: error: expected declaration specifiers or ‘...’ before ‘va_list’

include/linux/kernel.h:131: error: expected declaration specifiers or ‘...’ before ‘va_list’

include/linux/kernel.h:135: error: expected declaration specifiers or ‘...’ before ‘va_list’

include/linux/kernel.h:139: error: expected declaration specifiers or ‘...’ before ‘va_list’

include/linux/kernel.h:155: error: expected declaration specifiers or ‘...’ before ‘va_list’

make[2]: *** [arch/blackfin/kernel/asm-offsets.s] Error 1

make[1]: *** [prepare0] Error 2

make[1]: Leaving directory `/home/vincent/uClinux-dist-2008R1-RC8/linux-2.6.x'

make: *** [linux] Error 1

 

 

Should I open a new thread?, this one was about the telnet problem.

QuoteReplyEditDelete

 

 

2008-04-22 15:27:35     Re: error at compiling kernel with telnetd

Mike Frysinger (UNITED STATES)

Message: 54734    you didnt install all the required packages for the toolchain (one of the uclibc ones).  please review the toolchain release notes.

QuoteReplyEditDelete

 

 

2008-04-23 04:38:26     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54770    There is no toolchain release notes for the toolchain 2008R1 (http://docs.blackfin.uclinux.org/doku.php?id=toolchain:release-notes)

 

Should I review the last one?.

 

Moreover, I've been compiling the kernel for 2 weeks and I don't want to loose what I did, so I am installing the new version in a new session, but I keep the other as well.

 

The kernel compile and seems to work fine, the only problem is that when I telnet to the board, it doesn't work, any idea?.

 

Thanks for replying Mike.

QuoteReplyEditDelete

 

 

2008-04-23 04:56:00     Re: error at compiling kernel with telnetd

Manolo van Ee (NETHERLANDS)

Message: 54772    I see you're using an nfs filesystem.

I've no experience with that, but did you try a local filesystem?

QuoteReplyEditDelete

 

 

2008-04-23 05:03:46     Re: error at compiling kernel with telnetd

Vincent Puig (SPAIN)

Message: 54773    Local filesystem?, no, I didn't. How is it?

 

Sorry, as I said, I am beginner.

QuoteReplyEditDelete

 

 

2008-04-23 05:09:12     Re: error at compiling kernel with telnetd

Mike Frysinger (UNITED STATES)

Message: 54775    http://docs.blackfin.uclinux.org/doku.php?id=toolchain:installing#available_packages

 

you can install multiple toolchains in different locations

QuoteReplyEditDelete

 

 

2008-04-23 06:11:01     Re: error at compiling kernel with telnetd

Manolo van Ee (NETHERLANDS)

Message: 54778    I meant a file system just on your board, in flash or ram, in stead of using a filesystem from another server with nfs.

Like the default configuration for a stamp board creates an image which contains the kernel combined with the root filesystem and runs this filesystem from ram.

Maybe some permission problems could screw up things with nfs.

Attachments

    Outcomes