diff options
author | Tom Rini <trini@konsulko.com> | 2021-03-03 10:10:34 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-03 10:10:34 -0500 |
commit | 52ba373b7825e9feab8357065155cf43dfe2f4ff (patch) | |
tree | e703b3feae721de7a97b547ee3a0f1e628219d0e /tools | |
parent | 23ab54e0933939d201d7c200503bc149128a13db (diff) | |
parent | 03bf8436a3a5b19ff4ae23868dd479acc050ff08 (diff) | |
download | u-boot-52ba373b7825e9feab8357065155cf43dfe2f4ff.tar.gz u-boot-52ba373b7825e9feab8357065155cf43dfe2f4ff.tar.xz u-boot-52ba373b7825e9feab8357065155cf43dfe2f4ff.zip |
Merge tag 'u-boot-imx-20210303' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
i.MX for 2021.04
----------------
- new boards:
- i.MX8MN Beacon EmbeddedWorks (2GB)
- Gateworks Venice imx8mm
- convert to DM:
- imx53-qsb, mx53loco, mx51evk, mx23-evk
- Fixes :
- Network : FEC ethernet quirks
- DH dh-imx6
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/6597
Diffstat (limited to 'tools')
-rw-r--r-- | tools/imx8mimage.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c index bc4ee793cb..9985b95a98 100644 --- a/tools/imx8mimage.c +++ b/tools/imx8mimage.c @@ -32,6 +32,8 @@ static uint32_t rom_version = ROM_V1; #define HDMI_FW_SIZE 0x17000 /* Use Last 0x1000 for IVT and CSF */ #define ALIGN_SIZE 0x1000 +#define ALIGN_IMX(x, a) __ALIGN_MASK_IMX((x), (__typeof__(x))(a) - 1, a) +#define __ALIGN_MASK_IMX(x, mask, mask2) (((x) + (mask)) / (mask2) * (mask2)) static uint32_t get_cfg_value(char *token, char *name, int linenr) { @@ -342,7 +344,7 @@ static int generate_ivt_for_fit(int fd, int fit_offset, uint32_t ep, fit_size = fdt_totalsize(&image_header); - fit_size = ALIGN(fit_size, ALIGN_SIZE); + fit_size = ALIGN_IMX(fit_size, ALIGN_SIZE); ret = lseek(fd, fit_offset + fit_size, SEEK_SET); if (ret < 0) { @@ -446,7 +448,7 @@ void build_image(int ofd) * Aligned to 104KB = 92KB FW image + 0x8000 * (IVT and alignment) + 0x4000 (second IVT + CSF) */ - file_off += ALIGN(sbuf.st_size, + file_off += ALIGN_IMX(sbuf.st_size, HDMI_FW_SIZE + 0x2000 + 0x1000); } @@ -479,7 +481,7 @@ void build_image(int ofd) imx_header[IMAGE_IVT_ID].boot_data.start = imx_header[IMAGE_IVT_ID].fhdr.self - ivt_offset; imx_header[IMAGE_IVT_ID].boot_data.size = - ALIGN(sbuf.st_size + sizeof(imx_header_v3_t) + ivt_offset, + ALIGN_IMX(sbuf.st_size + sizeof(imx_header_v3_t) + ivt_offset, sector_size); image_off = header_image_off + sizeof(imx_header_v3_t); |