gk7205v200: ship V4 modules from openhisilicon + fix load_goke -r#2085
Merged
Conversation
ev300 cameras run the full open_* module set (lsmod tainted G); gk7205v300 still loads 21 vendor gk7205v200_*.ko blobs out of goke-osdrv (lsmod tainted P). The two SoCs are pin-compatible (CLAUDE.md: "Same source compiles for both via different CHIPARCH values") and Goke firmware has been running the same SDK source for years. Fix in two places: 1. Bump openhisilicon pin to consume openhisilicon#92, which opens the kernel/Kbuild gate so the V4 heavy module set (acodec, adec, aenc, ai, aio, ao, base, chnl, h264e, h265e, ive, jpege, rc, rgn, sys, vedu, venc, vgs, vi, vpss) builds for gk7205v200 too. (Pin set to the unmerged-branch HEAD 3647333 for hardware verification; will rebump to canonical main hash post-merge.) 2. Add a gk7205v200 INSTALL_TARGET_CMDS branch in hisilicon-opensdk.mk that installs the resulting open_*.ko under /lib/modules/<kver>/goke/ with the gk7205v200_<mod>.ko filenames load_goke already insmods. Peripherals (open_osal, open_isp, open_mipi_rx, open_sys_config, etc.) keep open_ names in /lib/modules/<kver>/extra/ — load_goke's `modprobe open_<mod>` calls already find them there. 3. Drop the vendor blob INSTALL lines from goke-osdrv-gk7205v200.mk so the source-built versions take over cleanly. The dir creation stays so the package is self-sufficient if opensdk is disabled. Verified on real hardware (openipc-gk7205v300.dlab.doty.ru): TBD post-build-one + sysupgrade.
Build-one for gk7205v300_lite failed with "size exceeded by: 916KB" because the kernel-module default install drops every open_*.ko the SDK builds into /lib/modules/<kver>/extra/, AND our new INSTALL_TARGET_CMDS branch copies the heavy ones renamed into /lib/modules/<kver>/goke/gk7205v200_*.ko. Two copies of every heavy module → ~900KB over the NOR rootfs limit. Add a goke-specific FINALIZE hook that mirrors the existing hisilicon-side cleanup: for the heavy module set (acodec ... vpss, the same 20 modules our INSTALL renames), remove the source-named extra/open_*.ko copies after install. Peripherals (osal, isp, mipi_rx, sys_config, sensor_*, pwm, wdt, piris, hwrng, adc) stay in extra/ — load_goke uses `modprobe open_<mod>` to find them there.
This reverts commit f1a8f34.
Pulls in openhisilicon's V4 module blobs swapped for goke nolog versions, saving ~816KB on disk so gk7205v300_lite fits the 5120KB rootfs partition.
Bump HISILICON_OPENSDK_VERSION from 4a2781b to 370c321 (OpenIPC/openhisilicon#93, squash-merged today): adds the chiparch-aware platform_driver compat string dispatch (so `goke,sys` etc. bind on gk7205v300 device trees instead of the hardcoded `hisilicon,hisi-X` that pre-dated the fix and crashed AENC_Init), and introduces the 3-variant V4 vendor blob layout — HiSi V1.0.1.2 for ev200/ev300, Goke SPC030 ko_log/ko_nolog for gk7205v200/v300, selected automatically per chiparch via KO_LOG. The gk7205v300 lite firmware ends up with the Goke ko_nolog flavour, which fits the 5 MB rootfs cap. Fix `load_goke -r` to rmmod by the actual in-kernel module name instead of the on-disk filename. openhisilicon's wrapper modules register internally as `open_<mod>` (set by `PREFIX = open_` in `kernel/Kbuild`), regardless of the fact that hisilicon-opensdk's install pass renames the .ko file to `gk7205v200_<mod>.ko` so vendor-style insmod-by-filename keeps working. insmod uses the filename and works. rmmod takes the kernel's module name and silently no-ops with "No such file or directory" if you pass `gk7205v200_<mod>` against an openhisilicon-built kernel — every `rmmod` in remove_ko / remove_audio / remove_detect was a no-op against the post-#2042+#93 install layout. Net effect: gk7205v300 boards now boot the open_* set with a clean GPL taint flag and `load_goke -r` actually unloads them in reverse order. ev300 path unchanged byte-for-byte (HiSi V1.0.1.2 blobs were the only HiSi side flavour ever released and openhisilicon now keeps them under `kernel/<mod>/hi3516ev200/`).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bump
HISILICON_OPENSDK_VERSIONfrom4a2781bto370c321to pull in Build all V4 kernel modules from source for gk7205v300 too openhisilicon#93. That PR completes the gk7205v200/v300 path:of_match_tablecompat strings are now chiparch-dispatched (PLATFORM_NAME "," HISI_PRX "X"), so they expand togoke,Xon goke device trees andhisilicon,hisi-Xon HiSi DTs. Without this, AENC_Init dereferenced a NULL func table from a never-registeredsysmodule on gk7205v300.kernel/<mod>/hi3516ev200/<mod>.o— HiSiHi3516EV200_SDK_V1.0.1.2(Oct 2019, only HiSi flavour ever shipped pre-built; matches OpenIPC's HiSi-vintagelibmpi.so)kernel/<mod>/gk7205v200/<mod>_log.o— GokeSPC030 ko_log(Aug 2021, opt-in debug)kernel/<mod>/gk7205v200/<mod>_nolog.o— GokeSPC030 ko_nolog(Aug 2021, default for goke; ~30% smaller, fits the gk7205v300 lite 5 MB rootfs cap)KO_LOG=log|nologselects between Goke flavours;kernel/Kbuilddefaults tonologforgk7205v200and silently ignoresKO_LOGonhi3516ev200(only one variant exists there).Fix
load_goke -rto rmmod by actual in-kernel module name. openhisilicon's wrapper setsPREFIX = open_so every module's internal name isopen_<mod>regardless of the on-disk filename beinggk7205v200_<mod>.ko(renamed at install time byhisilicon-opensdkto satisfy vendorload_goke's insmod-by-filename pattern). insmod takes the filename — already correct. rmmod takes the kernel's module name, sormmod gk7205v200_<mod>was a silent no-op against any post-hisilicon-cv200: build 18 sensor drivers from openhisilicon source #2042-style openhisilicon install. Switching allremove_ko/remove_audio/remove_detectrmmods toopen_<mod>fixes that.Net effect on gk7205v300 lite boards:
lsmodshows the full 22-moduleopen_*set with clean GPL taint (no morePfrom vendorgk7205v200_*.koblobs).load_goke -r(and-awhich calls it first) actually unloads modules instead of being a no-op./image.jpgreturns valid 1920×1080 JPEGs sustained — verified live on the lab gk7205v300 (10.216.128.32, imx335) running this stack.Net effect on hi3516ev200/ev300 boards: byte-identical kernel-module content to current master. The
kernel/<mod>/hi3516ev200/<mod>.oblob is the same HiSi V1.0.1.2 file moved into a chiparch subdir;KO_LOG_SUFFIXresolves to empty for that chiparch. CI'sBuild SDK (hi3516ev200, hi3516ev200_lite)confirms the dispatch still produces a valid module set.Test plan
master+a993c5a(cached known-good with goke-only aliases) →/image.jpg= 73 kB, taint G+Pmaster+8d91335(its current state)load_goke -around-trips cleanly:lsmod | grep open_empty after-r, full set after-i🤖 Generated with Claude Code