blob: 67f5995bb0ef8a70222521f50d51ffc58b5dbcde [file] [log] [blame]
developere5e687d2023-08-08 16:05:33 +08001# SPDX-License-Identifier: GPL-2.0-or-later
2#
3# Copyright (C) 2023 Mediatek Inc. All Rights Reserved.
4# Author: Alvin Kuo <alvin.kuo@mediatek.com>
5#
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=tops-tool
10PKG_RELEASE:=1
11
12include $(INCLUDE_DIR)/package.mk
13include $(INCLUDE_DIR)/package-defaults.mk
14
15define Package/tops-tool
16 TITLE:=Mediatek Tunnel Offload Processor System User Tool
17 SECTION:=MTK Properties
18 CATEGORY:=MTK Properties
19 DEFAULT:=y
20 SUBMENU:=Applications
21 DEPENDS:=kmod-tops
22endef
23
24define Package/tops-tool/description
developer8762a192023-09-04 09:16:22 +080025 This package is support for MediaTek tunnel offload processor system user tool.
26 The tool will monitor TOPS status, such as TOPS core utilization rate and core
27 debug dump info. Some features are not monitored by default unless user trigger
28 it to start. The tool will support logging functionality in the future.
developere5e687d2023-08-08 16:05:33 +080029endef
30
31TARGET_CFLAGS += \
32 -I$(PKG_BUILD_DIR)/inc
33
34define Build/Compile
35 $(MAKE) -C $(PKG_BUILD_DIR) \
36 CC="$(TARGET_CC)" \
37 CFLAGS="$(TARGET_CFLAGS) -Wall -Wextra" \
38 LDFLAGS="$(TARGET_LDFLAGS)"
39endef
40
41define Package/tops-tool/install
42 $(INSTALL_DIR) $(1)/usr/sbin
43 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tops-tool $(1)/usr/sbin/
developer8762a192023-09-04 09:16:22 +080044endef
45
46define Package/tops-tool-autoload
47 TITLE:=Mediatek Tunnel Offload Processor System User Tool Auto Load
48 CATEGORY:=MTK Properties
49 SUBMENU:=Applications
50 DEPENDS:=tops-tool
51 DEFAULT:=y if PACKAGE_kmod-tops-release-autoload || PACKAGE_kmod-tops-dev-autoload
52endef
53
54define Package/tops-tool-autoload/description
55 This package is support for MediaTek tunnel offload processor system user tool
56 autoload. The tool will automatically start monitor TOPS status when system
57 boot up.
58endef
developere5e687d2023-08-08 16:05:33 +080059
developer8762a192023-09-04 09:16:22 +080060define Package/tops-tool-autoload/install
developere5e687d2023-08-08 16:05:33 +080061 $(INSTALL_DIR) $(1)/etc/init.d
62 $(INSTALL_BIN) ./files/tops-tool.init $(1)/etc/init.d/tops-tool
63endef
64
65$(eval $(call BuildPackage,tops-tool))
developer8762a192023-09-04 09:16:22 +080066$(eval $(call BuildPackage,tops-tool-autoload))