CMSIS2000
0.0.7
|
#include "uboot_file.h"
#include <string.h>
#include "uboot_image_format_adapted.h"
#include "Utils/CRC/crc32.h"
Go to the source code of this file.
Macros | |
#define | END_SEARCH 0 |
#define | IMAGE_STEP 0x100 |
Functions | |
flash_addr_t | find_uboot_file (flash_addr_t search_start_address, flash_addr_t search_end_address) |
Search uboot image in MCU bus address space and check CRC. | |
int | image_check_dcrc (const image_header_t *hdr) |
int | image_check_hcrc (const image_header_t *const hdr) |
static unsigned char * | memmem_magic_number (unsigned char *src, size_t size) |
static void * | round_down_pointer (void *ptr) |
unsigned int | uboot_check_image_at_addr (const void *const addr, char only_header) |
static flash_addr_t | uboot_check_image_not_aligned (flash_addr_t search_start_address, flash_addr_t search_end_address) |
search not aligned image | |
flash_addr_t | uboot_file_get_load_addr (flash_addr_t src_address) |
get load uboot image address at RAM | |
flash_addr_t | uboot_file_load (flash_addr_t src_address) |
load uboot image to RAM on MCU bus (memcpy) |
#define END_SEARCH 0 |
Definition at line 223 of file uboot_file.c.
Referenced by memmem_magic_number(), and uboot_check_image_not_aligned().
#define IMAGE_STEP 0x100 |
Definition at line 41 of file uboot_file.c.
Referenced by find_uboot_file().
flash_addr_t find_uboot_file | ( | flash_addr_t | search_start_address, |
flash_addr_t | search_end_address | ||
) |
Search uboot image in MCU bus address space and check CRC.
Definition at line 48 of file uboot_file.c.
References flash_addr_t, HAS_FULL_IMAGE, IMAGE_STEP, uboot_check_image_at_addr(), and uboot_check_image_not_aligned().
Referenced by main().
int image_check_dcrc | ( | const image_header_t * | hdr | ) |
Definition at line 187 of file uboot_file.c.
References crc32(), image_get_data(), and image_get_data_size().
int image_check_hcrc | ( | const image_header_t *const | hdr | ) |
Definition at line 164 of file uboot_file.c.
References crc32_end, crc32_no_comp(), image_header::ih_hcrc, image_header::ih_magic, and image_get_header_size().
Referenced by uboot_check_image_at_addr().
|
static |
Definition at line 224 of file uboot_file.c.
References be32_to_cpu, END_SEARCH, and IH_MAGIC.
Referenced by uboot_check_image_not_aligned().
|
inlinestatic |
Definition at line 131 of file uboot_file.c.
Referenced by uboot_file_load().
unsigned int uboot_check_image_at_addr | ( | const void *const | addr, |
char | only_header | ||
) |
Definition at line 77 of file uboot_file.c.
References endif(), IH_ARCH_DEFAULT, image_check_arch(), image_check_hcrc(), and image_check_magic().
Referenced by check_size_and_header(), find_uboot_file(), and uboot_check_image_not_aligned().
|
static |
search not aligned image
Definition at line 239 of file uboot_file.c.
References END_SEARCH, flash_addr_t, HAS_FULL_IMAGE, memmem_magic_number(), and uboot_check_image_at_addr().
Referenced by find_uboot_file().
flash_addr_t uboot_file_get_load_addr | ( | flash_addr_t | src_address | ) |
get load uboot image address at RAM
Definition at line 156 of file uboot_file.c.
Referenced by main().
flash_addr_t uboot_file_load | ( | flash_addr_t | src_address | ) |
load uboot image to RAM on MCU bus (memcpy)
Definition at line 136 of file uboot_file.c.
References flash_addr_t, IH_COMP_LZO, IH_COMP_NONE, image_get_data(), image_get_data_size(), and round_down_pointer().
Referenced by main().