Skip to content

t31_lite_zte-k545: ship the excludes list the device was missing - #154

Closed
openipc-ai wants to merge 1 commit into
masterfrom
k545-excludes
Closed

t31_lite_zte-k545: ship the excludes list the device was missing#154
openipc-ai wants to merge 1 commit into
masterfrom
k545-excludes

Conversation

@openipc-ai

Copy link
Copy Markdown
Contributor

#151 added the K545 without general/scripts/excludes/t31_lite.list, one of the files README lists as required for a registered device. I merged it anyway and offered to follow up, which was the wrong call — this is that fix.

Nothing failed for the want of it: the image builds and the author has the camera running. But it builds close to the edge. From #151's own CI run:

- uImage:          [1786KB/2048KB]
- rootfs.squashfs: [4560KB/5120KB]
  headroom: kernel=261KB rootfs=560KB

Every sensor the T31 osdrv ships is in that rootfs, and the board has exactly one (SC4336).

The list is t31_lite_chinatelecom-y4h-50's, which is the conservative of the two in the tree: it prunes other sensors' .bin, .yaml and .ko and stops there. The tp-link-tapo-tc70-v3 variant additionally globs kernel/drivers/net/wireless/*, and this board's Wi-Fi is the out-of-tree atbm60xx module, so that one is not worth the risk here for the few KB it would add.

Checked rather than assumed: the osdrv ships sc4336-t31.bin and sc4336.yaml, and neither appears in the list, so the K545's own sensor survives the prune. ci-matrix.py --stdin narrows this to the one device, so the build in this PR is the measurement — the size report will say how much headroom it bought.

The sibling t31_lite_zte-k540 has the same gap and the same sensor. Left alone here for its author to decide.

On the other thing I raised at merge time, the 8M BR2_OPENIPC_FLASH_SIZE against a NOR_16M README row: that one is not a defect, and I should not have asked. #151's description already says it — "The board has 16 MiB NOR, while the profile intentionally keeps the same 8 MiB OpenIPC image/partition footprint used by K540."

#151 added the K545 without general/scripts/excludes/t31_lite.list, which
README lists among the files a registered device must have. Nothing failed
for the want of it -- the image builds and the author has it running -- but
it builds close to the edge: rootfs.squashfs came out at 4560KB of the
5120KB an 8M layout allows, 560KB of headroom, while the uncompressed tree
is 14.2MB. Every sensor the T31 osdrv ships is in there, and the board has
exactly one.

The list is t31_lite_chinatelecom-y4h-50's, which is the conservative of the
two in the tree: it prunes other sensors' .bin, .yaml and .ko and stops
there. The tc70-v3 variant also globs
kernel/drivers/net/wireless/*, and this board's Wi-Fi is the out-of-tree
atbm60xx module, so that one is not worth the risk here for the few KB it
would add.

Verified against the osdrv rather than by pattern: it ships sc4336-t31.bin
and sc4336.yaml, and neither appears in the list, so the K545's own sensor
survives the prune. The devices this list came from run the same SoC and
flavour, so the paths are the ones this image actually has.

The sibling t31_lite_zte-k540 has the same gap and the same sensor; it is
left alone here for its author to decide.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add missing K545 sensor exclusion manifest

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Adds the required K545 T31 Lite exclusion manifest.
• Removes unused sensor firmware, metadata, and modules to increase rootfs headroom.
• Preserves SC4336 assets and avoids risky wireless-driver exclusions.
Diagram

graph TD
  A["T31 sensor bundle"] --> B["K545 excludes"] --> C{"Path listed?"}
  C -->|Yes| D["Prune asset"] --> F["Smaller rootfs"]
  C -->|No| E["Keep asset"] --> F
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Share a flavor-level exclusion manifest
  • ➕ Avoids duplicating identical exclusion lists across T31 Lite devices.
  • ➕ Centralizes future sensor-list maintenance.
  • ➖ Conflicts with the repository's per-device manifest convention.
  • ➖ A shared change could unintentionally affect devices with different sensors.
2. Use the broader TC70 exclusions
  • ➕ Removes additional kernel modules for greater rootfs headroom.
  • ➖ Could remove wireless drivers needed by the K545's out-of-tree atbm60xx Wi-Fi stack.
  • ➖ Adds avoidable device functionality risk for limited additional savings.

Recommendation: Use the proposed conservative, per-device manifest. It follows existing registration conventions, safely removes known-unused sensor assets, preserves SC4336 support, and avoids speculative wireless-driver pruning.

Files changed (1) +67 / -0

Other (1) +67 / -0
t31_lite.listAdd conservative K545 rootfs exclusion manifest +67/-0

Add conservative K545 rootfs exclusion manifest

• Adds the required T31 Lite exclusion list for the ZTE K545. It prunes unused sensor binaries, YAML metadata, and kernel modules while retaining the device's SC4336 assets and all wireless-driver paths.

devices/t31_lite_zte-k545/general/scripts/excludes/t31_lite.list

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai

Copy link
Copy Markdown
Contributor Author

Closing this: the build went green and then told me the change does nothing.

excludes: 65 of 65 entries in t31_lite.list matched no file
- rootfs.squashfs: [4564KB/5120KB]   (4560KB before this PR)

The premise was wrong. ingenic-osdrv-t31.mk branches on OPENIPC_SNS_MODEL:

ifeq ($(OPENIPC_SNS_MODEL),)
    ... installs every *.yaml and every params/*-t31.bin
else
    ... installs $(OPENIPC_SNS_MODEL).yaml and $(OPENIPC_SNS_MODEL)-$(OPENIPC_SOC_MODEL).bin
endif

The K545 sets BR2_OPENIPC_SNS_MODEL="sc4336", so its image never contained the other sensors' files in the first place — there was nothing for the list to prune, and the 4KB difference is squashfs noise.

That also explains the three t31_lite devices that do ship this list: tp-link-tapo-tc70-v3, chinatelecom-y4h-50 and aoni-ep01j05 all leave BR2_OPENIPC_SNS_MODEL empty, so for them the osdrv installs all 18 sensors and the list earns its place. Pinning the sensor model and shipping an excludes list are two routes to the same end, and the K545 already takes the first one.

So the rootfs sits at 4564KB/5120KB because of majestic, the webui and the kernel modules, not because of stray sensor assets, and this file would only have added a permanent "65 of 65 entries matched no file" line to every build of this device.

Worth noting for the next reader: the automated review on #151 flagged the missing list as a rule violation, and README does list it among a device's required files. For a device that pins BR2_OPENIPC_SNS_MODEL, that is not true — which is a docs bug rather than a device bug.

@openipc-ai openipc-ai closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant