diff --git a/hardware/omnia/omnia-support/Makefile b/hardware/omnia/omnia-support/Makefile index 32a0e11b185591a7fd4388d5fa994e8e0ea02d4a..726f10ae27247c70b715d4e90752204987ffda97 100644 --- a/hardware/omnia/omnia-support/Makefile +++ b/hardware/omnia/omnia-support/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=omnia-support -PKG_VERSION:=3.3 +PKG_VERSION:=3.4 PKG_RELEASE:=1 PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz> @@ -12,17 +12,37 @@ PKG_BUILD_DEPENDS:=linux include $(INCLUDE_DIR)/package.mk +define Package/omnia-generic-support + TITLE:=Turris Omnia essential generic support + VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC) + RELEASE:=$(PKG_VERSION)-$(PKG_RELEASE) + DEPENDS:=@TARGET_mvebu_cortexa9_DEVICE_cznic_turris-omnia +endef + +define Package/omnia-generic-support/description + Contains generic supporting files for Turris Omnia. +endef + define Package/omnia-support TITLE:=Turris Omnia essential support - VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC) - DEPENDS:=@TARGET_mvebu_cortexa9_DEVICE_cznic_turris-omnia \ - +mtd + DEPENDS:=+omnia-generic-support @TARGET_mvebu_cortexa9_DEVICE_cznic_turris-omnia endef define Package/omnia-support/description Contains supporting files for Turris Omnia. endef +define Package/omnia-cti-support + TITLE:=Turris Omnia CTI support + DEPENDS:=omnia-generic-support @TARGET_mvebu_cortexa9_DEVICE_cznic_turris-omnia + PROVIDES:=omnia-support + CONFLICTS:=omnia-support +endef + +define Package/omnia-cti-support/description + Contains supporting files for Turris Omnia that is part of CTI project. +endef + define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef @@ -30,18 +50,29 @@ endef Build/Configure:= define Build/Compile + sed -e 's|@CONTRACT@|cti|' files/contract-boot.txt | cat - files/boot.txt > "$(PKG_BUILD_DIR)"/boot-cti.txt + mkimage -T script -C none -n boot -d "$(PKG_BUILD_DIR)"/boot-cti.txt "$(PKG_BUILD_DIR)"/boot-cti.scr + mkimage -T script -C none -n boot -d files/boot.txt "$(PKG_BUILD_DIR)"/boot.scr $(KERNEL_MAKE) zImage dtbs endef -define Package/omnia-support/install +define Package/omnia-generic-support/install $(INSTALL_DIR) $(1)/boot $(INSTALL_DATA) $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts/armada-385-turris-omnia-*.dtb "$(1)"/boot - mkimage -T script -C none -n boot -d files/boot.txt "$(1)"/boot/boot.scr ln -s boot/boot.scr "$(1)"/boot.scr - $(INSTALL_DIR) $(1)/usr/sbin endef -define Package/omnia-support/postinst +define Package/omnia-support/install + $(INSTALL_DIR) $(1)/boot + $(INSTALL_DATA) "$(PKG_BUILD_DIR)"/boot.scr "$(1)"/boot/boot.scr +endef + +define Package/omnia-cti-support/install + $(INSTALL_DIR) $(1)/boot + $(INSTALL_DATA) "$(PKG_BUILD_DIR)"/boot-cti.scr "$(1)"/boot/boot.scr +endef + +define Package/omnia-generic-support/postinst #!/bin/sh # Link default Omnia dtb unless there is existing link DTB="$$IPKG_INSTROOT/boot/dtb" @@ -49,3 +80,5 @@ DTB="$$IPKG_INSTROOT/boot/dtb" endef $(eval $(call BuildPackage,omnia-support)) +$(eval $(call BuildPackage,omnia-cti-support)) +$(eval $(call BuildPackage,omnia-generic-support))