diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-26 14:50:03 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-02-04 08:29:17 +0100 |
commit | 3fc80b8d3df693b982cbc18595f82175caa8d3a6 (patch) | |
tree | 44c13f887805b0d7e7fddc3bbc3ab785d7436435 /scripts | |
parent | adade59759344274d24a53263194e5ed5e6c17a5 (diff) | |
download | barebox-3fc80b8d3df693b982cbc18595f82175caa8d3a6.tar.gz barebox-3fc80b8d3df693b982cbc18595f82175caa8d3a6.tar.xz |
scripts: imx: Generate signed images with imx-image
The imx-image tool can now generate signed images itself, so we can
switch to this mechanism:
- Move the CSF templates to header files which can be included by the
flash config files
- remove images/Makefile.imxhabv4 which is no longer necessary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/habv4/gencsf.sh | 47 | ||||
-rw-r--r-- | scripts/habv4/habv4-imx28.csf.in | 33 | ||||
-rw-r--r-- | scripts/habv4/habv4-imx6.csf.in | 37 |
3 files changed, 0 insertions, 117 deletions
diff --git a/scripts/habv4/gencsf.sh b/scripts/habv4/gencsf.sh deleted file mode 100755 index 2c1c34add4..0000000000 --- a/scripts/habv4/gencsf.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -set -e - -while getopts "f:c:i:o:" opt; do - case $opt in - f) - file=$OPTARG - ;; - c) - cfg=$OPTARG - ;; - i) - in=$OPTARG - ;; - o) - out=$OPTARG - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - esac -done - -if [ ! -e $file -o ! -e $cfg -o ! -e $in ]; then - echo "file not found!" - exit 1 -fi - -# -# extract and set as shell vars: -# loadaddr= -# dcdofs= -# -eval $(sed -n -e "s/^[[:space:]]*\(loadaddr\|dcdofs\)[[:space:]]*\(0x[0-9]*\)/\1=\2/p" $cfg) - -length=$(stat -c '%s' $file) - -sed -e "s:@TABLE_BIN@:$TABLE_BIN:" \ - -e "s:@CSF_CRT_PEM@:$CSF_CRT_PEM:" \ - -e "s:@IMG_CRT_PEM@:$IMG_CRT_PEM:" \ - -e "s:@LOADADDR@:$loadaddr:" \ - -e "s:@OFFSET@:0:" \ - -e "s:@LENGTH@:$length:" \ - -e "s:@FILE@:$file:" \ - $in > $out diff --git a/scripts/habv4/habv4-imx28.csf.in b/scripts/habv4/habv4-imx28.csf.in deleted file mode 100644 index 5efd25b1e5..0000000000 --- a/scripts/habv4/habv4-imx28.csf.in +++ /dev/null @@ -1,33 +0,0 @@ -[Header] -Version = 4.0 -Hash Algorithm = sha256 -Engine Configuration = 0 -Certificate Format = X509 -Signature Format = CMS -Engine = DCP - -[Install SRK] -File = "@TABLE_BIN@" -# SRK index within SRK-Table 0..3 -Source index = 0 - -[Install CSFK] -File = "@CSF_CRT_PEM@" - -[Authenticate CSF] - -[Install Key] -# verification key index in key store (0, 2...5) -Verification index = 0 -# target key index in key store (2...5) -Target index = 2 -File = "@IMG_CRT_PEM@" - -[Authenticate Data] -# verification key index in key store (2...5) -Verification index = 2 -# "starting load address in memory" -# "starting offset within the source file" -# "length (in bytes)" -# "file (binary)" -Blocks = @LOADADDR@ @OFFSET@ @LENGTH@ "@FILE@" diff --git a/scripts/habv4/habv4-imx6.csf.in b/scripts/habv4/habv4-imx6.csf.in deleted file mode 100644 index 11a5db9494..0000000000 --- a/scripts/habv4/habv4-imx6.csf.in +++ /dev/null @@ -1,37 +0,0 @@ -[Header] -Version = 4.1 -Hash Algorithm = sha256 -Engine Configuration = 0 -Certificate Format = X509 -Signature Format = CMS -Engine = CAAM - -[Install SRK] -File = "@TABLE_BIN@" -# SRK index within SRK-Table 0..3 -Source index = 0 - -[Install CSFK] -File = "@CSF_CRT_PEM@" - -[Authenticate CSF] - -[Unlock] -Engine = CAAM -Features = RNG - -[Install Key] -# verification key index in key store (0, 2...5) -Verification index = 0 -# target key index in key store (2...5) -Target index = 2 -File = "@IMG_CRT_PEM@" - -[Authenticate Data] -# verification key index in key store (2...5) -Verification index = 2 -# "starting load address in memory" -# "starting offset within the source file" -# "length (in bytes)" -# "file (binary)" -Blocks = @LOADADDR@ @OFFSET@ @LENGTH@ "@FILE@" |