[RFC PATCH 2/5] scripts: imx: Support CST version >= 2.3.2

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

 



New versions of CST (starting from 2.3.2 according to Release Notes)
require specifying '-i --input' option, instead of writing
configuration to standard input. I see few possibilities here:
1) Simply add '-i /dev/fd/0' as a fix to current implementation
   (this patch actually does that).
2) Reimplement code to save CSF content to file, instead of malloc'ed
   buffer.
3) Above methods will only support CST tool >= 2.3.2. To keep
   compatibility with older CST versions, we would need to check
   'cst -h' output to see if '-i' option is supported or not (note,
   that version returned by CST 2.3.3 is 'BLN_CST_MAIN_02.03.00').

Signed-off-by: Marcin Niestroj <m.niestroj@xxxxxxxxxxxxxxxx>
---

 scripts/imx/imx-image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index b241e8c4b..9688a8ce1 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -546,7 +546,7 @@ static int hab_sign(struct config_data *data)
 		}
 	}
 
-	ret = asprintf(&command, "%s -o %s", cst, csffile);
+	ret = asprintf(&command, "%s -i /dev/fd/0 -o %s", cst, csffile);
 	if (ret < 0)
 		return -ENOMEM;
 
-- 
2.17.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



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

  Powered by Linux