Generating an update

These instructions assume that you've already acquired the delta-generating tools from Red Bend and that you're running the update-generation process on an Ubuntu Linux system. Windows hosts aren't currently supported.
Note: Before you can generate the delta file, you must first obtain a configuration file to control the delta generator (this process is described in the Red Bend Integrator's Reference manual). Step 1 in the following procedure shows how to create your own configuration file.

To generate an update:

  1. If necessary, create the main configuration file by copying the following content into a new XML file:
    <vrm>
        <DeltaType>update</DeltaType>
        <ComponentDeltaFileName>
            QNXCAR2-from_version-to_version.mld
        </ComponentDeltaFileName>
        <RamSize>0x20000000</RamSize>
        <Statistics>stats_from_version-to_version.txt</Statistics>
        <keepinvaliddelta>1</keepinvaliddelta>
        <partition>
            <PartitionName>apps</PartitionName>
            <PartitionType>PT_FS</PartitionType>
            <MountPoint>/</MountPoint>
            <SourceVersion>source</SourceVersion>
            <TargetVersion>target</TargetVersion>
            <ExcludeSourceFilter>filter.xml</ExcludeSourceFilter>
            <ExcludeTargetFilter>filter.xml</ExcludeTargetFilter>
        </partition>
    </vrm>
    

    The listing above contains the recommended contents for the configuration file. Your filename must follow the format shown in the <ComponentDeltaFileName> tag, where from_version and to_version are replaced with the versions of the source and target trees.

  2. If necessary, create the filter definition file that's used by the main configuration file by copying the following content into a new XML file:
    <FilterFile version=1.0>
        <ExcludeSourceFilter>dos/qnx-ifs</ExcludeSourceFilter>
        <ExcludeTargetFilter>dos/qnx-ifs</ExcludeTargetFilter>
    </FilterFile>
    

    In this example, you would name the filter definition file filter.xml so it will be picked up by the main configuration file created in Step 1.

    This additional XML file defines the filters that prevent the boot image of the DOS partition on the QNX CAR system's SD card from being overwritten during the update.
  3. In the directory where you plan to run the update generator, create two new subdirectories called source and target.

    The source directory will contain the filesystem image that matches what is currently running on your device. The target directory will contain the filesystem image that your device will be running after the update.

    Note: When unpacking the filesystem image files, make sure to use sudo and to include the -p option when running tar. Since the permissions of some of the files in the image are owned by root, it's important not to modify them during this process.
  4. In the source directory, unpack the filesystem:
    # cd source
    # sudo tar xmzpf ../board.variant.version.tar.gz 
                base dos var/pps/qnxcar/system/info
    

    where board.variant.version.tar.gz is the name of the source filesystem image.

    Note: When listing the files to unpackage in the tar command, don't include any files from the user data partition, which is mounted to '/', except for /var/pps/qnxcar/system/info. You must prevent user data from being overwritten by the update so you can retain your preferred settings for all apps. You can specify a more restricted set of files than what's shown in the sample tar command to further narrow the scope of the update.
  5. In the target directory, unpack the filesystem image of the build that you want to update your device to:
    # cd ../target
    # sudo tar xmzpf ../board.variant.version.tar.gz 
                base dos var/pps/qnxcar/system/info
    

    where board.variant.version.tar.gz is the name of the target filesystem image.

    Note: As in Step 4, don't include any files from the user data partition in the list of files to unpackage (except for /var/pps/qnxcar/system/info).
  6. Run the update generator, using sudo privileges:
    # sudo ./vRapidMobileCMD-Linux.exe /type=vRM 
                /configuration_file=./deltaConfig.xml
    

    where deltaConfig.xml is the name of the file you created in Step 1.

    An update (delta) file called QNXCAR2-from_version-to_version.mld (where from_version and to_version are the source and target version numbers) will be written to your current directory. You'll use this file to update your system.