“Jeff Hoffmeyer” <jean-francois.hoffmeyer@schiller.fr> wrote in message
news:9sdm6i$m1r$1@nntp.qnx.com…
Thank you it’s work as i want now.
Here the final hello.bld
So it’s LD_LIBRARY_PATH that made the difference?
The -e option is not required, as the docs says that is the default.
[virtual=x86,bios] .bootstrap = {
startup-bios
PATH=/proc/boot procnto
LD_LIBRARY_PATH=/proc/boot
}
[+script] .script = {
devc-con -e
hello
}
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
libc.so
[data=c]
devc-con
hello
But with :
devc-con -e &
waitfor /dev/con1
reopen /dev/con1
in place of
devc-con -e
It’s also OK
“Mario Charest” <> mcharest@clipzinformatic.com> > a écrit dans le message
news:
9sbcpa$n3p$> 1@inn.qnx.com> …
“Jean-François Hoffmeyer” <> jean-francois.hoffmeyer@schiller.fr> > wrote in
message news:9saskh$s0u$> 1@nntp.qnx.com> …
I change the hello.bld file to have :
[virtual=x86,bios] .bootstrap = {
startup-bios
PATH=/proc/boot procnto
}
[+script] .script = {
devc-con -e &
hello
}
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
libc.so
[data=c]
devc-con
hello
But the result is always the same :
When I boot on the floppy, I have the message “Hit Esc for
…altboot”
followed by “D” and that’s all !
Try using display_msg statement to see if the script gets executed.
Then after starting dev-con try :
waitfor /dev/con1
reopen /dev/con1
The idea is that when devc-con starts it might not be ready by
the time you start hello (because of th & of devc-con).
waitfor will wait until devc-con has created the device.
Then reopen will specify that stdout/stdin/stderr should be
target at /dev/con1.
You should also define LD_LIBRARY_PATH to point to /proc/boot
You should try with a more complete build file as found in /boot/build/.
add your hello program get it working and then remove the unused
programs.
“Mario Charest” <> mcharest@clipzinformatic.com> > a écrit dans le message
news:
9s98kg$c9u$> 1@inn.qnx.com> …
“Jean-François Hoffmeyer” <> jean-francois.hoffmeyer@schiller.fr
wrote
in
message news:9s9628$pno$> 1@nntp.qnx.com> …
Hi all,
With QNX (V6.1A)
I try to do a floppy boot disk with a simple “Hello, world”
programm.
→ hello.c :
#include <stdio.h
main()
{
printf(“Hello, world\n”);
}
→ hello.bld :
The program requires a device to print on, somewhere to hook stdout
to.
Try starting devc-con. I’m not sure what component devc-con needs
to run. I think that if you have libc.so you would be ok.
Other potentiel problem is that if you compile this on 6.1 it would
expect ldqnx.so.2 not ldqnx.so.1.
[virtual=x86,bios] .bootstrap = {
startup-bios
PATH=/proc/boot procnto
}
[+script] .script = {
hello
}
[type=link] /usr/lib/ldqnx.so.1=/proc/boot/libc.so
libc.so
[data=c]
hello
I create the image with “mkifs hello.bld hello.img” and copy the
image
on
the floppy with “dinit -f hello.img /dev/fd0”.
When I boot on the floppy, i have the message “Hit Esc for
…altboot”
followed by “D” and that’s all !
Any Idea ?
Thank you
\