1
0
Fork 0
forked from len0rd/rockbox

sbtools: move sb file production to its own file with a clean api, factor key reading even more

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30851 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Amaury Pouly 2011-10-29 17:01:47 +00:00
parent 93c6c79e8d
commit d2a58f3aad
7 changed files with 574 additions and 536 deletions

View file

@ -77,8 +77,6 @@ char *g_out_prefix;
bool g_debug;
bool g_raw_mode;
#define ROUND_UP(val, round) ((((val) + (round) - 1) / (round)) * (round))
static uint8_t instruction_checksum(struct sb_instruction_header_t *hdr)
{
uint8_t sum = 90;
@ -495,7 +493,7 @@ static void extract(unsigned long filesize)
print_hex(g_buf, 16, true);
/* sections */
if(strcasecmp(s_getenv("SB_RAW_CMD"), "YES") != 0)
if(!g_raw_mode)
{
color(BLUE);
printf("Sections\n");
@ -747,9 +745,7 @@ int main(int argc, char **argv)
break;
case 'k':
{
int kac;
key_array_t ka = read_keys(optarg, &kac);
add_keys(ka, kac);
add_keys_from_file(optarg);
break;
}
case 'z':