Verified Commit bb61ba84 authored by Michal Hrusecky's avatar Michal Hrusecky 🐉 Committed by Karel Koci
Browse files

omnia-support: Split up to multiple subpackages

Split into a generic subpackage, package used by normal Omnias and
package used by CTI Omnias that sets the contract automatically.
parent d70df782
......@@ -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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment