Commit 55b2645
scripts: delete module_size accumulator before each west build
llext_offset_calc.py uses module_size as a persistent counter across
cmake custom-command invocations. Running ninja more than once without
a pristine build causes the counter to accumulate, placing all pre-linked
LLEXT ELF VMAs outside the valid region [CONFIG_LIBRARY_BASE_ADDRESS,
+CONFIG_LIBRARY_REGION_SIZE).
When pre_located=true the LLEXT loader uses the ELF sh_addr VMAs
directly as physical load addresses. sys_mm_drv_map_region() silently
fails for out-of-range addresses, so the module is never registered.
The kernel then receives IPC4_MOD_NOT_INITIALIZED (error 104) for every
module init IPC.
Delete module_size before every west build invocation so VMA assignment
always starts from CONFIG_LIBRARY_BASE_ADDRESS. llext_offset_calc.py
already handles a missing file as size=0 (OSError except clause), so
deletion is the simplest reset.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>1 parent 9638823 commit 55b2645
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
989 | 1005 | | |
990 | 1006 | | |
991 | 1007 | | |
| |||
0 commit comments