upstream u-boot with additional patches for our devices/boards:
https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ;
Gbit ethernet patch for some LIME2 revisions ;
with SPI flash support
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
804 B
35 lines
804 B
/*
|
|
* Copyright 2014 Broadcom Corporation.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#include <part.h>
|
|
#include <sparse_format.h>
|
|
|
|
#define ROUNDUP(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
|
|
|
|
typedef struct sparse_storage {
|
|
unsigned int block_sz;
|
|
unsigned int start;
|
|
unsigned int size;
|
|
const char *name;
|
|
|
|
int (*write)(struct sparse_storage *storage, void *priv,
|
|
unsigned int offset, unsigned int size,
|
|
char *data);
|
|
} sparse_storage_t;
|
|
|
|
static inline int is_sparse_image(void *buf)
|
|
{
|
|
sparse_header_t *s_header = (sparse_header_t *)buf;
|
|
|
|
if ((le32_to_cpu(s_header->magic) == SPARSE_HEADER_MAGIC) &&
|
|
(le16_to_cpu(s_header->major_version) == 1))
|
|
return 1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
int store_sparse_image(sparse_storage_t *storage, void *storage_priv,
|
|
unsigned int session_id, void *data);
|
|
|