[PATCH v2 15/29] scripts: imx: force flexspi and hab option order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Force the order to ensure that the hab options are parsed after the
flexspi options. This is important since we need to know which memory
regions need to be verified and/or en-/decrypted and with the flexspi
support a 2nd header is added in between the first header and the
barebox pbl binary.

Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
---
Changelog:
v2:
- unchanged
- v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.felsch@xxxxxxxxxxxxxx/T/#t

 scripts/imx/imx.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c
index e3169bace6a6..32488455b7a8 100644
--- a/scripts/imx/imx.c
+++ b/scripts/imx/imx.c
@@ -614,6 +614,12 @@ static int do_flexspi_ivtofs(struct config_data *data, int argc, char *argv[])
 	if (argc < 2)
 		return -EINVAL;
 
+	if (data->csf) {
+		fprintf(stderr, "#include <mach/imx/flexspi-imx8m*-cfg.h> must be placed in front "
+				"of #include <mach/imx/habv4-imx8-gencsf.h>\n");
+		return -EINVAL;
+	}
+
 	data->image_flexspi_ivt_offset = strtoul(argv[1], NULL, 0);
 
 	return 0;
@@ -624,6 +630,12 @@ static int do_flexspi_fcfbofs(struct config_data *data, int argc, char *argv[])
 	if (argc < 2)
 		return -EINVAL;
 
+	if (data->csf) {
+		fprintf(stderr, "#include <mach/imx/flexspi-imx8m*-cfg.h> must be placed in front "
+				"of #include <mach/imx/habv4-imx8-gencsf.h>\n");
+		return -EINVAL;
+	}
+
 	data->image_flexspi_fcfb_offset = strtoul(argv[1], NULL, 0);
 
 	return 0;
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux