Skip to content

DEPRECATED - Signs Oak bin files for use with Particle/Oak OTA

Notifications You must be signed in to change notification settings

digistump/oak_sign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

#DEPRECATED DEPRECATEDDEPRECATED DEPRECATED

#oak_sign

##oak_sign v1 usage: oak_sign (filename) [optional: system or unsign]

signs "filename", an oak compatible bin file, for OTA usage if system is specified, it will be signed as a system update, if unsign is specified any signature will be removed, otherwise it is signed as a user program

###Padding structure:

Appends padding to input file to bring it to a size divisible by 512. If that padding is not at least 16 bytes, file is extended with an additional 512 bytes of padding. (IF filesize%512 < 16 THEN 512+filesize%512 ELSE filesize%512)

The last 16 bytes of padding are as follows:

  • 0-3: 0xFF
  • 4-7: Unsigned 4-byte integer of the original file size
  • 8: Flag byte (see below)
  • 9: 0x4F ("O")
  • 10: 0x61 ("a")
  • 11: 0x6B ("k")
  • 12-15: 0xFF

Flag Byte:

The flag byte denotes what type of rom the bin file contains.

  • 0x00: User Rom
  • 0x01: System Rom

###Input file requirements:

oak_sign will apply this to any input file that is non-empty. To work with the Oak platform the bin file must be compiled from the Oak Arduino core, linked with the Oak linker script, and packaged using esptool2 with the boot2 and irom options.

About

DEPRECATED - Signs Oak bin files for use with Particle/Oak OTA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published