mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
This bootable device is not always partition number 1. Search the program entries for an entry that has the label xbl or sbl1 and use the partition number to mark the boot partition bootable. Reported-by: Kirill Kapranov <kkapra@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
26 lines
513 B
C
26 lines
513 B
C
#ifndef __PROGRAM_H__
|
|
#define __PROGRAM_H__
|
|
|
|
#include <stdbool.h>
|
|
|
|
struct program {
|
|
unsigned sector_size;
|
|
unsigned file_offset;
|
|
const char *filename;
|
|
const char *label;
|
|
unsigned num_sectors;
|
|
unsigned partition;
|
|
unsigned size;
|
|
bool sparse;
|
|
const char *start_bytes;
|
|
const char *start_sector;
|
|
|
|
struct program *next;
|
|
};
|
|
|
|
int program_load(const char *program_file);
|
|
int program_execute(int usbfd, int (*apply)(int usbfd, struct program *program, int fd));
|
|
int program_find_bootable_partition(void);
|
|
|
|
#endif
|