Unable to start "Hello"

Hi,
when booting from PC/104 CPU, I see :

Welcome to Neutrino on an PC compatible BIOS system
Unable to start “Hello”

I used an existing bootscript and added Hello like below :

[+script] .script = {
display_msg Welcome to Neutrino on an PC compatible BIOS system
Hello
.
.
.
}

Would really appreciate very much if any one could give me some hints as to why it is unable to start the Hello project.

Thanks in advance!

I would give a full path to hello and make sure hello is executable and type ./Hello

Thanks a lot for your reply. I did as you suggested but when I boot, it says :
unable to access “Hello”

The original file is /root/workspace/Hello.
What could be the problem?

Thanks in advance.

Is it accessible from within the image? If in it’s the filesystem (as oppose to being in the image), then I believe display_msg is performed prior to the file system being mounted. Hence at that point /root/workspace does not exists.

Hi,

How should I check if Hello is accessible from within the image?

What is the difference when we say Hello is in the filesystem and it being in the image?

Also, when I boot the target, approximately how long does it take for the file system to be mounted?

Would appreciate a lot if you would help answer my doubts.

Oh, it’s a case of I’m trying something but I haven’t read the documentation ;-)

You don’t really check if Hello is accessible because you are in control (you will be after you read the documentation). You can include the Hello executable in the image (see list of file at bottom of the build file) or you can but it in the file system. If it’s in the image, you can start Hello as soon as all the drivers/resources required by Hello are started. For example if Hello talks to the serial port you must start it AFTER the serial port driver is started.

If Hello is in the filesystem you must start it AFTER the filesystem is started, which in the default build file is the diskboot command.

As for how long it takes for the file system, that’s hard to say, because it depends on the build file and your hardware. Can take from almost instanteneous to 30 secondes.

  • Mario

Thank you for your reply. I am not sure if the I have included Hello in the filesystem or in the image. Is a filesystem found inside an image? What is the difference?

A copy of the my boot script is as below.

How you do put Hello in the image?
Does the build file automatically search for Hello and include it the image when mkifs is run?
Or do we need to copy Hello onto the CF card (target), eg, using a command like :
cp /root/workspace/Hello/x86/o/Hello /fs/cf ??

=====================
[+script] .script ={

Start up some consoles

devc-con -n4 &
reopen /dev/con1

display_msg Welcome to Neutrino on an PC compatible BIOS system 

Start the pci server

seedres	
pci-bios &
waitfor /dev/pci

Disk drivers (The default one and some fun others for your pleasure…)

devb-eide blk automount=hd0t79:/,automount=hd0t77:/usr/qnx4 &

devb-eide blk automount=hd0t79:/,cache=2m,delwri=5 &

Wait for a bin for the rest of the commands (up to 60 secs)

waitfor /x86/bin 60

Some common servers

pipe &
mqueue &
devc-ser8250 &
devc-pty &

Start a debug server for debugging programs

waitfor /dev/ser1
[+session] pdebug /dev/ser1 &

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi

Start some extra shells on other consoles

reopen /dev/con2
[+session] sh &
reopen /dev/con3
[+session] sh &

Start a high priority shell just in case…

reopen /dev/con4
[pri=25 +session] sh &

Start the main shell

reopen /dev/con1
[+session] sh

[+session] login -p

}
[type=link] /dev/console=/dev/ser1
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
libc.so

[data=copy]
Hello

===============

What you’re making is an image OS filesystem. In the buildfile you write the applications/libraries your image needs. If you have a custom one like “Hello”,and you want to test it in your system, just add to the program list of your buildfile ‘/root/workspace/Hello’, and when yor system has started, run it.