New Tag FW Pack

This commit is contained in:
jjwbruijn
2024-03-17 22:40:20 +01:00
parent 3ccbda8489
commit 68d75782ba
2 changed files with 11 additions and 24 deletions

Binary file not shown.

View File

@@ -1,36 +1,23 @@
<?php
$types[0x00] = "SOLUM_154_SSD1619-tag-00-0022.bin";
$types[0x01] = "SOLUM_29_SSD1619-tag-01-0022";
$types[0xF0] = "Tag_FW_Segmented_UK.bin";
$types[0x02] = "SOLUM_42_SSD1619-tag-02-0022.bin";
$types[0x11] = "SOLUM_29_UC8151-tag-11-0022.bin";
$version = "0027";
$binpath = "../binaries/Tag";
$types[0x00] = "SOL_M2_154_SSD_".$version.".bin";
$types[0x01] = "SOL_M2_29_SSD_".$version.".bin";
$types[0x02] = "SOL_M2_42_SSD_".$version.".bin"; //"SOLUM_42_SSD1619-tag-02-0022.bin";
$types[0x11] = "SOL_M2_29_UC_".$version.".bin"; //"SOLUM_29_UC8151-tag-11-0022.bin";
$types[0x21] = "SOL_M2_29_LT_".$version.".bin";
$binpath = "../binaries/Tag/";
$tocmaxsize = 512;
$toc = array();
$output = '';
$output = str_pad($output,$tocmaxsize,"\0");
$output = str_pad($output,$tocmaxsize,"\0");
/*
$version = exec("cat main.c | grep version | grep uint16_t");
list($blaat, $version) = explode("= 0x",$version);
if(strlen($version)<4)die("Couldn't read version from main.c, please check. I got $version");
$version = hexdec($version);
*/
$version = 0;
// *** fixme: this should select only filenames containing the latest version. See python version of this script.
exec("ls -1 $binpath | grep 'Tag_FW' | grep -v battery | grep -v Pack | grep -v M3", $binaries);
foreach($binaries as $file){
foreach($types as $type => $file){
$file = trim($file);
$type = -1;
foreach($types as $typeid => $typefile){
if($typefile == $file){
$type = $typeid;
}
}
if($type!=-1)echo("Adding filetype <$file>\n");
$binary = file_get_contents($binpath.$file);
$length = strlen($binary);