Unable to start embed Photon

Hi,

Embeding QNX image is easy, but Photon image not the case.

My target is an x86 PC and buildfile for test is as follows:

[virtual=x86,bios +compress] .bootstrap = {
startup-bios \
PATH=/proc/boot:/bin LD_LIBRARY_PATH=/proc/boot:/lib:/dll procnto

}
[+script] .script = {
display_msg Welcome to QNX on a PC-compatible BIOS system. You’ve got it !

 slogger -vv &	                                

 devc-con -e &
 reopen /dev/con1

 export LD_LIBRARY_PATH=/phembed/lib:/lib
 export PHOTON_PATH=/phembed   

 Photon &
 on -w /dev/photon -W10 #io-graphic, fonts, etc. to be included later.
 
 # Start the main shell
 [+session] esh  &        

}
[type=link] /dev/console=/dev/con1
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
[perms=+r,+x]
libc.so

[data=copy]
[perms=+r,+x]
ls
esh
ps
pwd
devc-con
slogger
sloginfo
/phembed=/home/peter1/build_test/phembed


It boots with errors
“Unable to start export”(2)
“Unable to start Photon”(2)
“Unable to start on”(2)
Photon is in /phembed/bin, I type on shell"export PHOTON_PATH=/phembed" and “Photon &”, It displays “Unable to start Photon, NO such file and directory”.

“sloginfo " results empty, it just displays"Time Sev Major minor Args”. Why?

I don’t know how to use “export DL_DEBUG=1”, please show me how.

I suspect there are wrongs with shell installation on my host top, sequently,
“esh my_script”, cron utility do not work for me. Currently, it is unable to find Photon. Should I have to update to v6.3 ?
Thanks.

Peter

Check document: Photon in Embedded Systems.

also read this thread:
openqnx.com/PNphpBB2-viewtopic-t4084-.html

Well, there are a few things not quite correct, and they aren’t photon specific.

First, the .script file isn’t being run by ksh, or even esh, it is executed by code in procnto. This means that things like math, loops, branches, etc. aren’t supported, unless you put them is a seperate script file, and invoke it with ksh or another shell. The “export” keyword is also not supported. Simply remove the “export” from the two lines, and the PHOTON_PATH and LD_LIBRARY_PATH will be set. I would recommend adding the directories from the first LD_LIBRARY_PATH line to the line in the .script file.

Second, your path is only /proc/boot:/bin. This means that when you call “Photon &”, the system will only look in those two directories. PHOTON_PATH has nothing to do with launching programs from the shell (or the startup script).

Thirdly, “on” is not included in your image. If you are not using “on” anywhere else in your system, you should change that
" on -w /dev/photon -W10 #io-graphic, fonts, etc. to be included later."
line to be
“waitfor /dev/photon 10”
which will save some space, since the “on” binary doesn’t need to be included in the image.

Finally “DL_DEBUG” is an environment variable. Once ksh is running you can simply do “export DL_DEBUG=1”, and the dynamic linker will print debug messages to the screen for any shared objects or dlopen() calls. Since ksh is not running, just put the line “DL_DEBUG=1” after the PHOTON_PATH and LD_LIBRARY_PATH lines.

Thanks to jarxon
,

I add “/phembed/bin” (/phembed has every thing, bins, libs and fonts, Photon needs) to
“PATH=” in [virtual] part, it does start Photon.

I tested “PHOTON_PATH=” line has nothing help starting Photon, but any way, I put the “PHOTON_PATH=” and “LD_LIBRARY_PATH=” lines in the script part.

I add the line as follows to the script:

phfontFF -d /phembed/font_repository -c 20K -j -s 50K -F 10 -S 50 &
waitfor /dev/phfont 10

It displays “Unable to open fonttype file”.
Exactly cut down the fonts guided by the “Photon in Embedded Systems”, thence, What
fonttypes I got to add ?

If it done, I’ll post the complete buildfile on the forum. Thanks in advance.

Peter