2 * Copyright 2014 Broadcom Corporation.
4 * SPDX-License-Identifier: GPL-2.0+
8 #include <sparse_format.h>
10 #define ROUNDUP(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
12 void fastboot_fail(const char *s);
13 void fastboot_okay(const char *s);
15 static inline int is_sparse_image(void *buf)
17 sparse_header_t *s_header = (sparse_header_t *)buf;
19 if ((le32_to_cpu(s_header->magic) == SPARSE_HEADER_MAGIC) &&
20 (le16_to_cpu(s_header->major_version) == 1))
26 void write_sparse_image(block_dev_desc_t *dev_desc,
27 disk_partition_t *info, const char *part_name,
28 void *data, unsigned sz);