opening up a terminal on /dev/ser2

i need to be able to log into my embedded thingy (thanks warren for
the correct terminology) through /dev/ser2

heres the build file i shamelessly leeched from Chris Foran

how would i get it to also listen on /dev/ser2 for a login and shell
session?
vince…

################################################################

Minimal boot image for x86 system with bios and eide disk

################################################################

Search path where mkifs will look for stuff on the host machine

[search=/sbin:/usr/sbin:/bin:/usr/bin:/lib:/lib/dll:/boot/sys]

Bootstrap section

Use virtual addressing (only choice) on an x86 system with a bios,

compress boot image
[virtual=x86,bios +compress] boot = {
startup-bios # The startup code to use
PATH=/proc/boot:/bin:/usr/bin:/sbin
LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/usr/photon/lib
procnto # The initial paths to be set
}

Startup script, these binaries are only started here, they must be

included below
[+script] startup-script = {
display_msg Executing startup-script
devc-con & # start console driver
reopen /dev/con1 # redirect stdin, stdout and stderr to
con1
[+session] sh & # start shell
pci-bios # pci-bios driver
waitfor /dev/pci
devb-eide & # floppy driver
waitfor /dev/hd0 20 # waitfor floppy driver to start,
extend max from 5 to 20s
mount /dev/hd0t77 / # mount floppy disk fs as /
display_msg Press enter for a prompt
}

[type=link] /dev/console=/dev/con1

You’ll probably always need this

libc.so

All files in boot image show up in /proc/boot. Link this to the

normal place for libc
[type=link] /usr/lib/ldqnx.so.1=/proc/boot/libc.so.1

libcam.so.1 # Common Access Method lib, needed for devb-fdc
fs-qnx4.so # QNX4 fs lib, needed to mount fs on floppy
io-blk.so # Block io lib, needed for libcam
cam-disk.so

[type=link] /usr/lib/libcam.so=/proc/boot/libcam.so.1

[data=c] # Tell OS to copy executables to different memory
before executing,

as opposed to loading directly from the image.

This is required

for executables.

devc-con
pci-bios
ksh
devb-eide
sh=ksh
ls
mount

On Wed, 03 Jan 2001 15:08:27 -0800, vince <vgeisler@engineer.com>
wrote:

i need to be able to log into my embedded thingy (thanks warren for
the correct terminology) through /dev/ser2

heres the build file i shamelessly leeched from Chris Foran

how would i get it to also listen on /dev/ser2 for a login and shell
session?
vince…

correction it really looks like this…

################################################################

Minimal boot image for x86 system with bios and eide disk

################################################################

Search path where mkifs will look for stuff on the host machine

[search=/sbin:/usr/sbin:/bin:/usr/bin:/lib:/lib/dll:/boot/sys]

Bootstrap section

Use virtual addressing (only choice) on an x86 system with a bios,

compress boot image
[virtual=x86,bios +compress] boot = {
startup-bios # The startup code to use
PATH=/proc/boot:/bin:/usr/bin:/sbin
LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/usr/photon/lib
procnto # The initial paths to be set
}

Startup script, these binaries are only started here, they must be

included below
[+script] startup-script = {
display_msg Executing startup-script
devc-con & # start console driver
reopen /dev/con1 # redirect stdin, stdout and stderr to
con1

devb-eide ioport=0x170,irq15,slave,nopci,cmd640 & # floppy driver
waitfor /dev/hd0 20 # waitfor floppy driver to start,
extend max from 5 to 20s
mount -tqnx4 /dev/hd0t77 / # mount floppy disk fs as /
devc-ser8250 -u1 3f8,4 -u2 2f8,3
sh /bin/ph
[+session] sh & # start shell
}

[type=link] /dev/console=/dev/con1

You’ll probably always need this

libc.so

All files in boot image show up in /proc/boot. Link this to the

normal place for libc
[type=link] /usr/lib/ldqnx.so.1=/proc/boot/libc.so.1

libcam.so.1 # Common Access Method lib, needed for devb-fdc
fs-qnx4.so # QNX4 fs lib, needed to mount fs on floppy
io-blk.so # Block io lib, needed for libcam
cam-disk.so

[type=link] /usr/lib/libcam.so=/proc/boot/libcam.so.1

[data=c] # Tell OS to copy executables to different memory
before executing,

as opposed to loading directly from the image.

This is required

for executables.

devc-ser8250
devc-con
ksh
devb-eide
sh=ksh
ls
mount

vince <vgeisler@engineer.com> wrote:

On Wed, 03 Jan 2001 15:08:27 -0800, vince <> vgeisler@engineer.com
wrote:


i need to be able to log into my embedded thingy (thanks warren for
the correct terminology) through /dev/ser2

heres the build file i shamelessly leeched from Chris Foran

how would i get it to also listen on /dev/ser2 for a login and shell
session?
vince…



correction it really looks like this…

################################################################

Minimal boot image for x86 system with bios and eide disk

################################################################

Search path where mkifs will look for stuff on the host machine

[search=/sbin:/usr/sbin:/bin:/usr/bin:/lib:/lib/dll:/boot/sys]

Bootstrap section

Use virtual addressing (only choice) on an x86 system with a bios,

compress boot image
[virtual=x86,bios +compress] boot = {
startup-bios # The startup code to use
PATH=/proc/boot:/bin:/usr/bin:/sbin
LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/usr/photon/lib
procnto # The initial paths to be set
}

Startup script, these binaries are only started here, they must be

included below
[+script] startup-script = {
display_msg Executing startup-script
devc-con & # start console driver
reopen /dev/con1 # redirect stdin, stdout and stderr to con1
^^^^^^^^^^^^^^^^

This is the first important step for getting your applications to
inherit a terminal device. From this point on all applications will
be using /dev/con1 for stdin/stdout/stderr (as you commented.

floppy driver

devb-eide ioport=0x170,irq15,slave,nopci,cmd640 &

waitfor floppy driver to start, extend max from 5 to 20s

waitfor /dev/hd0 20

mount floppy disk fs as /

mount -tqnx4 /dev/hd0t77 /
devc-ser8250 -u1 3f8,4 -u2 2f8,3
sh /bin/ph
[+session] sh & # start shell
^^^^^^^^^^^^^

This starts your shell on /dev/con1 as you opened it before.
In order to start a shell on the serial port. Note that this
will run after you have started the above shell.

Wait for /dev/ser2 to really exist

waitfor /dev/ser2

Make /dev/ser2 controlling terminal

reopen /dev/ser2

Run our shell on this terminal

[+session pri=10r] /bin/sh &

Thomas