Disabling drivers in diskboot

I’m currently prototype an embedded controller (pc104) on a pc. The diskboot utility seems to do all I want and more but I need a shell on one of the serial ports.
I can get this using

devc-ser8250 -s -F &
sh &
[pri=10o] PATH=/proc/boot diskboot -x "devc-ser8250" -b1 -                      D0 -odevc-con,-n4 

But the -x “devc-ser8250” seems to do nothing, and I am left with 2 serial drivers, the second of which I must kill before the serial login works. The port is also subject to hardware control once I’ve killed the second serial driver.

If I could not start the serial driver in diskboot and then open it afterwards I’d have a lot less hassle setting up the shell too, wouldn’t I?

All help gratefully accepted

Personnaly I don’t use diskboot. You can get a smaller image and faster boot time if you manually start only the program that are really required. For example why check for cd if know there isn’t one. Here is my build file for my PC. This is based on a file provide by cdm.

This sets up the kernel and proc.

- x86 based kernel using the bios.boot to set things up.

- Compression is turned on.

- Use startup-bios to finish setting up the machine.

- Start procnto after startup-bios is finished.

[virtual=x86,bios +compress] boot = {
startup-bios -v
PATH=/proc/boot:/bin:/usr/bin:/sbin:/usr/sbin LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/usr/photon/dll procnto -v

Once procnto is running it will mount the image filesystem and

run this script.

[+script] startup-script = {

procmgr_symlink ../../proc/boot/libc.so.2 /usr/lib/ldqnx.so.2

# Populate the kernel resource database

# Start the system logger
slogger &
waitfor /dev/slog

# Start the PCI server for drivers that need pci.
display_msg "Starting pci-bios server..."
pci-bios &
waitfor /dev/pci

# Start the standard PC console driver and
#  make it the default output (reopen).
display_msg "Starting up console driver..."
devc-con -n6 &
waitfor /dev/con1
reopen /dev/con1

# Pipe provides pipe() services.
display_msg "Starting pipe manager..."
pipe &
waitfor /dev/pipe

# Start eide driver to get drive access.
display_msg "Starting eide driver..."
#devb-eide blk auto=partition dos exec=all cam quiet eide dma eide dma &
devb-eide eide blk commit=low,noatime,auto=partition,cache=64M,alloc=64M,delwri=60 &
display_msg "Waiting HD detection"
waitfor /dev/hd0t79 30

# Mount Filesystems
display_msg "Mounting filesystems..."
#mount -t dos /dev/hd0t12 /fs/hd0-dosdd
#mount -t qnx4 /dev/hd0t77 /fs/hd0-qnx4
#mount -t qnx4 "/fs/hd0-dos/Program Files/qnx/boot/fs/root.qfs" /
#mount -r -t qnx4 "/fs/hd0-dos/Program Files/qnx/boot/fs/qnxbase.qfs" /pkgs/base
mount -t qnx4 /dev/hd0t79 /
mount -t qnx4 /boot/fs/qnxbase.qfs /pkgs/base
mount -t qnx4 /dev/hd1t77 /home

# Start the Package Filesystem
display_msg "Starting Package Filesystem..."
fs-pkg -a/pkgs/base/safe-config/etc/system/package/packages

# Start the sysinit script
display_msg "Running /etc/system/sysinit...."
[+session] /bin/ksh -c /etc/system/sysinit

#display_msg "Starting high priority shell on /dev/con2"
#reopen /dev/con2
#[+session pri=30o] fesh

reopen /dev/con2


These are the standard, required links

[type=link] /dev/console=/dev/con1
[type=link] /usr/lib/ldqnx.so.1=/proc/boot/libc.so

Shared Libraries




unlink_list = {


I tried to write my own but had problems getting vi to work. TERM variable set wrong it claimed, but I set it to all the relevant ones I could find and nothing worked. This disk boot seemed like the best thing under the circumstances but the -x option seems bugged. I tried it all the ways I could think of as well.

-x dev***
-x "dev***

Just wondered if I was being as stupid as usual or if anyone else had noticed it.
Faster boot would be better.

Thanks again.

ps don’t know why my post appeared twice.

What is the error?
Is this on host machine or target? If on target, maybe you didn’t copy the terminfo files over.

diskboot only starts the disk drivers. Everything else is setup by the enumerators. So you can actually change the arguments to devc-ser8250 by editing /etc/system/config/enum/devices/character.

The error was “unrecognised TERM type” on the target. I tried ansi, qnx, qansi, qansi-m and vt100, all to no effect. I thought it must be some other setup problem so I tried messing around with some of vi’s other environmental variables and as expected no good. It would be nice to find out what I was doing wrong. More also complained but managed to struggle through.

As I mentioned in my last post, you will need to copy /usr/lib/terminfo directory onto the target, or at least the term related to the term type that you want.

Thanks noc I now have vi on my console, but not on my serial terminal.
I have a probelm where when I change the port characteristics using stty the changes revert back as soon as I type on the serial terminal.