Skip to content

hisilicon-osdrv-hi3516cv300: drop opensdk-overwritten blobs (mirror of #2101)#2102

Merged
widgetii merged 2 commits into
masterfrom
pr-osdrv-cv300-cleanup
May 17, 2026
Merged

hisilicon-osdrv-hi3516cv300: drop opensdk-overwritten blobs (mirror of #2101)#2102
widgetii merged 2 commits into
masterfrom
pr-osdrv-cv300-cleanup

Conversation

@widgetii
Copy link
Copy Markdown
Member

Summary

Mirror of #2101 for the cv300 case. cv300 osdrv was unconditionally installing 35 prebuilt vendor .ko files; hisilicon-opensdk renamed 28 open_*.ko over them at install time, so they were dead weight in the rootfs build pipeline. This PR drops those 28 install lines from the .mk and deletes the orphan binaries (~600 KB freed in the source tree).

cv300 is structurally different from cv500 in one important way: opensdk on cv300 sets DISABLE_VO=1 and has no piris module, so hi3516cv300_vou.ko and hi_piris.ko (both actively loaded by load_hisilicon) have no openhisilicon replacement. Those prebuilts stay, along with seven other vendor-only modules referenced only by commented insmod lines (kept as opt-in extras until each grows an open replacement or is pruned from the load script).

Commits:

  1. Drop the 28 install lines in hisilicon-osdrv-hi3516cv300.mk (-29 / +16; comment block explains what stays and why)
  2. Delete the 29 corresponding orphan .ko files from files/kmod/

Test plan

Local build of hi3516cv300_lite from this branch, compared against today's nightly openipc.hi3516cv300-nor-lite.tgz:

this branch nightly
rootfs file count 674 674
rootfs file list diff empty
/lib/modules/3.18.20/hisilicon/ count 40 40
hisilicon .ko list diff empty
QEMU boot -M hi3516cv300 lsmod 5 modules 5 modules
lsmod content diff identical

Both QEMU boots hit the same pre-existing cma_osal.ko insmod failure (separate firmware-side bug, orthogonal to this PR — the cv300 qemu-boot row in openhisilicon CI is already allow-failure: true for it).

  • cv300 firmware build still succeeds and produces byte-equivalent rootfs to nightly
  • same .ko set ends up in /lib/modules/3.18.20/hisilicon/
  • QEMU boot reaches openipc-hi3516cv300 login: with no new errors

🤖 Generated with Claude Code

widgetii added 2 commits May 17, 2026 11:02
…en blobs

Mirror of #2101 for the cv500 case, narrowed to cv300's structurally
different setup. Unlike cv500 (where opensdk produces a full open_*.ko
replacement set), opensdk on cv300 only renames a subset of open_*.ko
to vendor names — VO and piris are not built (DISABLE_VO=1, no piris
module in hi3516cv300.kbuild). Stripping all .ko installs the way cv500
did would lose hi3516cv300_vou.ko and hi_piris.ko, both actively loaded
by files/script/load_hisilicon.

So this commit removes only the install lines for the 28 modules that
hisilicon-opensdk overwrites at install time (hi_osal, sys_config,
hi_mipi, hi_acodec, hi3516cv300_base/sys/isp/vpss/venc/vedu/h264e/h265e/
jpege/rc/vgs/ive/chnl/aio/ai/ao/aenc/adec/viu/region/wdt/ir/pwm/rtc/
sensor). On every modern OpenIPC cv300 build these were installed,
then immediately clobbered by the opensdk install step — pure dead
weight in the rootfs build pipeline.

Kept install lines:
  - hi3516cv300_vou.ko  — VO subsystem, opensdk sets DISABLE_VO=1 for cv300
  - hi_piris.ko         — P-iris, not built by openhisilicon cv300 kbuild
  - hi_adv7179, hi_cipher, hi_sample_ist, hi_ssp_*, hi_tlv320aic31,
    virtualhifb — board-specific extras referenced only by commented
    insmod lines in load_hisilicon; kept as opt-in until each grows
    an open replacement or is pruned from the load script.

Verified by building hi3516cv300_lite from this branch and comparing
against today's nightly:

  rootfs file list                : 674 = 674, diff empty
  /lib/modules/3.18.20/hisilicon/ : 40 = 40, diff empty
  QEMU boot (-M hi3516cv300)      : identical (5/5 lsmod entries,
                                    same pre-existing cma_osal.ko
                                    insmod failure on both)
Companion to the previous commit. These 29 prebuilt vendor .ko files
were installed by HISILICON_OSDRV_HI3516CV300_INSTALL_TARGET_CMDS but
hisilicon-opensdk renames open_*.ko over each of them at install time,
so they're never present in any shipped rootfs. Removing the install
lines orphaned them in files/kmod/ — drop the binaries too.

Files removed (kernel 3.18.20 vendor blobs, hi3516cv300_* and hi_*
naming, ~600 KB total):

  hi3516cv300_{adec,aenc,ai,aio,ao,base,chnl,h264e,h265e,ir,isp,
               ive,jpege,pwm,rc,region,rtc,sensor,sys,vedu,venc,
               vgs,viu,vpss,wdt}.ko
  hi_acodec.ko hi_mipi.ko hi_osal.ko sys_config.ko

Kept: hi3516cv300_vou.ko, hi_piris.ko, hi_adv7179.ko, hi_cipher.ko,
hi_sample_ist.ko, hi_ssp_ili9341v_6bit.ko, hi_ssp_ota5182.ko,
hi_tlv320aic31.ko, virtualhifb.ko — each is referenced by the .mk
and has no opensdk replacement (see commit a few back for rationale).
@widgetii widgetii merged commit 255e716 into master May 17, 2026
95 checks passed
@widgetii widgetii deleted the pr-osdrv-cv300-cleanup branch May 17, 2026 08:51
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