flasher: parse ELF to check version_information and do ELF checks before looking for a proxmark3
This commit is contained in:
1 parent
359ca554c0
commit
0ed0735709
4 files changed
+147
-16
No files matched your search
+5
-1
@@ -20,6 +20,7 @@
|
||||
#define __FLASH_H__
|
||||
|
||||
#include "common.h"
|
||||
#include "elf.h"
|
||||
|
||||
#define FLASH_MAX_FILES 4
|
||||
#define ONE_KB 1024
|
||||
@@ -32,12 +33,15 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
const char *filename;
|
||||
Elf32_Phdr_t *phdrs;
|
||||
uint16_t num_phdrs;
|
||||
int can_write_bl;
|
||||
int num_segs;
|
||||
flash_seg_t *segments;
|
||||
} flash_file_t;
|
||||
|
||||
int flash_load(flash_file_t *ctx, const char *name, int can_write_bl, int flash_size);
|
||||
int flash_check(flash_file_t *ctx, const char *name);
|
||||
int flash_load(flash_file_t *ctx, int can_write_bl, int flash_size);
|
||||
int flash_start_flashing(int enable_bl_writes, char *serial_port_name, uint32_t *max_allowed);
|
||||
int flash_write(flash_file_t *ctx);
|
||||
void flash_free(flash_file_t *ctx);
|
||||
|
||||
Reference in new issue
Block a user