You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
load_hisilicon on hi3516cv300 references a cma_osal.ko that the firmware never builds or ships. When the kernel cmdline contains mmz=… (which the qemu-hisilicon machine emulator and most production U-Boots do), insert_osal takes the CMA branch:
insmod: can't insert 'cma_osal.ko': No such file or directory
******* Error: There's something wrong, please check! *****
load_hisilicon then report_error → exit 1 and zero modules load.
The cv300 rootfs ships hi_osal.ko only (verified in /lib/modules/4.9.37/hisilicon/ of openipc.hi3516cv300-nor-lite.tgz); there is no cma_osal.ko anywhere in the build.
This bug pre-dates #2059 — it was hidden on cv300 because load_hisilicon used to bail at the os_mem= guard before ever reaching insert_osal. Post-#2060, the guard is correct and the cma_osal call now runs.
Use hi_osal.ko in both branches, passing the right args. The cv300 OSAL module already has mmz_allocator= parameter support; passing mmz_allocator=cma mmz=$MMZ to hi_osal.ko should drive the same code path the (hypothetical) cma_osal.ko would. Tracking issue mmz: fail allocator init when every configured zone is rejected openhisilicon#73 made the V3 cma allocator init fail fast on register error, so this path is exercised correctly upstream.
Build and ship cma_osal.ko as a separate module from openhisilicon for V3 / cv300, and add it to hisilicon-osdrv-hi3516cv300's install list.
Option 1 is the smaller change and keeps cv300's rootfs footprint identical.
Summary
load_hisiliconon hi3516cv300 references acma_osal.kothat the firmware never builds or ships. When the kernel cmdline containsmmz=…(which the qemu-hisilicon machine emulator and most production U-Boots do),insert_osaltakes the CMA branch:load_hisiliconthenreport_error → exit 1and zero modules load.The cv300 rootfs ships
hi_osal.koonly (verified in/lib/modules/4.9.37/hisilicon/ofopenipc.hi3516cv300-nor-lite.tgz); there is nocma_osal.koanywhere in the build.This bug pre-dates #2059 — it was hidden on cv300 because
load_hisiliconused to bail at theos_mem=guard before ever reachinginsert_osal. Post-#2060, the guard is correct and the cma_osal call now runs.Where
general/package/hisilicon-osdrv-hi3516cv300/files/script/load_hisilicon, lines 58 / 60:Suggested fix
Two options, pick one:
Use
hi_osal.koin both branches, passing the right args. The cv300 OSAL module already hasmmz_allocator=parameter support; passingmmz_allocator=cma mmz=$MMZtohi_osal.koshould drive the same code path the (hypothetical)cma_osal.kowould. Tracking issue mmz: fail allocator init when every configured zone is rejected openhisilicon#73 made the V3 cma allocator init fail fast on register error, so this path is exercised correctly upstream.Build and ship
cma_osal.koas a separate module from openhisilicon for V3 / cv300, and add it tohisilicon-osdrv-hi3516cv300's install list.Option 1 is the smaller change and keeps cv300's rootfs footprint identical.
CI hardcoding to undo once fixed
OpenIPC/openhisilicon/.github/workflows/build.ymlqemu-boot matrix has:After this issue is fixed and a new
latestfirmware release is published:allow-failure: trueline from the cv300 matrix entry.min_modules: Nto gate the lsmod count assertion.Refs
insmod cma_osal.ko, also ships onlyhi_osal.ko).