FALCOM RESSOURCE PACKAGE
What is a FRP
FRP is a file with a file ending *.frp which contains all needed binary and instruction to update a FALCOM AVL device. A *.frp file is basically a ZIP container with a given structure. The main idea is to have all needed files in one container - to prevent any mix of files which may not tested in this combination.
version 2.0 of FRP
*.frp
|
|-content.xml
|-avl_3.0.x_rcxx.bin
- example of XML
 
<?xml version="1.0" encoding="UTF-8"?>
<falcom-resource-package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="http://www.falcom-solutions.de/schemas/falcom-resource-package_v2.xsd">
	<version-info number="2" />
	<resources>
		<firmware>
			<file format="flat" crc="f750181d026864cfdd204374cc464db8">avl_3.0.3_rc39.bin</file>
		</firmware>
	</resources>
	<devices>
		<device class="avl" type="all">
			<module type="device">
				<resource type="firmware">
					<version major="3" minor="0" micro="3" build="39"
						state="rc" />
					<file format="flat" crc="f750181d026864cfdd204374cc464db8">avl_3.0.3_rc39.bin</file>
				</resource>
			</module>
		</device>
	</devices>
</falcom-resource-package>
update process
- unpack *.frp into local temp folder
 - parse content.xml
 - check device via 
$pfal,msg.version.complete - compare device class,type, major from current device with data from XML
 - if fit move on if not stop process here
 - check crc of *.bin
 - update *.bin via pfal in given mode (when compress is used compress before transmit)
 - check all packages transmit with ok
 - finalize update via pfal
 - device will reset
 - after reset check successfull update via 
$pfal,msg.version.complete 
version 3.0 of FRP (deprecated)
*.frp
|
|-content.xml
|-avl_3.0.x_rcxx.bin
|-xxxxx_yyy.pre.conf
|-xxxxx_yyy.post.conf
- example of XML
 
<?xml version="1.0" encoding="UTF-8"?>
<falcom-resource-package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="http://www.falcom-solutions.de/schemas/falcom-resource-package_v3.xsd">
	<version-info number="2" />
	<resources>
            <firmware>
                <file format="flat" crc="f750181d026864cfdd204374cc464db8">avl_3.0.3_rc39.bin</file>
	    </firmware>
            <configuration>
                <pre>
                    <file format="conf" crc="f750181d026864cfdd204374cc464db8">xxxxx_yyy.pre.conf</file>
		</pre>
                <post>
                    <file format="conf" crc="f750181d026864cfdd204374cc464db8">xxxxx_yyy.post.conf</file>
		</post>
            </configuration>
	</resources>
	<devices>
		<device class="avl" type="all">
			<module type="device">
				<resource type="firmware">
					<version major="3" minor="0" micro="3" build="39"
						state="rc" />
					<file format="flat" crc="f750181d026864cfdd204374cc464db8">avl_3.0.3_rc39.bin</file>
				</resource>
			</module>
		</device>
	</devices>
</falcom-resource-package>
version 4.0 of FRP (DRAFT 1)
example of frp file content
*.frp
|
|-content.xml
|-avl_3.x.x_rcxx.bin
|-xxxxx_yyy.pre.conf*
|-xxxxx_yyy.post.conf*
|-customer.crt*
|-application.lua*
|-user.txt*
- as option
 
new defenition
- format "conf" PFAL configuration file
 - format "flat"
Raw file with following options:
- "path" - absolute PATH + FILENAME of Device Filesystem
 - "sha512" - SHA512 Hash of given flat file - if not given it will be generated on the fly of uploader
 
 
new section
- bundle of uploads before firmware update
 - optional
 
new section
- bundle of uploads after firmware update
 - optional
 
example of XML
<?xml version="1.0" encoding="UTF-8"?>
<falcom-resource-package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="http://www.falcom-solutions.de/schemas/falcom-resource-package_v4.xsd">
	<version-info number="4" />
	<resources>
            <pre>
                <file format="conf" >xxxxx_yyy.pre.conf</file>
                <file format="flat" path="/lua/test.lua" sha512="f750181d026864cfdd204374cc464db8">application.lua</file>
	    </pre>
            <firmware>
                <file format="flat" >avl_3.0.3_rc39.bin</file>
	    </firmware>      
            <post>
                <file format="conf">xxxxx_yyy.post.conf</file>
                <file format="flat" path="/sys/cabundle.crt">tcp_port1_ca-bundle.crt.lua</file>
	    </post>
	</resources>
	<devices>
	    <device class="avl" type="all">
                <module type="device">
		    <resource type="firmware">
			<version major="3" minor="0" micro="3" build="39" state="rc" />
			    <file format="flat" crc="f750181d026864cfdd204374cc464db8">avl_3.0.3_rc39.bin</file>
		    </resource>
		</module>
	    </device>
	</devices>
</falcom-resource-package>
general update process
- unpack *.frp into local temp folder
 - parse content.xml
 - check device via 
$pfal,msg.version.complete - compare device class,type, major from current device with data from XML
 - if fit move on if not stop process here
 - if defined a 
<pre>in configuration sent$pfal,Sys.Device.CfgUpdateModeto enter optimized device config update mode - if not skip next 2 points - update each pfal in any xxxxx_yyy.pre.conf one by one (timeout ~30sec. retry 3)
 - when all 
$pfalsettings successfull transmitted sent$pfal,Cnf.Backupthis will optimize the stored config and create a backup of the current configuration - check crc of *.bin
 - update *.bin via pfal in given mode (when compress is used compress before transmit)
 - check all packages transmit with ok
 - finalize update via pfal
 - device will reset
 - after reset check successfull update via 
$pfal,msg.version.complete - if defined a 
<post>in configuration sent$pfal,Sys.Device.CfgUpdateModeto enter optimized device config update mode - if not skip next 3 points - update each pfal in any xxxxx_yyy.pre.conf one by one (timeout ~30sec. retry 3)
 - when all 
$pfalsettings successfull transmitted sent$pfal,Cnf.Backupthis will optimize the stored config and create a backup of the current configuration - recommended to sent a 
$pfal.sys.device.reset - please note the "crc" / "sha512" for configuration is optional