mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
[new uImage] Define a API for image handling operations
- Add inline helper macros for basic header processing - Move common non inline code common/image.c - Replace direct header access with the API routines - Rename IH_CPU_* to IH_ARCH_* Signed-off-by: Marian Balakowicz <m8@semihalf.com>
This commit is contained in:
parent
ed29bc4e81
commit
b97a2a0a21
34 changed files with 820 additions and 804 deletions
|
@ -221,13 +221,13 @@ int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||
image_header_t *hdr = &header;
|
||||
ulong data;
|
||||
|
||||
memmove (&header, (char *)fpga_data, sizeof(image_header_t));
|
||||
if (ntohl(hdr->ih_magic) != IH_MAGIC) {
|
||||
memmove (&header, (char *)fpga_data, image_get_header_size ());
|
||||
if (!image_check_magic (hdr)) {
|
||||
puts ("Bad Magic Number\n");
|
||||
return 1;
|
||||
}
|
||||
data = ((ulong)fpga_data + sizeof(image_header_t));
|
||||
data_size = ntohl(hdr->ih_size);
|
||||
data = ((ulong)fpga_data + image_get_header_size ());
|
||||
data_size = image_get_data_size (hdr);
|
||||
rc = fpga_load (dev, (void *)data, data_size);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue