blob: 12241fb1b411e4d7ee7a1bf3ef15000cf564d69b [file] [log] [blame]
Jan Kundrát1de4ebd2017-10-20 17:14:13 +02001#!/bin/sh
2
3RAUC_BUILD_DIR=${BUILD_DIR}/rauc-work-tmp
4RAUC_IMAGE=${BINARIES_DIR}/update.raucb
5ROOTFS_NAME=rootfs.tar.xz
Jan Kundrát1cfb1982017-10-30 18:05:47 +01006EMPTY_TAR_NAME=cfg.tar.xz
7RAUC_HOOK=${RAUC_BUILD_DIR}/hook.sh
Jan Kundrát1de4ebd2017-10-20 17:14:13 +02008
9rm -rf ${RAUC_BUILD_DIR}
10mkdir ${RAUC_BUILD_DIR}
11rm -f ${RAUC_IMAGE}
12
13ln ${BINARIES_DIR}/${ROOTFS_NAME} ${RAUC_BUILD_DIR}/
Jan Kundrát1cfb1982017-10-30 18:05:47 +010014tar -cJf ${RAUC_BUILD_DIR}/${EMPTY_TAR_NAME} -T /dev/null
15cp ${BR2_EXTERNAL_CZECHLIGHT_PATH}/board/czechlight/common/rauc-hook.sh ${RAUC_HOOK}
Jan Kundrát1de4ebd2017-10-20 17:14:13 +020016cat > ${RAUC_BUILD_DIR}/manifest.raucm << EOF
17[update]
18compatible=czechlight-clearfog
19version=dev
20
Jan Kundrát1cfb1982017-10-30 18:05:47 +010021[hooks]
22filename=hook.sh
23
Jan Kundrát1de4ebd2017-10-20 17:14:13 +020024[image.rootfs]
25filename=${ROOTFS_NAME}
Jan Kundrát1cfb1982017-10-30 18:05:47 +010026
27[image.cfg]
28filename=${EMPTY_TAR_NAME}
29hooks=post-install
Jan Kundrát1de4ebd2017-10-20 17:14:13 +020030EOF
31
32rauc \
33 --cert ${BR2_EXTERNAL_CZECHLIGHT_PATH}/crypto/rauc-cert.pem \
34 --key ${BR2_EXTERNAL_CZECHLIGHT_PATH}/crypto/rauc-key.pem \
35 bundle ${RAUC_BUILD_DIR} ${RAUC_IMAGE}