Skip to content

hi3518ev200_lite_yeskamo-nk02: Initial support - #289

Open
luaxlab wants to merge 2 commits into
OpenIPC:masterfrom
luaxlab:nk02
Open

luaxlab wants to merge 2 commits into
OpenIPC:masterfrom
luaxlab:nk02

Conversation

@luaxlab

@luaxlab luaxlab commented Dec 2, 2026

Copy link
Copy Markdown

This PR brings initial support for Yeskamo NK02 and perhaps familiar white-label-devices.

Some technical information:
SoC: hi3518ev200
Sensor: sc2135
WiFi: rtl8188eu
ROM: NOR 8M

The kernel has builtin support for mmc devices, there is however no mmc or sd slot present. Nevertheless the driver tries to probe for an sd card and delays booting by minutes.
As a perhaps dirty workaround I let the customizer add an argument hisi_mci.disabled=1 to the kernel boot arguments (the extra fwargs to be specific) which prevents the module from loading. Cam comes up in seconds on subsequent boots.

Glad to see this merged, or problems pointed out to me.

Cheers

Signed-off-by: Luca <dev@luaxlab.de>
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Add Yeskamo NK02 (HI3518EV200) device support

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds a new device target for Yeskamo NK02: HI3518EV200 SoC, SC2135 sensor, RTL8188EU Wi-Fi, 8 MB
 NOR.
• Adds the defconfig, kernel config fragments, and a customizer script that sets wlan driver,
 Majestic night-mode pins, and upgrade URL.
• Blacklists the hisi_mci SD driver via kernel arg to stop a multi-minute boot delay on hardware
 without an SD slot.
Merge Risk 🟢 Low

Blast radius 🟡 Medium 💥 3 capabilities

  • 3 affected capabilities within one bounded functional scope: Yeskamo NK02 device firmware integration.
  • The defconfig and exclude list jointly define one bootable end-to-end firmware artifact for this device; the exclusions are image composition inputs, not independent user capabilities.
  • Light sensing, IR-cut, backlight, codec, and frame-rate settings jointly control the camera's imaging outcome on this one device; they are related runtime settings within the same bounded device integration.
  • The upgrade URL, Wi-Fi driver profile, and MCI blacklist are separate settings but serve the bounded device integration's connectivity and startup behavior; they do not establish independent functional scopes.
Sources

devices/hi3518ev200_lite_yeskamo-nk02/general/overlay/usr/share/openipc/customizer.sh[12-21]

# Set custom majestic settings
#
cli -s .nightMode.lightSensorPin 62
cli -s .nightMode.lightSensorInvert true
cli -s .nightMode.lightMonitor true
cli -s .nightMode.irCutPin1 65
cli -s .nightMode.irCutPin2 64
cli -s .nightMode.backlightPin 1
cli -s .video0.codec h264
cli -s .video0.fps 30

devices/hi3518ev200_lite_yeskamo-nk02/general/overlay/usr/share/openipc/customizer.sh[7-9]

# Set custom upgrade url
#
fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/hi3518ev200_lite_yeskamo-nk02-nor.tgz'

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[38-44]

# OpenIPC
BR2_OPENIPC_SOC_VENDOR="hisilicon"
BR2_OPENIPC_SOC_MODEL="hi3518ev200"
BR2_OPENIPC_SOC_FAMILY="hi3516cv200"
BR2_OPENIPC_SNS_MODEL="sc2135"
BR2_OPENIPC_VARIANT="lite"
BR2_OPENIPC_FLASH_SIZE="8"
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before, this board had no dedicated image definition.
  • After, declarative Buildroot symbols select an existing SoC, sensor, package, flash-size, and exclusion mechanism.
  • The changed correctness condition is that the selected SC2135 and RTL8188EUS runtime assets must survive trimming while unused assets are removed; no new algorithm, state machine, or concurrency protocol is introduced.
Sources

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[38-44]

# OpenIPC
BR2_OPENIPC_SOC_VENDOR="hisilicon"
BR2_OPENIPC_SOC_MODEL="hi3518ev200"
BR2_OPENIPC_SOC_FAMILY="hi3516cv200"
BR2_OPENIPC_SNS_MODEL="sc2135"
BR2_OPENIPC_VARIANT="lite"
BR2_OPENIPC_FLASH_SIZE="8"
Potential damage 🟡 Medium 🩹 Temporary loss

  • If the image composition regresses, the camera may fail to boot or lose a required sensor or Wi-Fi component.
  • Reflashing a corrected image is supported in principle, but exact package and exclusion wiring was not available to verify the fault boundary.
  • A corrected build and device reflash are required; reverting the repository alone does not repair an already-flashed image.
