Jan Kundrát | 1de4ebd | 2017-10-20 17:14:13 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | RAUC_BUILD_DIR=${BUILD_DIR}/rauc-work-tmp |
| 4 | RAUC_IMAGE=${BINARIES_DIR}/update.raucb |
| 5 | ROOTFS_NAME=rootfs.tar.xz |
Jan Kundrát | 1cfb198 | 2017-10-30 18:05:47 +0100 | [diff] [blame] | 6 | EMPTY_TAR_NAME=cfg.tar.xz |
| 7 | RAUC_HOOK=${RAUC_BUILD_DIR}/hook.sh |
Jan Kundrát | 1de4ebd | 2017-10-20 17:14:13 +0200 | [diff] [blame] | 8 | |
| 9 | rm -rf ${RAUC_BUILD_DIR} |
| 10 | mkdir ${RAUC_BUILD_DIR} |
| 11 | rm -f ${RAUC_IMAGE} |
| 12 | |
| 13 | ln ${BINARIES_DIR}/${ROOTFS_NAME} ${RAUC_BUILD_DIR}/ |
Jan Kundrát | 1cfb198 | 2017-10-30 18:05:47 +0100 | [diff] [blame] | 14 | tar -cJf ${RAUC_BUILD_DIR}/${EMPTY_TAR_NAME} -T /dev/null |
| 15 | cp ${BR2_EXTERNAL_CZECHLIGHT_PATH}/board/czechlight/common/rauc-hook.sh ${RAUC_HOOK} |
Jan Kundrát | 1de4ebd | 2017-10-20 17:14:13 +0200 | [diff] [blame] | 16 | cat > ${RAUC_BUILD_DIR}/manifest.raucm << EOF |
| 17 | [update] |
| 18 | compatible=czechlight-clearfog |
| 19 | version=dev |
| 20 | |
Jan Kundrát | 1cfb198 | 2017-10-30 18:05:47 +0100 | [diff] [blame] | 21 | [hooks] |
| 22 | filename=hook.sh |
| 23 | |
Jan Kundrát | 1de4ebd | 2017-10-20 17:14:13 +0200 | [diff] [blame] | 24 | [image.rootfs] |
| 25 | filename=${ROOTFS_NAME} |
Jan Kundrát | 1cfb198 | 2017-10-30 18:05:47 +0100 | [diff] [blame] | 26 | |
| 27 | [image.cfg] |
| 28 | filename=${EMPTY_TAR_NAME} |
| 29 | hooks=post-install |
Jan Kundrát | 1de4ebd | 2017-10-20 17:14:13 +0200 | [diff] [blame] | 30 | EOF |
| 31 | |
| 32 | rauc \ |
| 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} |