MCPcopy Create free account
hub / github.com/OpenIPC/firmware / kernel_caps

Function kernel_caps

general/scripts/size_report.py:152–163  ·  view source on GitHub ↗

Mirror the size limits the Makefile's CHECK_SIZE enforces.

(flash_mb: str, vendor: str, has_ubi: bool)

Source from the content-addressed store, hash-verified

150
151
152def kernel_caps(flash_mb: str, vendor: str, has_ubi: bool) -> dict[str, int]:
153 """Mirror the size limits the Makefile's CHECK_SIZE enforces."""
154 vendor = vendor.strip('"')
155 if has_ubi:
156 if vendor in ("rockchip", "sigmastar"):
157 return {"kernel_kb": 0, "rootfs_kb": 16384}
158 return {"kernel_kb": 4096, "rootfs_kb": 16384}
159 if vendor == "rockchip":
160 return {"kernel_kb": 4096, "rootfs_kb": 8192}
161 if flash_mb.strip('"') == "8":
162 return {"kernel_kb": 2048, "rootfs_kb": 5120}
163 return {"kernel_kb": 2048, "rootfs_kb": 8192}
164
165
166def parse_autoload(overlay_dir: Path) -> set[str]:

Callers 1

build_reportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected