mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
When parsing XML files the specified binary to be flashed may not be present. The default behaviour of QDL is to ignore missing file. This is sometimes undesireble. This patch changes the default behaviour. If the file to be flashed can't be found qdl will exit with error. An optional flag --allow-missing is introduced. It will allow to skip missing files during flashing procedure. Default value of the flag is false. Signed-off-by: Milosz Wasilewski <quic_mwasilew@quicinc.com>
31 lines
748 B
C
31 lines
748 B
C
#ifndef __PROGRAM_H__
|
|
#define __PROGRAM_H__
|
|
|
|
#include <stdbool.h>
|
|
#include "qdl.h"
|
|
|
|
struct program {
|
|
unsigned pages_per_block;
|
|
unsigned sector_size;
|
|
unsigned file_offset;
|
|
const char *filename;
|
|
const char *label;
|
|
unsigned num_sectors;
|
|
unsigned partition;
|
|
const char *start_sector;
|
|
unsigned last_sector;
|
|
|
|
bool is_nand;
|
|
bool is_erase;
|
|
|
|
struct program *next;
|
|
};
|
|
|
|
int program_load(const char *program_file, bool is_nand);
|
|
int program_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl, struct program *program, int fd),
|
|
const char *incdir, bool allow_missing);
|
|
int erase_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl, struct program *program));
|
|
int program_find_bootable_partition(void);
|
|
|
|
#endif
|