aboutsummaryrefslogtreecommitdiff
path: root/tools/imx8mimage.c
AgeCommit message (Collapse)AuthorFilesLines
2024-07-15tools: Remove duplicate newlinesMarek Vasut1-1/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-02-08tools: mkimage: Add support for i.MXRT FlexSPI HeaderJesse Taube1-19/+22
Modify imx8m Flex SPI Configuration Block to work with imxrt. Add more Flex SPI configuration options to Kconfig. Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> Tested-by: Adam Ford <aford173@gmail.com> #imx8mn-beacon
2023-04-13tools: imagetool: Extend print_header() by params argumentPali Rohár1-1/+1
This allows image type print_header() callback to access struct image_tool_params *params. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-30tools: imx8mimage: Fix handle leakMikhail Ilin1-0/+1
The handle "fd" was created in imx8mimage.c:178 by calling the "fopen" function and is lost in imx8mimage.c:210. Should close the 'fd' file descriptor before exiting the parse_cfg_file(char *name) function. Fixes: 6609c2663c9c ("tools: add i.MX8M image support") Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
2022-09-29treewide: Drop image_header_t typedefSimon Glass1-4/+4
This is not needed and we should avoid typedefs. Use the struct instead and rename it to indicate that it really is a legacy struct. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-07-25tools: mkimage: Add support to generate FlexSPI Header for i.MX8mMamta Shukla1-1/+80
Add struct with Flex SPI Configuration Block and enable generating fspi header using mkimage. Refer i.MX 8M Mini Application Processor Reference Manual for detailed information about parameters for FlexSPI Configuration block. Signed-off-by: Mamta Shukla <mamta.shukla@leica-geosystems.com> Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com> Tested-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2022-07-25tools: imx8mimage: Keep IVT reserved1 field zero alwaysMarek Vasut1-8/+0
Since fe8acf556c3 ("imx: HAB: Validate IVT before authenticating image") the U-Boot HAB implementation is checking whether reserved1 field in IVT is zero or not. In case the field is not zero, IVT validation fails. Stop setting IVT reserved1 field to non-zero in mkimage imx8m plugin, otherwise the validation cannot ever work. Note that this only affects legacy boards which do not use binman. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2021-10-07tools: imx8mimage: not abort when mmap failPeng Fan1-1/+2
When creating flash.bin, the hdmi firmware might not be copied to U-Boot source tree. Then mkimage will fail. However we are switching to binman, binman will show the message if the file not there, and create empty file per i.MX8MQ binman node. So we not fail mkimage here othersize CI will fail if hdmi firmware not copied here. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-08tools: imx image: fix write warningPeng Fan1-1/+1
Fix the warning by set the variable zero to uint64_t "warning: ‘write’ reading 5 bytes from a region of size 4" Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-03-01tools: imx8mimage: Restore the original __ALIGN_MASK() macroFabio Estevam1-3/+5
Since commit c738adb8dbbf ("tool: Move ALIGN_MASK to header as common MACRO") the i.MX8MQ EVK board no longer boots. The reason is that imx8mimage.c used a custom __ALIGN_MASK() macro, so restore the original macro to fix the boot and rename it accordingly. Reported-by: Lukas Rusak <lorusak@gmail.com> Signed-off-by: Fabio Estevam <festevam@gmail.com> Tested-by: Ye Li <ye.li@nxp.com>
2020-04-24tools: imx8mimage: remove redundant codeKever Yang1-1/+0
The align for fit_size has been done twice, remove the first one for it does not make any sense. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-24tool: Move ALIGN_MASK to header as common MACROKever Yang1-2/+0
The ALIGN code is need by many files who need handle structure or image align, so move the macro to imagetool.h file. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-11-05tools: imx8mimage: add ROM VERSIONPeng Fan1-2/+22
The IVT offset is changed on i.MX8MN. Use ROM_VERSION to pass the v1 or v2 to mkimage. v1 is for iMX8MQ and iMX8MM v2 is for iMX8M Nano (iMX8MN) Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-08tools: imx8mimage: fix HDMI/FIT parsingPeng Fan1-2/+5
Add missed break for HDMI entry. And moving FIT parsing earlier, because it does not have parameter, it will not runs into CFG_REG_SIZE. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-01-01tools: add i.MX8M image supportPeng Fan1-0/+623
i.MX8M bootable image type is like i.MX6/7, but there is signed HDMI firmware image in front of A53 bootable image, which is also has an IVT header. Here we also include fit image to generate a bootable image. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Stefano Babic <sbabic@denx.de>