Difference between revisions of "Tokens"

From WebOS Internals
Jump to navigation Jump to search
 
Line 11: Line 11:
 
The CRC polynomial is 0xedb88320.
 
The CRC polynomial is 0xedb88320.
  
In the freesmartphone.org git repository [http://git.freesmartphone.org/?p=utilities.git;a=tree;f=palmpre/read_tokens;h=e84d2cbbc1baf0656287c67abfdf971946291a35;hb=HEAD] you will find a little utility which reads all tokens and outputs a key/value file.
+
In the webOS-Internals git repository [http://git.webos-internals.org/?p=tools/bootie-config.git;a=summary] you will find a little utility which reads and sets bootie tokens and env variables as well as restore backup tokens.

Latest revision as of 02:17, 8 December 2010

The Tokens area contains a number of entries. Each entry has the following format:

Magic:      0x4e4b4f54 'TOKN'
Version:    0x00000001
Length:     0x???????? Length of the data area
Generation: 0x00000001
CRC:        0x???????? CRC of the full entry treating the 4 CRC bytes as zeroes
Name:       up to 16 bytes, zero padded name of the token
Data:       'lenght' bytes, plus zero padding up to the next 4 bytes boundary

The CRC polynomial is 0xedb88320.

In the webOS-Internals git repository [1] you will find a little utility which reads and sets bootie tokens and env variables as well as restore backup tokens.