CM-T3530: WinCE: Updater

From Compulab Mediawiki
Revision as of 08:54, 19 July 2010 by Mike (talk | contribs) (Target Media Layout)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

The CM-T3530 Updater Framework is based on general CompuLab Updater framework for Windows CE.

The CM-T3530 demo image installation flow is described in Getting Started Guide. This article presents an overview of the CM-T3530 target media layout, Updater application installation flow and the demo image installation XML script located in LiveDisk\script.xml

Updater Customization for CM-T3530

Target Media Layout

The WinCE demo image requires the following logical layout of the CM-T3530 512 MB NAND flash:

  • boot section (CMT35-nand.raw) that contains bootstrap, bootloader and bootloader parameters
    • 4 copies of XLDR (CM-T3530 bootstrap)
    • Eboot (CM-T3530 bootloader)
    • Eboot parameters (at offset 0xBF800)
    • splashscreen parameters (at offset 0xBF900)
  • splashscreen (at offset 0xC0000)
  • MBR
  • BINFS partition (for NK.bin)
  • TFAT partition for user data storage

The above layout settings are defined in the <target_storage> sections of the installation script.

Admolition note.png Please refer to Target storage XML section description for the XML syntax details

Update Flow

The Updater application invokes the following actions according to the <actions> section of the installation script.xml:

  • Reserve 10 blocks at the end of NAND (used to compensate bad block variations among different NAND chips)
  • Store and reserve bootstrap, bootloader and bootloader parameters (CMT35-nand.raw)
  • Store and reserve splashscreen
  • Erase non reserved NAND area including existing OS partitions
  • Create MBR
  • Create BINFS partition for NK.bin storage
  • Create user data partition
  • Format user data partition with TFAT
  • Store NK.bin file into BINFS partition
  • Update splashscreen parameters (optional)
Admolition note.png See Update flow actions XML section for the XML syntax details

Demo Image Installation XML Script

<updater version="1.0.0.99">
 <source_storage>
   <access_information>
     <device_type>SD</device_type>
     <device_name>DSK1:</device_name>
     <mount_path>\Storage Card</mount_path>
   </access_information>
   <logger_information>
     <updater_logger>
       <file_name>updater_log.txt</file_name>
       <append_log>false</append_log>
       <verbosity>debug</verbosity>       
     </updater_logger>
     <system_logger>
       <file_name>system_log.txt</file_name>
       <append_log>false</append_log>
     </system_logger>     
   </logger_information>
 </source_storage>
  
<target_storage>
  <device id="nand1">
    <config type="nand" chipid="0" sectorsize="0x800" blocksize="0x20000" length="detected"></config>
    <region id="boot_region">
      <config type="boot" start="0x0" alignment="blocksize"></config>
      <entity id="boot_content">
        <config type ="raw" offset="0x0000" length="0xC0000" alignment="blocksize"></config>
        <source file="CMT35-nand.raw" format="raw"></source>
      </entity>
      <entity id="boot_parameters">
        <config type ="raw" offset="0xBF800" length="0x800" alignment="sectorsize"></config>        
      </entity>      
      <entity id="splashscreen">
        <config type ="raw" length="auto" alignment="blocksize"></config>
        <source file="splashscreen.bmp" format="raw"></source>
      </entity>     
    </region>
    <region id="os_region">
      <config type="os" alignment="blocksize"></config>
      <source file="os_region.nb0" format="raw"></source>
      <entity  id="os_partition_table">
        <config type="partition_table"></config>
      </entity>
      <entity id="partition_nk">
        <config type="partition" name="nk"  length="auto" reserve="10%" alignment="sectorsize"></config>
        <source file="nk.bin" format="bin"></source>
      </entity>
      <entity id="partition_system">
        <config type="partition" name="system" alignment="sectorsize"></config>        
      </entity>
    </region>
    <!-- Compensate for bad blocks variance among differnt NAND chips -->
    <region id="reserve_region">
      <config type="reserve" length="blocksize" replication="10" alignment="blocksize"></config>
    </region>
  </device>
</target_storage>

<actions>
  <action type="reserve">
    <target id="reserve_region" alignment="blocksize"></target>
    <params oem_attribute="reserved_readonly"></params>
  </action>  
  <action type="store" subtype="raw">
    <target id="boot_content"></target>
    <params block_status="reserved" oem_attribute="reserved_readonly"></params>
  </action>
  <action type="store" subtype="raw">
    <target id="splashscreen"></target>
    <params block_status="reserved" oem_attribute="reserved_readonly"></params>
  </action>
  <action type="erase">
    <target id="os_region"></target>
  </action>  
  <action type="partition_create">
    <target id="partition_nk"></target>
    <params part_type="bootsection" active="false"></params>
  </action>
  <action type="partition_create">
    <target id="partition_system"></target>
    <params part_type="dos32_fat" active="false"></params>
  </action>
  <action type="store" subtype="raw">
    <target id="partition_nk"></target>
  </action>
  <action type="update_parameter" subtype="offset">
    <target id="boot_parameters"></target>
    <params param_offset="0x100" param_length="4" param_value="0x4c434453" param_type="number"></params> <!-- Signature-->
    <params param_offset="0x104" param_length="4" param_value="0x280" param_type="number"></params> <!-- Height-->
    <params param_offset="0x108" param_length="4" param_value="0x1e0" param_type="number"></params> <!-- Width-->
    <params param_offset="0x10C" param_length="4" param_value="0x20" param_type="number"></params> <!-- HorizontalSyncPulseWidth-->
    <params param_offset="0x110" param_length="4" param_value="0x0" param_type="number"></params> <!-- HorizontalSyncPolarity-->
    <params param_offset="0x114" param_length="4" param_value="0x17" param_type="number"></params> <!-- HorizontalBackPorch-->
    <params param_offset="0x118" param_length="4" param_value="0x8" param_type="number"></params> <!-- HorizontalFrontPorch-->
    <params param_offset="0x11C" param_length="4" param_value="0x1" param_type="number"></params> <!-- VerticalSyncPulseWidth-->
    <params param_offset="0x120" param_length="4" param_value="0x0" param_type="number"></params> <!-- VeritcalSyncPolairty-->
    <params param_offset="0x124" param_length="4" param_value="0x3" param_type="number"></params> <!-- VerticalBackPorch-->
    <params param_offset="0x128" param_length="4" param_value="0x4" param_type="number"></params> <!-- VerticalFrontPorch-->
    <params param_offset="0x12C" param_length="4" param_value="0x17D7840" param_type="number"></params> <!-- PixelClockFrequency-->
    <params param_offset="0x130" param_length="4" param_value="0x1" param_type="number"></params> <!-- PixelClockPolarity-->
    <params param_offset="0x134" param_length="4" param_value="0x0" param_type="number"></params> <!-- IsDVIEnabled-->    
  </action>  
</actions> 
</updater>
Admolition note.png See Updater Application XML section for the XML syntax details

See Also