This commit is contained in:
Pascal Vizeli
2018-08-24 21:50:29 +00:00
parent 9b170812d6
commit 74ff13e25e
12 changed files with 148 additions and 111 deletions

View File

@@ -10,6 +10,11 @@ function create_ota_update() {
local key="/build/key.pem"
local cert="/build/cert.pem"
# Skeep if no dev key is arround
if [ ! -f "${key}" ]; then
return 0
fi
rm -rf ${rauc_folder} ${ota_file}
mkdir -p ${rauc_folder}
@@ -44,9 +49,5 @@ function create_ota_update() {
) >> ${rauc_folder}/manifest.raucm
fi
if [ ! -f "${key}" ]; then
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ${key} -out ${cert} -outform PEM -batch
fi
rauc bundle -d --cert=${cert} --key=${key} ${rauc_folder} ${ota_file}
}