Changes between Version 7 and Version 8 of Docs/Prog/Manual/Foundation/ApplicationModeStartup


Ignore:
Timestamp:
08/24/12 13:35:19 (12 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/Foundation/ApplicationModeStartup

    v7 v8  
    222222== Mounts ==
    223223
    224 The script also starting mounting the 64M NAND flash as /mnt/nand. The "&" is used to cause the mount to run in the background while the startup script continues on. You can view the current mount points by typing:
     224The script also starts mounting the 64M NAND flash as /mnt/nand. The "&" is used to cause the mount to run in the background while the startup script continues on. You can view the current mount points by typing:
    225225{{{
    226226# cat /proc/mounts
    227227}}}
    228228
    229 Before turning off the indicator it is best to un-mount the NAND and NFS if it is mounted.
    230 {{{
    231 # umount /mnt/nand
    232 # umount /mnt/nfs
    233 }}}
    234229
    235230[[Top]]
     
    240235To view this script type:
    241236{{{
    242 # cd /mnt/nand/bin
    243 # cat appmenu.sh
     237# cat /usr/sbin/diag/appmenu.sh
    244238}}}
    245239
     
    402396
    403397== Support Applications ==
    404 '''/mnt/nand/bin/appmenu –'''
     398'''/usr/sbin/diag/appmenu –'''
    405399
    406400The appmenu program displays the application menu.
    407401
    408 '''/mnt/nand/bin/loadsrec''' – This application is normally automatically called, so a typical user need not know these details. When an “.S19” or “.bin” flash update is selected in the file manager a script file is created which calls the “loadsrec” program with the appropriate filename and options to perform the flash. It may be useful at times to call “loadsrec” manually, or to create special shell scripts which call “loadsrec”.
     402'''/usr/sbin/diag/loadsrec''' – This application is normally automatically called, so a typical user need not know these details. When an “.S19” or “.bin” flash update is selected in the file manager a script file is created which calls the “loadsrec” program with the appropriate filename and options to perform the flash. It may be useful at times to call “loadsrec” manually, or to create special shell scripts which call “loadsrec”.
    409403
    410404The command line must be specified such as:
     
    424418echo "Updating flash\\r" > /dev/carddsp
    425419
    426 /mnt/nand/bin/loadsrec "/mnt/nfs/Demo1 M5213EVB Boot Loader.elf.S19" M N
    427 
    428 /mnt/nand/bin/loadsrec /mnt/nfs/m5329evb_flash.S19 O N
     420/usr/sbin/diag/loadsrec "/mnt/nfs/Demo1 M5213EVB Boot Loader.elf.S19" M N
     421
     422/usr/sbin/diag/loadsrec /mnt/nfs/m5329evb_flash.S19 O N
    429423
    430424echo "** Done **" > /dev/carddsp
    431425
    432 '''/mnt/nand/bin/imageview''' –
     426'''/usr/sbin/diag/imageview''' –
    433427
    434428The imageview program will display BMP bitmap images. The images to display must already be sized as 640 x 480, and 24 bit per pixel format.
     
    440434If the filename is a BMP file the file will be displayed. If the filename is a .cfg file it will be interpreted as a text file containing the filenames of BMP files to display as a slideshow in a continuous loop.
    441435
    442 '''/mnt/nand/bin/filemanage –'''
     436'''/usr/sbin/diag/filemanage –'''
    443437
    444438The filemanage program is the file manager.
     
    450444The file manager returns a result code that indicates whether it was exited or whether ENTER was pressed with file such as an S19 file was selected. The file manager is normally run from a script such as:
    451445
    452 #!/bin/sh
    453 
     446{{{
    454447# File manager
    455 
    456448while :
    457 
    458449do
    459 
    460 /mnt/nand/bin/filemanage
    461 
     450/usr/sbin/diag/filemanage
    462451tmp=$?
    463 
    464 # store appmenu result in tmp so we can do something before case
    465 
    466 echo "filemanager result"
    467 
    468 echo $tmp
    469 
    470452if [ $tmp -eq 1 ] ; then
    471 
    472   sh /tmp/filemgr_cmd.sh
    473 
     453        sh /tmp/filemgr_cmd.sh
    474454else
    475 
    476   exit
    477 
     455        exit
    478456fi
    479457
    480458done
     459}}}
    481460
    482461The script executes the file manager in a loop. If the result is 1 the file manager created script /tmp/filemgr_cmd.sh is executed to perform the command such as displaying a bitmap (imageview) or updating flash (loadsrec). After the script is executed the loop will cause file manager to run again.  If the result is not 1 the exit statement will be reached causing the script to exit.