How to startup without login

I am not by any means even an amateur QNX user, so no answer will be too basic for the moment.

I have a CPU (X86) running neutrino, and instead of booting up and running the login process (and photon), I want it to instead boot up and run a process or two I have created within the IDE.
The final product will be a simple embedded system, so graphics are not needed

Its currently running with the login, and I still want some of the drivers I have been using (serial ports mainly), but am happy to let all the drivers be initialised. Is there a real simple way of removing process (login/photon) and starting my processes?

I have got as far as editing a BSP and looking at my boot script… then seemed to get lost in a spiral of ‘helpful’ topics :cry:

Sorry if my question was worded badly.

Well you can get rid of the login by removing tinit from the boot script.

Creating your own custom boot script can be quite challenging. There is a lack of documentation that I’ve run into on some specific issues. The main one has to do with dll’s. You can use trial and error.

The first brave thing to do is to get rid of diskboot. This is a really nice handy utility for a development system, but you really don’t want it for a target.

Start the disk driver yourself. Use “waitfor” to wait for devices to appear. Mount your partition and finally start your own “startup” script file. It can be tricky figuring out what you will and won’t need to get this far. For examle you will probably need devb-eide, libcam.so, io-blk.so, fs-qnx4.so. You won’t need cam-disk.so unless you are booting off of a CD. You probably won’t need fs-dos.so, fs-ext2.so or fs-cd.so. You can also eliminate all those unused drivers like devb-amd and devb-aha?

In the trial and error process, look for messages that indicate you are missing something, add it and try again.

Doing all this speeds up your boot time.

Maybe this isn’t what you really want to know? Maybe there is a parameter to diskboot that will do what you want, it’s always worth checking the docs.

d.c,

Here is a custom boot image I use that only starts the HD driver and serial port driver. As Mitchell noted, it removes diskboot which you don’t need/want in a custom image.

###############################################################################
#
# This image is designed for fast booting. Only the bare minimum of services
# (IDE/SATA disk driver and serial driver) are installed in this image.
# Everything else will be started by the rc.sysinit file.
#
###############################################################################
[virtual=x86,bios +compress] boot = {
    # Reserve 64k of video memory to handle multiple video cards 
    startup-bios -s64k

    # PATH is the *safe* path for executables (confstr(_CS_PATH...))
    # LD_LIBRARY_PATH is the *safe* path for libraries (confstr(_CS_LIBPATH))
	#    i.e. This is the path searched for libs in setuid/setgid executables.
    PATH=/proc/boot:/bin:/sbin:/usr/bin:/usr/sbin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto
}

[+script] startup-script = {
    # To save memory make everyone use the libc in the boot image!
    # For speed (less symbolic lookups) we point to libc.so.2 instead of
    # libc.so
    procmgr_symlink ../../proc/boot/libc.so.2 /usr/lib/ldqnx.so.2

    # Default user programs to priorty 10, other scheduler (pri=10o)
    display_msg "amproBoard Build Ver 1.0"

    [pri=10o] PATH=/proc/boot pci-bios &

    # Create some consoles for logging in/viewing output. Remove this if not needed.
    devc-con -n4 &
       
    # Disk Driver
    devb-eide blk cache=2m,automount=hd0t79:/ & 

    # Wait until the disk manifests itself
    waitfor /x86  10

    # Some common servers and drivers (serial) 	
    pipe &
    devc-pty -n32 &
    devc-ser8250 -u1 3f8,4 2f8,3 -u3 3e8,11 -u4 2e8,10 &

    # Do all the system init from /etc/rc.d/rc.sysinit
    sh /etc/rc.d/rc.sysinit
}

# Include the current "libc.so". It will be created as a real file using
# it's internal "SONAME", with "libc.so" being a symlink to it. The symlink
# will point to the last "libc.so.*" so if an earlier libc is needed
# (e.g. libc.so.1) add it before the this line.
libc.so

# Include all the files for the default filesystems
libcam.so
io-blk.so
cam-disk.so
fs-qnx4.so

#------------------------------------------------------------
#  This comment from example text file - disregard it.
# XX These programs only need to be run once from the boot image.
# XX "data=uip" will waste less memory as the ram from the boot
# XX image will be used directly without making a copy of the data
# XX (i.e. as the default "data=cpy" does). When they have been
# XX run once, they will be unlinked from /proc/boot.
#------------------------------------------------------------
[data=copy]
seedres
pci-bios
devb-eide
slogger
devc-con
esh

Assuming your embedded system has a CF disk or HD then normally you start your custom apps in /etc/rc.d/rc.local. The rc.local file won’t exist so you must create it yourself (look in rc.sysinit for examples of how things start).

If your system doesn’t have a CF disk or HD then you’d need to embed your apps in the boot image (add them at the end of the bootscript in the data=copy section) then replace the line where I start rc.sysinit with your apps (ie ‘myapp &’).

To disable photon go to /etc/system/config and type ‘touch nophoton’. This creates an empty ‘nophoton’ file which tells the system not to start photon by default.

Tim

This info looks extremely helpful, thanks!