Jan Kundrát | 1b5a428 | 2018-04-05 21:32:53 +0200 | [diff] [blame^] | 1 | CZECHLIGHT_RAUC_TMP_TARGET_DIR = $(FS_DIR)/rootfs.czechlight-rauc.tmp |
| 2 | |
| 3 | CZECHLIGHT_RAUC_IMAGE_VERSION = dev |
| 4 | |
| 5 | $(BINARIES_DIR)/update.raucb: host-rauc rootfs-tar |
| 6 | @$(call MESSAGE,"Generating RAUC update bundle") |
| 7 | $(RM) -rf $(CZECHLIGHT_RAUC_TMP_TARGET_DIR) |
| 8 | mkdir -p $(CZECHLIGHT_RAUC_TMP_TARGET_DIR) |
| 9 | sed \ |
| 10 | -e 's|CZECHLIGHT_RAUC_IMAGE_VERSION|$(call qstrip,$(CZECHLIGHT_RAUC_IMAGE_VERSION))|' \ |
| 11 | -e 's|CZECHLIGHT_RAUC_COMPATIBLE|$(call qstrip,$(CZECHLIGHT_RAUC_COMPATIBLE))|' \ |
| 12 | $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/common/rauc-manifest.raucm.in \ |
| 13 | > $(CZECHLIGHT_RAUC_TMP_TARGET_DIR)/manifest.raucm |
| 14 | |
| 15 | $(RM) -f $(BINARIES_DIR)/update.raucb |
| 16 | ln $(BINARIES_DIR)/rootfs.tar.xz $(CZECHLIGHT_RAUC_TMP_TARGET_DIR) |
| 17 | tar -cJf $(CZECHLIGHT_RAUC_TMP_TARGET_DIR)/cfg.tar.xz -T /dev/null |
| 18 | cp $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/common/rauc-hook.sh $(CZECHLIGHT_RAUC_TMP_TARGET_DIR)/hook.sh |
| 19 | |
| 20 | $(HOST_DIR)/usr/bin/rauc \ |
| 21 | --cert $(BR2_EXTERNAL_CZECHLIGHT_PATH)/crypto/rauc-cert.pem \ |
| 22 | --key $(BR2_EXTERNAL_CZECHLIGHT_PATH)/crypto/rauc-key.pem \ |
| 23 | bundle $(CZECHLIGHT_RAUC_TMP_TARGET_DIR) $(BINARIES_DIR)/update.raucb |
| 24 | |
| 25 | rootfs-czechlight-rauc: $(BINARIES_DIR)/update.raucb |
| 26 | |
| 27 | rootfs-czechlight-rauc-show-depends: |
| 28 | @echo host-rauc rootfs-tar |
| 29 | |
| 30 | .PHONY: rootfs-czechlight-rauc rootfs-czechlight-rauc-show-depends |
| 31 | |
| 32 | ifeq ($(CZECHLIGHT_RAUC_ROOTFS),y) |
| 33 | TARGETS_ROOTFS += rootfs-czechlight-rauc |
| 34 | ifeq ($(call qstrip,$(CZECHLIGHT_RAUC_COMPATIBLE)),) |
| 35 | $(error CZECHLIGHT_RAUC_COMPATIBLE cannot be empty) |
| 36 | endif |
| 37 | endif |