2009-01-30 10:31:45     telnet problems

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

2009-01-30 10:31:45     telnet problems

paul zawalnyski (UNITED KINGDOM)

Message: 68588   

 

When I telnet to my target I get

 

pengi:/ #

pengi:/ # telnet 192.0.0.10

Trying 192.0.0.10...

Connected to 192.0.0.10.

Escape character is '^]'.

telnetd: All network ports in use.

Connection closed by foreign host.

pengi:/ #

 

This is similar to problems previously mentioned. I have followed all the previous threads but still cannot fix.

 

The boot is looks fine and  dev/  apears fine

 

Can anyone please help.

 

Paul

 

 

 

CoCo>run flashboot

Copy from SPI...

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.22.18-ADI-2008R1-svn

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    824447 Bytes = 805.1 kB

   Load Address: 00001000

   Entry Point:  00152000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 152000

Linux version 2.6.22.18-ADI-2008R1-svn (root@pengi) (gcc version 4.1.1 (ADI 07R1)) #729 Fri Jan 30 14:57:14 GMT 2009

Hardware Trace Active and Enabled

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF533 Rev 0.5

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 50 MHz System Clock

Board Memory: 32MB

Kernel Managed Memory: 32MB

Memory map:

  text      = 0x00001000-0x00102ca0

  rodata    = 0x00103000-0x00140acc

  data      = 0x00141000-0x00152000

  stack     = 0x00142000-0x00144000

  init      = 0x00152000-0x00166000

  bss       = 0x00166000-0x0017433c

  available = 0x0017433c-0x01eff000

  DMA Zone  = 0x01f00000-0x02000000

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 7874

Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 128 (order: 7, 512 bytes)

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Memory available: 29952k/32768k RAM, (80k init code, 1031k kernel code, 373k data, 1024k dma, 304k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (13 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 64 KB (56 KB free)

Security Framework v1.0.0 initialized

Capability LSM initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

coco_init(): registering device resources

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 1024 (order: 1, 8192 bytes)

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

TCP: Hash tables configured (established 1024 bind 1024)

TCP reno registered

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered (default)

About to register FPGA_UART

Serial: Blackfin serial driver

platform: Matched Device bfin-uart.1 with Driver bfin-uart

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 21) is a BFIN-UART

Detected NS8390 ethernet device at irq:34, io addr:0x40001320

io 0x40001320, irq 34, hw_addr 00:C0:1B:05:DC:74

platform: Matched Device bfin-spi.0 with Driver bfin-spi

platform_get_irq 5

spi: Matched Device spi0.2 with Driver m25p80

m25p80 spi0.2: m25p64 (8192 Kbytes)

Creating 3 MTD partitions on "m25p80":

0x00000000-0x00040000 : "bootloader"

mtd: Giving out device 0 to bootloader

0x00040000-0x00140000 : "kernel"

mtd: Giving out device 1 to kernel

0x00140000-0x00800000 : "file system"

mtd: Giving out device 2 to file system

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@5

platform: Matched Device rtc-bfin with Driver rtc-bfin

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting the system clock to 2022-05-01 11:53:42 (1651406022)

VFS: Mounted root (jffs2 filesystem).

Freeing unused kernel memory: 80k freed

dma_alloc_init: dma_page @ 0x01d02000 - 256 pages at 0x01f00000

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.4.1 (2009-01-19 17:00:13 GMT) Built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:C0:1B:05:DC:74

          inet addr:192.0.0.10  Bcast:192.0.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

                    Interrupt:34 Base address:0x1320

 

root:/> ls dev

console    mtd1ro     mtdblock2  ptyp2      ptyp7      ttyp3      zero

log        mtd2       null       ptyp3      root       ttyp4

mtd0       mtd2ro     pts        ptyp4      ttyp0      ttyp5

mtd0ro     mtdblock0  ptyp0      ptyp5      ttyp1      ttyp6

mtd1       mtdblock1  ptyp1      ptyp6      ttyp2      ttyp7

root:/>

 

 

QuoteReplyEditDelete

 

 

2009-01-30 13:37:17     Re: telnet problems

Mike Frysinger (UNITED STATES)

Message: 68597   

 

did you read the faq about this issue ?

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

QuoteReplyEditDelete

 

 

2009-01-30 13:53:35     Re: telnet problems

paul zawalnyski (UNITED KINGDOM)

Message: 68599   

 

Yes, I have spent the last couple of days trying all the mentioned solutions. I am sure that it is a very small problem. It could be the rc script. If someone could post a working one for a FLASH based system, it may help. This is not my area of experience.

 

 

QuoteReplyEditDelete

 

 

2009-01-30 14:00:38     Re: telnet problems

Mike Frysinger (UNITED STATES)

Message: 68600   

 

every one in the AnalogDevices folder in the uclinux-dist is working

 

run `strings romfs/bin/telnetd | grep /dev` ... if your vendor/user configuration is correct, you should see:

/dev/tty

 

if it's wrong, you'll also see "/dev/ptyXX"

QuoteReplyEditDelete

 

 

2009-01-30 14:23:49     Re: telnet problems

paul zawalnyski (UNITED KINGDOM)

Message: 68601   

 

Hi

 

Results

 

pengi:/home/paulz/fastboy/blackfin/uclinux/SOURCE/uClinux-dist-2008R1-RC8 # strings romfs/bin/telnetd | grep /dev

/dev/pts/

/dev/tty

/dev/ptmx

pengi:/home/paulz/fastboy/blackfin/uclinux/SOURCE/uClinux-dist-2008R1-RC8 #

 

?

 

As per FAQ I have

 

"telnet does not uses openpty()" not selected:

    - enable "Unix98 PTY support" in the kernel

    - mount devpts at /dev/pts

 

 

 

 

QuoteReplyEditDelete

 

 

2009-01-30 14:29:33     Re: telnet problems

Mike Frysinger (UNITED STATES)

Message: 68602   

 

you're sure your kernel options are enabled properly ?  you have no /dev/ptmx node which means things arent going to work.

 

$ grep pt /proc/devices

  5 /dev/ptmx

128 ptm

136 pts

QuoteReplyEditDelete

 

 

2009-01-30 14:42:51     Re: telnet problems

paul zawalnyski (UNITED KINGDOM)

Message: 68604   

 

Not sure about the kernel options, what do I need?

 

This is what I get

 

root:/> grep pt /proc/devices

  2 pty

  5 /dev/ptmx

128 ptm

136 pts

root:/>

 

 

 

QuoteReplyEditDelete

 

 

2009-01-30 14:47:24     Re: telnet problems

Mike Frysinger (UNITED STATES)

Message: 68605   

 

then run `mdev -s` and see if the device nodes appear in /dev

 

if your root is read-only, you need to mount a tmpfs dir on top of /dev first

QuoteReplyEditDelete

 

 

2009-01-30 15:21:53     Re: telnet problems

paul zawalnyski (UNITED KINGDOM)

Message: 68608   

 

root:/> mdev -s

root:/>

 

Nothing

 

My root should be rw

 

Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2

 

and I can create files on it.

 

how do I mount  a tmpfs dir on top of /dev first

 

This is my rc file

 

Thanks Paul

 

 

 

hostname blackfin

mount -t proc proc /proc

mount -t ramfs ramfs /var

mount -t sysfs sysfs /sys

[ -d /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb

[ -d /sys/kernel/debug ] && mount -t debugfs debugfs /sys/kernel/debug

[ -d /proc/sys/fs/binfmt_misc ] && mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc

[ -d /sys/kernel/security ] && mount -t securityfs securityfs /sys/kernel/security

grep -qs nfsd /proc/filesystems && mount -t nfsd nfsd /proc/fs/nfsd

#if [ -e /bin/mdev ] ; then

#       echo /bin/mdev 2>/dev/null > /proc/sys/kernel/hotplug

#       /bin/mdev -s 2> /dev/null

#fi

if [ -e /bin/mdev ] ; then

        mount   /dev   /mnt

        mount -t tmpfs   -o rw,exec,nosuid,mode=755 mdev    /dev

        cp   -ar /mnt/*     /dev

        umount     /mnt

        echo /bin/mdev 2>/dev/null > /proc/sys/kernel/hotplug

        /bin/mdev -s 2> /dev/null

fi

mount -t devpts devpts /dev/pts

mkdir /var/tmp /var/log /var/run /var/lock

#dhcpcd &

ifconfig eth0 192.0.0.10 up

ifconfig lo 127.0.0.1

inetd &

#cat /etc/issue

cat /etc/motd

                                                         

 

 

 

 

 

 

QuoteReplyEditDelete

 

 

2009-01-30 15:31:21     Re: telnet problems

Mike Frysinger (UNITED STATES)

Message: 68609   

 

`mdev -s` isnt supposed to output anything.  it does its job and then exits silently.  look in /dev/ to see you have the right device nodes.

 

also make sure you arent disabling the deprecated sysfs options in your kernel as the 2008R1 release needs those

QuoteReplyEditDelete

 

 

2009-01-30 16:02:49     Re: telnet problems

paul zawalnyski (UNITED KINGDOM)

Message: 68610   

 

Progress

 

I have now enabled deprecated sysfs.

 

root:/> mdev -s

root:/> ls dev

console    ptydb      ptys8      ptyx5      ttybc      ttyq9      ttyv6

full       ptydc      ptys9      ptyx6      ttybd      ttyqa      ttyv7

kmem       ptydd      ptysa      ptyx7      ttybe      ttyqb      ttyv8

kmsg       ptyde      ptysb      ptyx8      ttybf      ttyqc      ttyv9

log        ptydf      ptysc      ptyx9      ttyc0      ttyqd      ttyva

mem        ptye0      ptysd      ptyxa      ttyc1      ttyqe      ttyvb

mtd0       ptye1      ptyse      ptyxb      ttyc2      ttyqf      ttyvc

mtd0ro     ptye2      ptysf      ptyxc      ttyc3      ttyr0      ttyvd

mtd1       ptye3      ptyt0      ptyxd      ttyc4      ttyr1      ttyve

mtd1ro     ptye4      ptyt1      ptyxe      ttyc5      ttyr2      ttyvf

mtd2       ptye5      ptyt2      ptyxf      ttyc6      ttyr3      ttyw0

mtd2ro     ptye6      ptyt3      ptyy0      ttyc7      ttyr4      ttyw1

mtdblock0  ptye7      ptyt4      ptyy1      ttyc8      ttyr5      ttyw2

mtdblock1  ptye8      ptyt5      ptyy2      ttyc9      ttyr6      ttyw3

mtdblock2  ptye9      ptyt6      ptyy3      ttyca      ttyr7      ttyw4

null       ptyea      ptyt7      ptyy4      ttycb      ttyr8      ttyw5

ptmx       ptyeb      ptyt8      ptyy5      ttycc      ttyr9      ttyw6

pts        ptyec      ptyt9      ptyy6      ttycd      ttyra      ttyw7

ptya0      ptyed      ptyta      ptyy7      ttyce      ttyrb      ttyw8

ptya1      ptyee      ptytb      ptyy8      ttycf      ttyrc      ttyw9

ptya2      ptyef      ptytc      ptyy9      ttyd0      ttyrd      ttywa

ptya3      ptyp0      ptytd      ptyya      ttyd1      ttyre      ttywb

ptya4      ptyp1      ptyte      ptyyb      ttyd2      ttyrf      ttywc

ptya5      ptyp2      ptytf      ptyyc      ttyd3      ttys0      ttywd

ptya6      ptyp3      ptyu0      ptyyd      ttyd4      ttys1      ttywe

ptya7      ptyp4      ptyu1      ptyye      ttyd5      ttys2      ttywf

ptya8      ptyp5      ptyu2      ptyyf      ttyd6      ttys3      ttyx0

ptya9      ptyp6      ptyu3      ptyz0      ttyd7      ttys4      ttyx1

ptyaa      ptyp7      ptyu4      ptyz1      ttyd8      ttys5      ttyx2

ptyab      ptyp8      ptyu5      ptyz2      ttyd9      ttys6      ttyx3

ptyac      ptyp9      ptyu6      ptyz3      ttyda      ttys7      ttyx4

ptyad      ptypa      ptyu7      ptyz4      ttydb      ttys8      ttyx5

ptyae      ptypb      ptyu8      ptyz5      ttydc      ttys9      ttyx6

ptyaf      ptypc      ptyu9      ptyz6      ttydd      ttysa      ttyx7

ptyb0      ptypd      ptyua      ptyz7      ttyde      ttysb      ttyx8

ptyb1      ptype      ptyub      ptyz8      ttydf      ttysc      ttyx9

ptyb2      ptypf      ptyuc      ptyz9      ttye0      ttysd      ttyxa

ptyb3      ptyq0      ptyud      ptyza      ttye1      ttyse      ttyxb

ptyb4      ptyq1      ptyue      ptyzb      ttye2      ttysf      ttyxc

ptyb5      ptyq2      ptyuf      ptyzc      ttye3      ttyt0      ttyxd

ptyb6      ptyq3      ptyv0      ptyzd      ttye4      ttyt1      ttyxe

ptyb7      ptyq4      ptyv1      ptyze      ttye5      ttyt2      ttyxf

ptyb8      ptyq5      ptyv2      ptyzf      ttye6      ttyt3      ttyy0

ptyb9      ptyq6      ptyv3      random     ttye7      ttyt4      ttyy1

ptyba      ptyq7      ptyv4      root       ttye8      ttyt5      ttyy2

ptybb      ptyq8      ptyv5      rtc0       ttye9      ttyt6      ttyy3

ptybc      ptyq9      ptyv6      sport0     ttyea      ttyt7      ttyy4

ptybd      ptyqa      ptyv7      tty        ttyeb      ttyt8      ttyy5

ptybe      ptyqb      ptyv8      ttyBF0     ttyec      ttyt9      ttyy6

ptybf      ptyqc      ptyv9      ttya0      ttyed      ttyta      ttyy7

ptyc0      ptyqd      ptyva      ttya1      ttyee      ttytb      ttyy8

ptyc1      ptyqe      ptyvb      ttya2      ttyef      ttytc      ttyy9

ptyc2      ptyqf      ptyvc      ttya3      ttyp0      ttytd      ttyya

ptyc3      ptyr0      ptyvd      ttya4      ttyp1      ttyte      ttyyb

ptyc4      ptyr1      ptyve      ttya5      ttyp2      ttytf      ttyyc

ptyc5      ptyr2      ptyvf      ttya6      ttyp3      ttyu0      ttyyd

ptyc6      ptyr3      ptyw0      ttya7      ttyp4      ttyu1      ttyye

ptyc7      ptyr4      ptyw1      ttya8      ttyp5      ttyu2      ttyyf

ptyc8      ptyr5      ptyw2      ttya9      ttyp6      ttyu3      ttyz0

ptyc9      ptyr6      ptyw3      ttyaa      ttyp7      ttyu4      ttyz1

ptyca      ptyr7      ptyw4      ttyab      ttyp8      ttyu5      ttyz2

ptycb      ptyr8      ptyw5      ttyac      ttyp9      ttyu6      ttyz3

ptycc      ptyr9      ptyw6      ttyad      ttypa      ttyu7      ttyz4

ptycd      ptyra      ptyw7      ttyae      ttypb      ttyu8      ttyz5

ptyce      ptyrb      ptyw8      ttyaf      ttypc      ttyu9      ttyz6

ptycf      ptyrc      ptyw9      ttyb0      ttypd      ttyua      ttyz7

ptyd0      ptyrd      ptywa      ttyb1      ttype      ttyub      ttyz8

ptyd1      ptyre      ptywb      ttyb2      ttypf      ttyuc      ttyz9

ptyd2      ptyrf      ptywc      ttyb3      ttyq0      ttyud      ttyza

ptyd3      ptys0      ptywd      ttyb4      ttyq1      ttyue      ttyzb

ptyd4      ptys1      ptywe      ttyb5      ttyq2      ttyuf      ttyzc

ptyd5      ptys2      ptywf      ttyb6      ttyq3      ttyv0      ttyzd

ptyd6      ptys3      ptyx0      ttyb7      ttyq4      ttyv1      ttyze

ptyd7      ptys4      ptyx1      ttyb8      ttyq5      ttyv2      ttyzf

ptyd8      ptys5      ptyx2      ttyb9      ttyq6      ttyv3      urandom

ptyd9      ptys6      ptyx3      ttyba      ttyq7      ttyv4      zero

ptyda      ptys7      ptyx4      ttybb      ttyq8      ttyv5

root:/>

 

 

***************************************************************************************************************

 

When I telnet in, I get a different response but the terminal is dead, no characters are accepted.

 

***************************************************************************************************************

 

pengi:/home/paulz/fastboy/blackfin/uclinux/SOURCE/uClinux-dist-2008R1-RC8/linux-2.6.x # telnet 192.0.0.10

Trying 192.0.0.10...

Connected to 192.0.0.10.

Escape character is '^]'.

 

 

BusyBox v1.4.1 (2009-01-19 17:00:13 GMT) Built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/>

root:/>

 

******************************************************************************************************************

 

BusyBox?

 

******************************************************************************************************************

 

 

QuoteReplyEditDelete

 

 

2009-01-30 16:27:59     Re: telnet problems

Mike Frysinger (UNITED STATES)

Message: 68611   

 

you also enabled the legacy bsd pty stuff ... turn that off as it's just bloat

 

as for the terminal hanging, try stracing the shell/telnetd from the serial console and see where it's getting hung up

QuoteReplyEditDelete

 

 

2009-01-30 16:42:31     Re: telnet problems

paul zawalnyski (UNITED KINGDOM)

Message: 68612   

 

ok disabled the legacy stuff

 

root:/dev> ls

console    mtd0       mtdblock0  ptyp0      ptyp6      tty        ttyp4

full       mtd0ro     mtdblock1  ptyp1      ptyp7      ttyBF0     ttyp5

kmem       mtd1       mtdblock2  ptyp2      random     ttyp0      ttyp6

kmsg       mtd1ro     null       ptyp3      root       ttyp1      ttyp7

log        mtd2       ptmx       ptyp4      rtc0       ttyp2      urandom

mem        mtd2ro     pts        ptyp5      sport0     ttyp3      zero

root:/dev>

 

 

Terminal still hangs, and I am a bit out of my depth on "stracing the shell/telnetd". It will accept <cr>, any other key causes a hang?

 

What do I Have to type for stracing?

QuoteReplyEditDelete

 

 

2009-01-30 16:51:56     Re: telnet problems

Mike Frysinger (UNITED STATES)

Message: 68613   

 

is it hanging or does return still work ?

QuoteReplyEditDelete

 

 

2009-01-30 17:04:09     Re: telnet problems

paul zawalnyski (UNITED KINGDOM)

Message: 68614   

 

<cr> works until you type anything else in. Then it stops working.

 

 

QuoteReplyEditDelete

 

 

2009-01-31 06:13:01     Re: telnet problems

paul zawalnyski (UNITED KINGDOM)

Message: 68632   

 

Its up and working.

 

I also had a bug in my ethernet code, this was causing the hang. I can configure ethernet for 8 or 16 bit data transfers. Works for 16 but not 8 bits, easy fix.

 

Thanks again for all your help.

 

Paul Z

Attachments

    Outcomes