mirror of
https://github.com/linux-msm/qdl.git
synced 2026-10-07 06:29:17 -07:00
The typical usage of QDL so far has been for the user to manually specify a programmer, as well as one or more program and patch XML files, a so called "flat build". Some targets are built around multiple storage medias (e.g. spinor + nvme), and some targets have a plethora of sahara programmer files. This puts a burden on the user to invoke qdl with the right combination of storage selector, programmer(s), program and patch XML files. It also adds an extra step to the build, in form of flattening the Qualcomm builds. The Qualcomm builds are described by a toplevel contents.xml file, which describes to the various tools (e.g. the flattening tool) what programmer, rawprogram, and patch files to use, and it provides mapping of each referred file into the build directory structure. The format also allow multiple "flavors" of flashable content to be described, across multiple storage types. Introduce support for parsing contents.xml files to allow the user to flash non-flattened builds, across one or more storage devices and filtered by select flavors. The "qdl flash" operation is overloaded, to create a coherent user experience. The filter/specifier interpretation is extended to allow each, comma-separated, entry to describe storage types and flavors. Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
28 lines
1.1 KiB
C
28 lines
1.1 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause */
|
|
#ifndef __PROGRAM_H__
|
|
#define __PROGRAM_H__
|
|
|
|
#include <sys/types.h>
|
|
#include <libxml/parser.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include "list.h"
|
|
|
|
struct qdl_device;
|
|
struct firehose_op;
|
|
struct qdl_zip;
|
|
struct contents_filter;
|
|
|
|
int program_load(struct list_head *ops, const char *program_file, bool is_nand,
|
|
bool allow_missing, struct contents_filter *contents_filter, const char *incdir);
|
|
int program_load_xml(struct list_head *ops, xmlDoc *doc, struct qdl_zip *zip, const char *program_file,
|
|
bool is_nand, bool allow_missing, struct contents_filter *contents_filter, const char *incdir);
|
|
int erase_execute(struct qdl_device *qdl, struct firehose_op *op,
|
|
int (*apply)(struct qdl_device *qdl, struct firehose_op *op));
|
|
int program_find_bootable_partition(struct list_head *ops, bool *multiple_found);
|
|
int program_is_sec_partition_flashed(struct list_head *ops);
|
|
int program_cmd_add(struct list_head *ops, const char *address, const char *filename);
|
|
int erase_cmd_add(struct list_head *ops, const char *address);
|
|
|
|
#endif
|