🐤 Sync 2026-08-22 08:58:47

This commit is contained in:
github-actions[bot] committed 2026-08-22 08:58:47 +08:00
1 parent 821651d011
commit 1f21cc80aa
1 file changed
+38 -21
+38 -21
View File
@@ -13,9 +13,15 @@
# wwand-esim - eSIM management (DEPENDS wwand-qmi + wwand-lpac) # wwand-esim - eSIM management (DEPENDS wwand-qmi + wwand-lpac)
# A typical QMI router installs `wwand-qmi` (which pulls in `wwand`); add # A typical QMI router installs `wwand-qmi` (which pulls in `wwand`); add
# `wwand-mbim` / `wwand-ncm` for those modems, `wwand-mhi` for a PCIe/MHI modem. # `wwand-mbim` / `wwand-ncm` for those modems, `wwand-mhi` for a PCIe/MHI modem.
# The ucode tree ships precompiled to bytecode by default — built by the # The ucode tree ships as SOURCE by default. It can be precompiled to bytecode
# repo-root CMakeLists.txt alongside wwand_io.so (dev opt-out: # (repo-root CMakeLists.txt, alongside wwand_io.so) via CONFIG_WWAND_UCODE_
# CONFIG_WWAND_UCODE_SOURCE). # PRECOMPILE, but that is opt-in and only sound when ucode and wwand are built
# in the SAME tree: bytecode carries a format version (UCODE_BYTECODE_VERSION,
# ucode's include/ucode/vm.h) that an interpreter upgraded past it refuses to
# load, and no package relation can express that coupling — it is independent
# of libucode's PKG_ABI_VERSION/SONAME, so an ABI-versioned dependency does not
# capture it either. In a feed, where ucode is upgraded on its own, that is a
# coupling we must not create.
# #
# NOTE: the split needs the ucode source that lazy-loads every backend # NOTE: the split needs the ucode source that lazy-loads every backend
# (qmi_lazy.uc + the backend-neutral daemon). Bump PKG_SOURCE_VERSION (and # (qmi_lazy.uc + the backend-neutral daemon). Bump PKG_SOURCE_VERSION (and
@@ -24,11 +30,11 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=wwand PKG_NAME:=wwand
PKG_RELEASE:=4 PKG_RELEASE:=5
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/ddimension/wwand.git PKG_SOURCE_URL:=https://github.com/ddimension/wwand.git
PKG_SOURCE_VERSION:=3ee6cee15515149438f26f9d9fd491d7131a9805 PKG_SOURCE_VERSION:=d83bad8714c85db500dfe429fc64428d4f7a26bc
PKG_SOURCE_DATE:=2026-08-21 PKG_SOURCE_DATE:=2026-08-21
PKG_MIRROR_HASH:=skip PKG_MIRROR_HASH:=skip
@@ -54,11 +60,12 @@ CMAKE_BINARY_SUBDIR:=build
CMAKE_OPTIONS += \ CMAKE_OPTIONS += \
-DUCODE_COMPILER=$(STAGING_DIR_HOSTPKG)/bin/ucode \ -DUCODE_COMPILER=$(STAGING_DIR_HOSTPKG)/bin/ucode \
-DUCODE_PRECOMPILE=$(if $(CONFIG_WWAND_UCODE_SOURCE),OFF,ON) -DUCODE_PRECOMPILE=$(if $(CONFIG_WWAND_UCODE_PRECOMPILE),ON,OFF)
# every install section takes the ucode tree from here: the bytecode output of # every install section takes the ucode tree from here: the bytecode output of
# the cmake build, or the plain sources when CONFIG_WWAND_UCODE_SOURCE is set. # the plain sources, or the cmake bytecode output when CONFIG_WWAND_UCODE_
WWAND_UCODE=$(if $(CONFIG_WWAND_UCODE_SOURCE),$(PKG_BUILD_DIR)/src-ucode,$(CMAKE_BINARY_DIR)/ucode/wwand) # PRECOMPILE is set.
WWAND_UCODE=$(if $(CONFIG_WWAND_UCODE_PRECOMPILE),$(CMAKE_BINARY_DIR)/ucode/wwand,$(PKG_BUILD_DIR)/src-ucode)
UCDIR:=/usr/share/ucode/wwand UCDIR:=/usr/share/ucode/wwand
@@ -77,23 +84,30 @@ WWAND_BASE_CODEC:=arfcn_bands.uc hex.uc qmux.uc tlv.uc
WWAND_BASE_SCHEMA:=ctl.uc dms.uc dsd.uc loc.uc loc_lazy.uc merge.uc nas.uc rat.uc \ WWAND_BASE_SCHEMA:=ctl.uc dms.uc dsd.uc loc.uc loc_lazy.uc merge.uc nas.uc rat.uc \
uim.uc wda.uc wds.uc wms.uc wms_lazy.uc uim.uc wda.uc wds.uc wms.uc wms_lazy.uc
# DEVELOPERS: enable CONFIG_WWAND_UCODE_SOURCE (menuconfig, under this package) # DEVELOPERS: leave CONFIG_WWAND_UCODE_PRECOMPILE off (the default)
# to ship readable .uc source instead of bytecode — for editing modules live # to ship readable .uc source instead of bytecode — for editing modules live
# under /usr/share/ucode/wwand and for source-line tracebacks; bytecode # under /usr/share/ucode/wwand and for source-line tracebacks; bytecode
# tracebacks report offsets only. # tracebacks report offsets only.
PKG_CONFIG_DEPENDS:=CONFIG_WWAND_UCODE_SOURCE PKG_CONFIG_DEPENDS:=CONFIG_WWAND_UCODE_PRECOMPILE
define Package/wwand/config define Package/wwand/config
config WWAND_UCODE_SOURCE config WWAND_UCODE_PRECOMPILE
bool "Ship ucode sources instead of precompiled bytecode" bool "Precompile the ucode tree to bytecode"
depends on PACKAGE_wwand depends on PACKAGE_wwand
default n default n
help help
wwand normally ships its ucode tree precompiled to bytecode Compile the ucode tree to bytecode instead of shipping the
(faster daemon start, no parse step on the device). Enable this readable sources. The daemon then starts without a parse step
for development builds: the readable sources are installed (measured 41 ms -> 5 ms for the core imports on x86; more on a
instead, runtime tracebacks carry source line numbers and the router CPU).
modules can be edited in place on the device.
Only enable this when ucode and wwand come from the SAME build
tree, e.g. a self-built image. Bytecode carries a format version
that an interpreter upgraded past it refuses to load, and nothing
in the package metadata can express that dependency, so a plain
package upgrade of ucode would leave the daemon unable to start.
The init script detects exactly that case and refuses with an
explanatory log line rather than respawning forever.
endef endef
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
@@ -146,10 +160,13 @@ define Package/wwand/install
$(INSTALL_DIR) $(1)/usr/libexec/wwand $(INSTALL_DIR) $(1)/usr/libexec/wwand
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/wwand-migrate $(1)/usr/libexec/wwand/migrate $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/wwand-migrate $(1)/usr/libexec/wwand/migrate
# migration is user-triggered (LuCI modem list / the migrate CLI); the # migration is user-triggered (LuCI modem list / the migrate CLI); the
# uci-defaults hook auto-migrates on install/upgrade ONLY when the global # Config migration is ALWAYS user-triggered: nothing is installed under
# `option takeover` is set (default off — wwand does not touch existing configs) # /etc/uci-defaults, so installing or upgrading wwand never rewrites an
$(INSTALL_DIR) $(1)/etc/uci-defaults # existing configuration. The example below is shipped inert; copying it
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/wwand.defaults $(1)/etc/uci-defaults/99-wwand-migrate # into /etc/uci-defaults/ runs the same migration once, at the next boot.
$(INSTALL_DIR) $(1)/usr/share/wwand/examples
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/examples/99-wwand-migrate \
$(1)/usr/share/wwand/examples/99-wwand-migrate
$(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/wwand.init $(1)/etc/init.d/wwand $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/wwand.init $(1)/etc/init.d/wwand
# no /etc/config/wwand for new installs — all config lives in # no /etc/config/wwand for new installs — all config lives in