Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions utils/k3screenctrl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=k3screenctrl
PKG_VERSION:=1.0
PKG_RELEASE:=1

PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/kazutoiris/k3screenctrl/archive/refs/tags/v$(PKG_VERSION).tar.gz?

@BKPepe BKPepe Aug 15, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use https://github.com/lwz322/k3screenctrl ? Your repository is only 2 commits ahead of that repository and there is no pull request to the upstream repository.

Also ping @zxlhhyccc who created https://github.com/zxlhhyccc/Hill-98-k3screenctrl

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since most of the authors/modifiers are no longer reachable, I currently use the Phicomm K3 and will continue to maintain it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 days ago. Hmm, still I would like to see pull request there.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the most recent commit for lwz322/k3screenctrl was made 3 years ago, and zxlhhyccc/Hill-98-k3screenctrl was made 7 years ago, many maintainers have abandoned the Phicomm K3. Of course, if you are willing to wait, I don't mind.

PKG_HASH:=cc9927f324ce7e221a2ac3351ec78156719195662cc5bafd5424d340c170cd39
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already default, so it can be dropped.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that only PKG_BUILD_DIR matches the default value.

https://github.com/openwrt/archive/blob/af7e7ab684d5dd89a3072ad7b29a81a2669ef54f/include/package.mk#L14

While PKG_SOURCE, PKG_SOURCE_URL, and PKG_HASH all differ from it.

https://github.com/openwrt/openwrt/blob/5384f53a604be35d1f745e17cfd4d62f564cefe7/include/download.mk#L11-L17

Am I misunderstanding something?

PKG_MAINTAINER:=Kazuto Iris <hitomi@apache.org>, Hamster Tian <haotia@gmail.com>
PKG_BUILD_DEPENDS:=automake
PKG_FIXUP:=autoreconf
Comment thread
kazutoiris marked this conversation as resolved.

include $(INCLUDE_DIR)/package.mk

TARGET_CFLAGS+= -D_GNU_SOURCE

define Package/k3screenctrl
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+coreutils-od +bash +curl @TARGET_bcm53xx_generic_DEVICE_phicomm_k3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-anchoring this one because the squash marked the earlier thread outdated and collapsed it — the code is unchanged and the question is still open, so I don't want it to disappear from the page.

Short version: TARGET_bcm53xx_generic_DEVICE_phicomm_k3 is emitted only by the single-device profile choice (config TARGET_$conf_$id at target-metadata.pl:255). Multi-profile builds — the buildbot/SDK default — emit menuconfig TARGET_DEVICE_$conf_$id at line 314 instead. If that reading holds, the symbol is n in feed builds and no prebuilt .ipk is ever produced, which is the opposite of the motivation in the PR body ("all users have to search and compile it on their own").

I can't test a buildbot config from here, so this is a maintainer call rather than an assertion. If the gate is only meant to keep the package out of menuconfig on other targets, @TARGET_bcm53xx would do that and still get a binary into the feed.


Generated by Claude Code

TITLE:=LCD screen controller on PHICOMM K3
URL:=https://github.com/kazutoiris/k3screenctrl.git
endef

define Package/k3screenctrl/description
K3 Screen Controller (k3screenctrl) is a program utilizing the LCD screen on PHICOMM K3 to display some stats.
endef

define Package/k3screenctrl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/lib/k3screenctrl
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/lib/k3screenctrl/oui
$(INSTALL_DIR) $(1)/etc/config

$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/k3screenctrl $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/wan.sh $(1)/lib/k3screenctrl/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/wifi.sh $(1)/lib/k3screenctrl/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/port.sh $(1)/lib/k3screenctrl/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/basic.sh $(1)/lib/k3screenctrl/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/host.sh $(1)/lib/k3screenctrl/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/k3screenctrl/weather.sh $(1)/lib/k3screenctrl/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/k3screenctrl/oui/oui.txt $(1)/lib/k3screenctrl/oui/
Comment thread
kazutoiris marked this conversation as resolved.

$(INSTALL_BIN) ./files/k3screenctrl.init $(1)/etc/init.d/k3screenctrl
$(INSTALL_CONF) ./files/k3screenctrl.config $(1)/etc/config/k3screenctrl
endef

define Package/k3screenctrl/conffiles
/etc/config/k3screenctrl
endef

$(eval $(call BuildPackage,k3screenctrl))
4 changes: 4 additions & 0 deletions utils/k3screenctrl/files/k3screenctrl.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config general
option screen_time '30'
option refresh_time '2'
option psk_hide '0'
28 changes: 28 additions & 0 deletions utils/k3screenctrl/files/k3screenctrl.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh /etc/rc.common

START=99
STOP=99

USE_PROCD=1
PROG=/usr/bin/k3screenctrl

start_service() {
local m d
m=$(uci -q get k3screenctrl.@general[0].screen_time)
d=$(uci -q get k3screenctrl.@general[0].refresh_time)
case "$m" in ''|*[!0-9]*) m=10 ;; esac
case "$d" in ''|*[!0-9]*) d=2 ;; esac
[ "$m" -lt 10 ] && m=10
[ "$d" -lt 1 ] && d=1

procd_open_instance
procd_set_param command "$PROG" -m "$m" -d "$d"
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}

service_triggers() {
procd_add_config_trigger "config.change" "k3screenctrl" /etc/init.d/k3screenctrl reload
}