From a8c7339807e15a5dd8e29add39a97e017297e858 Mon Sep 17 00:00:00 2001 From: Bjørn Mork Date: Sun, 12 May 2019 00:56:02 +0200 Subject: WiP: working exam MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bjørn Mork --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 7dcd9d5..a88f8f5 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ FILES=version opt.local PRIKEY=PriKey.pem SIGNKEY=signkey.pem +MODEL=DCS-8000LH +BUILD=9999 all: fw.tar @@ -38,6 +40,18 @@ update.sha1: update.aes update.aes: aes.key opt.squashfs openssl aes-128-cbc -md md5 -kfile aes.key -nosalt -e -out $@ -in opt.squashfs +update.bin: update.aes + $(eval MD5SUM := $(shell openssl aes-128-cbc -md md5 -kfile aes.key -nosalt -d -in update.aes | md5sum - | cut -d' ' -f1 | md5sum - | cut -d' ' -f1)) + sed -i -e "s/^MD5SUM=.*/MD5SUM=\"$(MD5SUM)\"/" -e "s/^VERSION=\"1.0.0-.*/VERSION=\"1.0.0-$(BUILD)\"/" update.bin + +certificate.info: + echo "Publisher:DMdssdFW1" >$@ + echo "Supported Models:$(MODEL),$(MODEL)" >>$@ + echo "Firmware Version:1.0.0" >>$@ + echo "Target:update.bin" >>$@ + echo "Build No:$(BUILD)" >>$@ + echo "Contents:update" >>$@ + update.bin.aes: aes.key update.bin openssl aes-128-cbc -md md5 -kfile aes.key -nosalt -e -out $@ -in update.bin -- cgit v1.2.3