blob: 9f28965e526c5880893323b1b3b371b551be0c5e [file] [log] [blame]
Jan Kundráte8b18112018-04-04 23:11:23 +02001CZECHLIGHT_CFG_FS_INSTALL_IMAGES = YES
2CZECHLIGHT_CFG_FS_DEPENDENCIES = host-e2fsprogs
3
4CZECHLIGHT_CFG_FS_LOCATION = $(BINARIES_DIR)/cfg.ext4
5
6define CZECHLIGHT_CFG_FS_INSTALL_IMAGES_CMDS
7 rm -f $(CZECHLIGHT_CFG_FS_LOCATION)
8 $(HOST_DIR)/sbin/mkfs.ext4 -L cfg $(CZECHLIGHT_CFG_FS_LOCATION) $(call qstrip,$(CZECHLIGHT_CFG_FS_SIZE))
9endef
10
Jan Kundrát62dbb4a2018-04-05 20:42:09 +020011ifeq ($(BR2_PACKAGE_CZECHLIGHT_CFG_FS)-$(call qstrip,$(CZECHLIGHT_CFG_FS_SIZE)),y-)
12$(error CZECHLIGHT_CFG_FS_SIZE cannot be empty)
13endif
14
Jan Kundrát960274e2018-04-09 11:20:56 +020015define CZECHLIGHT_CFG_FS_INSTALL_TARGET_CMDS
16 $(INSTALL) -D -m 0644 \
17 $(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/etc-overlay.service \
18 $(TARGET_DIR)/usr/lib/systemd/system/etc-overlay.service
19 ln -sf ../etc-overlay.service $(TARGET_DIR)/usr/lib/systemd/system/local-fs.target.wants/
20 $(INSTALL) -D -m 0755 \
21 $(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/czechlight-cfg-mount-generator \
22 $(TARGET_DIR)/usr/lib/systemd/system-generators/czechlight-cfg-mount-generator
23 $(INSTALL) -D -m 0644 \
24 $(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/cfg-restore-etc.service \
25 $(TARGET_DIR)/usr/lib/systemd/system/cfg-restore-etc.service
26 ln -sf ../cfg-restore-etc.service $(TARGET_DIR)/usr/lib/systemd/system/local-fs.target.wants/
Jan Kundrátff8479a2018-04-09 12:01:19 +020027 $(ifeq ($(CZECHLIGHT_CFG_FS_PERSIST_SYSREPO),y))
28 $(INSTALL) -D -m 0644 \
29 $(BR2_EXTERNAL_CZECHLIGHT_PATH)/package/czechlight-cfg-fs/sysrepo-persistent-cfg.service \
30 $(TARGET_DIR)/usr/lib/systemd/system/
31 ln -sf ../sysrepo-persistent-cfg.service $(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants/
32 $(endif)
Jan Kundrát960274e2018-04-09 11:20:56 +020033endef
34
Jan Kundráte8b18112018-04-04 23:11:23 +020035$(eval $(generic-package))