summaryrefslogtreecommitdiff
path: root/tools/stm32image.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-02-14 07:31:47 -0500
committerTom Rini <trini@konsulko.com>2020-02-14 07:31:47 -0500
commitf2a73d6867ef973fbb8471cc87058205999b5e5c (patch)
treea374f6fa963e239778d6125351f258e5ef442561 /tools/stm32image.c
parente6da32f243b3846e5c18183b8604b71ccb535a89 (diff)
parent8ee5e3c81f47b8647ef05219058d260199c51d1b (diff)
Merge tag 'u-boot-stm32-20200214' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
- add DH Electronics DHCOM SoM and PDK2 board - DT alignment with kernel v5.5-rc7 for stm32mp1 boards - fix STM32 image format for big endian hosts in mkimage - solve warnings in device tree and code for stm32mp1 boards - remove fdt_high and initrd_high for stm32 and stih boards - add support of STM32MP15x Rev.Z - update stm32mp1 readme
Diffstat (limited to 'tools/stm32image.c')
-rw-r--r--tools/stm32image.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/stm32image.c b/tools/stm32image.c
index ff3ec5f3f2b..18357c05182 100644
--- a/tools/stm32image.c
+++ b/tools/stm32image.c
@@ -45,7 +45,7 @@ static void stm32image_default_header(struct stm32_header *ptr)
ptr->magic_number = HEADER_MAGIC;
ptr->header_version[VER_MAJOR_IDX] = HEADER_VERSION_V1;
ptr->option_flags = HEADER_DEFAULT_OPTION;
- ptr->ecdsa_algorithm = 1;
+ ptr->ecdsa_algorithm = cpu_to_le32(1);
ptr->binary_type = HEADER_TYPE_UBOOT;
}
@@ -131,7 +131,8 @@ static void stm32image_set_header(void *ptr, struct stat *sbuf, int ifd,
stm32hdr->image_entry_point = cpu_to_le32(params->ep);
stm32hdr->image_length = cpu_to_le32((uint32_t)sbuf->st_size -
sizeof(struct stm32_header));
- stm32hdr->image_checksum = stm32image_checksum(ptr, sbuf->st_size);
+ stm32hdr->image_checksum =
+ cpu_to_le32(stm32image_checksum(ptr, sbuf->st_size));
}
/*