Inspection of the plain-text files in this directory show that many are used launch QNX shell scripts that appear as control elements in the GEM. For example, the GEM /version screen has a control called "Start Script":
Inspection of file AAAVersion.esd finds the following definition text:
Code:
script value sys 1 0x0100 "/scrips/pidin.sh" label "Start Script"
Code:
script value sys 1 0x0100 "/scripts/myScript.sh" label "Start myScript"
The new shell script is stored in the /mnt/efs-system/scripts directory, and writes a system info file to a FAT32 formatted SD card in slot 1:
Code:
#!/bin/ksh # Copy info to SD 1 if FAT32 mounted xddir="$(mount | grep "/mnt/sdcard10" | sed 's,^/dev/sdcard10t1. on ,,;s/ type dos .*$//')" mount -uw $xddir if test -e "$xddir" then echo "[INFO] Running myScript.sh $(date) / $(getTime)" mount -uw $xddir xssfile=${xddir}/sysstatus-$(getTime).txt echo "[INFO] Timestamp: $(getTime)" > $xssfile echo "[INFO] df -k -P" >> $xssfile df -k -P >> $xssfile echo "[INFO] pidin -aenA" >> $xssfile pidin -f aenA >> $xssfile echo "[INFO] sloginfo" >> $xssfile sloginfo >> $xssfile echo; echo "[INFO] OK to remove SD 1." else echo "[INFO] No usable SD card found in slot 1 (${xddir})." fi
and we find our new system status file written to the SD card (without having to run a special-purpose SD card script). Note that this script is not suitable for unmodified MMI 3G (High) systems, as they do not have the QNX binary for sed.
New bespoke screens can be added to the GEM /main list by adding a new Engineering Screen Definition (ESD) file to directory /mnt/efs-system/engdefs. The script above can be called from a new "MyScreen" with plain-text file MyScreen.esd:
Code:
screen MyScreen Main keyValue value String per 3 0x00120004 label "Software Train Name" script value sys 1 0x0100 "/scripts/myScript.sh" label "Run myScript"
Selecting the screen, we find:
And selecting the script control, we see output from the process displayed in the GEM Console:
Information on where to find various string and numeric version information is TBD. --g
Bookmarks