Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Files required to run a telnet session on an embedded target
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: Telnet on embedded target (sample buildfile)
  • SDP: 6.3.2
  • Target: Any supported target
________________________________________________________________________

Recommendation
________________________________________________________________________

A networking connection must be setup first. Add these files to the boot image (ifs):

/usr/sbin/telnetd
inetd
/etc/inetd.conf
/etc/passwd
/etc/shadow
/bin/login

For debug purposes add:

syslogd
touch
/etc/syslog.conf

Run in the startup script or from command line on the target:

touch /tmp/syslog
syslogd &
inetd

The telnet client can be launched in the IDE System Information view (requires qconn running on the target) or on the command line:

telnet <ip-address>

Here is an example buildfile which includes the above-mentioned components. Note especially the inline /etc/passwd etc, this is a nice easy way of including these files.

[image=0x1f0000]
[virtual=ppcbe/raw] .bootstrap = {
[+keeplinked] startup-xxxx -v
}
[+script] .script = {
display_msg In virtual, indeed!
devc-ser8250 -e -c1846200 -b9600 0x800003f8,104 0x800002f8,103 &
waitfor /dev/ser1
reopen /dev/ser1
pipe &
display_msg after reopen
[+session] PATH=/bin:/proc/boot TERM=qansi esh &
io-net -pttcpip if=en0:10.30.30.44:255.0.0.0 -dtulip &
}

#
# the initial startup shell script
#
# Redirect console messages
[type=link] /bin/sh=/proc/boot/ksh
[type=link] /usr/lib/ldqnx.so.1=/proc/boot/libc.so
[type=link] /dev/console=/dev/ser1
[type=link] /tmp=/dev/shmem
[type=link] /bin/login=/proc/boot/esh

# Programs require the runtime linker (ldqnx.so) to be at a fixed location
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

# Shared libaries
libc.so
libsocket.so

[data=c]
devc-ser8250
pidin
devc-pty
esh
ls
pdebug
pipe
less
kill
io-net
nicinfo
inetd
ftp
telnet
telnetd
ping
qtalk
pipe
cat
fdisk
dcheck

/etc/inetd.conf = {
ftp stream tcp nowait root /bin/ftpd in.ftpd
telnet stream tcp nowait root /proc/boot/telnetd in.telnetd
chargen stream tcp nowait root internal
shell stream tcp nowait root /bin/rshd in.rshd
login stream tcp nowait root /bin/rlogind in.rlogind
tftp dgram udp wait ftp /bin/tftpd in.tftpd
}

/etc/services = {
chargen 19/tcp ttytst source
ftp 21/tcp
telnet 23/tcp
tftp 69/udp
biff 512/udp comsat
login 513/tcp
shell 514/tcp cmd
}

/etc/passwd={
root:x:0:0:Superuser:/root:/bin/sh
}

/etc/esh = {
}

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 None Found





Please contact us with your questions or concerns.