Sources

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[38-44]

# OpenIPC
BR2_OPENIPC_SOC_VENDOR="hisilicon"
BR2_OPENIPC_SOC_MODEL="hi3518ev200"
BR2_OPENIPC_SOC_FAMILY="hi3516cv200"
BR2_OPENIPC_SNS_MODEL="sc2135"
BR2_OPENIPC_VARIANT="lite"
BR2_OPENIPC_FLASH_SIZE="8"
Assessed commit f47dcb6
Diagram

graph TD
  A["NK02 defconfig"] --> B["hi3518ev200 kernel config"] --> C["Kernel with MMC enabled"]
  A --> D["customizer.sh"]
  D --> E["fw_setenv extras"] --> F["hisi_mci disabled"]
  D --> G["Majestic night-mode and video"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Disable hisi_mci in the kernel config
  • ➕ Probe never runs, so no boot delay and no customizer dependency
  • ➕ Works for any user flashing the image, not only those who run customizer
  • ➖ Needs a kernel config change and a rebuild
  • ➖ Diverges from the shared hi3518ev200 generic config, so it may need a per-device fragment
2. Device-tree node status disabled
  • ➕ Declarative: the MMC controller is simply not instantiated
  • ➕ Keeps the kernel config shared across devices
  • ➖ Requires a device-tree change for the board
  • ➖ Only helps if the DT has a separate MMC node for this SoC

Recommendation: Keep the runtime kernel-argument workaround only as a stopgap. Disabling the hisi_mci driver in the kernel config would remove the probe delay for every user without relying on the customizer setting extras. Also, the neo-post-image.sh and hi3516cv200.neo.config files appear unused by this defconfig and should be dropped or justified.

Files changed (9) +11734 / -0

Enhancement (2) +72 / -0
neo-post-image.shAdd post-image script wrapping zImage+DTB as uImage +37/-0

Add post-image script wrapping zImage+DTB as uImage

• Adds a 37-line post-image script that appends the cv200 DTB to zImage and wraps it with mkimage into uImage at 0x80008000. The defconfig does not reference it, so it appears unused for this device.

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/board/hi3516cv200/neo-post-image.sh

customizer.shAdd first-boot customizer for NK02 settings +35/-0

Add first-boot customizer for NK02 settings

• Sets a custom upgrade URL, Majestic night-mode GPIO pins (light sensor, IR cut, backlight), h264 at 30 fps, and wlan device rtl8188eu-generic. It also sets fw_setenv extras to hisi_mci.disabled=1 to skip the SD probe delay. The PR description calls the variable 'extra', so the variable name should be checked against the bootloader env.

devices/hi3518ev200_lite_yeskamo-nk02/general/overlay/usr/share/openipc/customizer.sh

Documentation (1) +1 / -0
README.mdAdd Yeskamo NK02 row to supported devices table +1/-0

Add Yeskamo NK02 row to supported devices table

• Adds one row to the device table listing HI3518EV200, SC2135, RTL8188EU_USB, NOR_8M, status 'done, long first boot'. Documents the known slow first boot.

README.md

Other (6) +11661 / -0
hi3518ev200_lite_yeskamo-nk02_defconfigAdd Buildroot defconfig for Yeskamo NK02 +4207/-0

Add Buildroot defconfig for Yeskamo NK02

• Adds the full defconfig: musl external toolchain, HiSilicon OSDRV HI3516CV200, Majestic, and RTL8188EUS_OPENIPC. Points the kernel at hi3518ev200.generic.config and selects the rootfs post-image script. The header embeds a local developer path (/mnt/datafs/...) in BR2_EXTERNAL_GENERAL_PATH, which should be cleaned up.

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig

hi3518ev200.generic.configAdd kernel config for HI3518EV200 generic board +2482/-0

Add kernel config for HI3518EV200 generic board

• Adds a full ~2,500-line Linux kernel config for the HI3518EV200 variant. It enables CONFIG_MMC, which is the source of the SD probe delay addressed by the customizer workaround.

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev200.generic.config

hi3518ev201.generic.configAdd kernel config for HI3518EV201 generic board +2240/-0

Add kernel config for HI3518EV201 generic board

• Adds a ~2,200-line kernel config for the HI3518EV201 sibling SoC, which is the same hi3516cv200 family. Only the sibling config is included in this device's defconfig path.

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev201.generic.config

hi3516cv200.generic.configAdd kernel config for HI3516CV200 generic board +2433/-0

Add kernel config for HI3516CV200 generic board

• Adds a ~2,400-line kernel config for the HI3516CV200 base SoC in the same family. It is a sibling of the HI3518EV200 config and appears to be carried for reference.

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/board/hi3516cv200/hi3516cv200.generic.config

hi3516cv200.neo.configAdd seed kernel config for hi3516cv200_neo (likely unused) +228/-0

Add seed kernel config for hi3516cv200_neo (likely unused)

• Adds a 228-line seed kernel fragment for a different 'neo' V2 board that targets HI3516CV200 with appended DTB. Nothing in this PR's defconfig references it, so it is probably dead code for this device.

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/board/hi3516cv200/hi3516cv200.neo.config

hi3518ev200_lite.listAdd sysupgrade exclude list for HI3518EV200 lite +71/-0

Add sysupgrade exclude list for HI3518EV200 lite

• Adds a 71-line exclude list of sensor INI files, IQ files, libsns_*.so libraries, and the rtl8188eu kernel module path. Most entries cover other sensors. SC2135 is not listed, and the module path assumes kernel 4.9.37.

devices/hi3518ev200_lite_yeskamo-nk02/general/scripts/excludes/hi3518ev200_lite.list

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Other builders cannot produce this image 🐞 Bug ≡ Correctness
Description
BR2_EXTERNAL_GENERAL_PATH in the new defconfig points to the contributor's local directory, and
BR2_ROOTFS_POST_IMAGE_SCRIPT uses that value to locate the image-generation script. When the
builder clones firmware anywhere else, the post-image step looks outside the cloned tree and cannot
produce the firmware image.
Code

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[7]

+BR2_EXTERNAL_GENERAL_PATH="/mnt/datafs/openipc/tinkering/kernelbuild/firmware-new/general"
Evidence
The defconfig sets the external-tree path to a specific /mnt/datafs/... checkout and expands it in
the post-image script setting. The repository's builder instead clones firmware into its own build
directory, copies in the device files, and runs make BOARD=... there.

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[5-8]
devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[493-497]
builder.sh[139-176]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new Buildroot defconfig embeds the contributor's filesystem paths, including the external-tree path used by the post-image script. Builds from another checkout cannot resolve that script.
## Fix Focus Areas
- devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[7-7]
- devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[378-380]
- devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[493-497]
## Recommended Fix
Replace the generated configuration with a minimal board defconfig. Remove the captured absolute paths and let Buildroot resolve the external-tree path for `BR2_ROOTFS_POST_IMAGE_SCRIPT` from the active checkout. Verify an image build from a checkout at a different path.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. WiFi driver build and profile disagree 📘 Rule violation ≡ Correctness
Description
The NK02 defconfig builds the OpenIPC rtl8188eus package and disables the in-tree rtl8188eu package,
while customizer.sh selects the rtl8188eu-generic profile, the exclude list removes the in-tree
r8188eu.ko module, and the README lists RTL8188EU_USB. If that profile requires the excluded
in-tree module or does not match the driver shipped in the image, the board's WiFi will not come up.
Code

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[R4146-4147]

+BR2_PACKAGE_RTL8188EUS_OPENIPC=y
+# BR2_PACKAGE_RTL8188FU_OPENIPC is not set
Evidence
The defconfig selects BR2_PACKAGE_RTL8188EUS_OPENIPC=y and disables BR2_PACKAGE_RTL8188EU, while
customizer.sh sets wlandev to rtl8188eu-generic. The exclude list also removes
/lib/modules/4.9.37/kernel/drivers/staging/rtl8188eu/r8188eu.ko, so the selected profile, built
package, and retained module are not aligned.

devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[4146-4147]
devices/hi3518ev200_lite_yeskamo-nk02/general/overlay/usr/share/openipc/customizer.sh[26-26]
CLAUDE.md: Match Device Configuration to Hardware: CLAUDE.md: Match Device Configuration to Hardware
devices/hi3518ev200_lite_yeskamo-nk02/general/scripts/excludes/hi3518ev200_lite.list[71-71]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The NK02 defconfig builds the OpenIPC rtl8188eus package and disables the in-tree rtl8188eu package, but the customizer selects the `rtl8188eu-generic` profile and the README lists `RTL8188EU_USB`. The exclude list removes the in-tree `r8188eu.ko` module. Align the package, profile, and exclude list so the image retains the driver the boot-time profile needs.
## Fix Focus Areas
- devices/hi3518ev200_lite_yeskamo-nk02/br-ext-chip-hisilicon/configs/hi3518ev200_lite_yeskamo-nk02_defconfig[4146-4147]
- devices/hi3518ev200_lite_yeskamo-nk02/general/overlay/usr/share/openipc/customizer.sh[26-26]
- devices/hi3518ev200_lite_yeskamo-nk02/general/scripts/excludes/hi3518ev200_lite.list[70-71]
## Recommended Fix
Confirm whether the hardware needs the in-tree rtl8188eu driver or the OpenIPC rtl8188eus driver. Set the defconfig package and `wlandev` profile to match that choice, and update the exclude list accordingly: remove the `r8188eu.ko` exclusion if the in-tree module is needed, or retain it only if the chosen driver does not require that module.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can import rules and skills only from the repositories your team follows

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@luaxlab

luaxlab commented Dec 2, 2026 •

Copy link
Copy Markdown
Author

Forgot to mention:
Split-Nor is beeing used, this causes some mild issues when building, not sure how to fix:

Assembled firmware available in:
/mnt/datafs/openipc/tinkering/openipc-builder/archive/hi3518ev200_lite_yeskamo-nk02/202612021433
├── openipc.hi3518ev200-nor-lite-split.tgz
├── rootfs.tar
└── sizes.hi3518ev200-lite.json
Making autoupdate kernel image
./output/host/bin/mkimage: Can't open ./output/images/uImage.hi3518ev200: No such file or directory

Making autoupdate rootfs image
./output/host/bin/mkimage: Can't open ./output/images/rootfs.squashfs.hi3518ev200: No such file or directory

Done

Going to cleanup defconfig and unneccessary files as suggested.

Regarding rtl8188: In fact, booth the out of tree as well as the staging driver seem to work. However, the staging driver needs manual loading (/etc/modules) and majestic lists it as no driver - but it works.
The staging driver would probably be preferred , as it is much smaller. Any advice?

The defconfig was a whole Buildroot .config (4207 lines), carrying a local
BR2_EXTERNAL path and the fixed NOR package. It is now the short form the
other hi3518ev200 lite boards use, on the split NOR layout: the generic
hi3518ev200 lite set with RTL8188EUS in place of MT7601U, no motors (the
NK02 has no pan/tilt), and the sensor named.

The five files under board/hi3516cv200 were unchanged copies of the
firmware's and are dropped. The exclude list named the six iq files twice.

@openipc-ai openipc-ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Luca. The device side looks right. The structure wasn't something CI could build, so I fixed it directly on your branch (f47dcb6) rather than send it back to you:

  • The defconfig was a full Buildroot .config (4207 lines). It had your local BR2_EXTERNAL_GENERAL_PATH="/mnt/datafs/…", pinned host-GCC and toolchain-version symbols, and BR2_OPENIPC_NOR_FIXED_PACKAGE=y. It's now the ~60-line form the other hi3518ev200_lite_* boards use, closest to qtech-qvc-ipc-136w (also RTL8188EU). That means firmware's generic hi3518ev200 lite set, with RTL8188EUS_OPENIPC in place of MT7601U, no motors (the NK02 has no pan/tilt), BR2_OPENIPC_SNS_MODEL="sc2135", and the split NOR layout (post-image-split.sh) every 8 MB board now uses. I left out LINUX_FIRMWARE_OPENIPC_RTL_8188EU because the 8188eus driver carries its own firmware. The qtech board runs without that file.
  • Dropped br-ext-chip-hisilicon/board/hi3516cv200/*. All five files were byte-for-byte copies of firmware's, so they changed nothing.
  • The exclude list named the six iq/*.ini files twice. I removed the duplicates.

hisi_mci.disabled=1 isn't dirty, by the way. himci.c on the cv200 kernel has module_param(disabled, …), and the module is hisi_mci, so that's exactly the switch made for this. It only takes effect from the second boot, because extras is read by U-Boot. That matches your README note "long first boot". If you want the first boot fast too, add a backgrounded (sleep 3; reboot -f) & at the end of the customizer, as several other boards do.

I've approved the CI run. Please flash the CI image once it's built and confirm the camera still comes up the same way: video, Wi-Fi, night mode.

This branch has not been deployed

No deployments
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.

2 participants