arm-trusted-firmware/tools/fiptool
Antonio Borneo 06e69f7c94 feat(fiptool): handle FIP in a disk partition
When FIP is programmed in a disk partition, fiptool cannot be used
directly; this forces the user to temporarily copy the partition
to a file, apply fiptool and copy back the file. This is caused by
fstat() that returns zero file size on a block special file, thus
making fiptool commands info, update, unpack and remove to exit.

For either Linux host or Linux target, recover the partition size
with ioctl() and use it as FIP file size. E.g.:
	fiptool info /dev/disk/by-partlabel/fip-a
	fiptool info /dev/mtdblock4

While there, rework two identical error log messages to provide
more details about the failure and update the date in copyright.

Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
Change-Id: I7cab60e577422d94c24ba7e39458f58bcebc2336
2023-01-23 11:45:53 +01:00
..
fiptool.c feat(fiptool): handle FIP in a disk partition 2023-01-23 11:45:53 +01:00
fiptool.h fiptool: return zero status on help and help <command> 2020-07-06 10:27:03 -05:00
fiptool_platform.h Standardise header guards across codebase 2018-11-08 10:20:19 +00:00
Makefile refactor(security): add OpenSSL 1.x compatibility 2022-11-11 13:33:42 -05:00
Makefile.msvc Update makefile to build fiptool for Windows 2020-09-14 15:06:56 +01:00
tbbr_config.c feat(fiptool): add cca, core_swd, plat cert in FIP 2022-06-14 09:47:37 -05:00
tbbr_config.h tools: add mechanism to allow platform specific image UUID 2021-03-24 09:49:31 +05:30
win_posix.c Fix fiptool packaging issue on windows 2020-09-14 15:06:56 +01:00
win_posix.h Fix fiptool packaging issue on windows 2020-09-14 15:06:56 +01:00