Skip to content

fh8833v100: build from the FH885x V100 kernel and run its media stack - #2715

Merged
dimerr merged 2 commits into
masterfrom
fh8833v100/shared-v100
Oct 28, 2026
Merged

dimerr merged 2 commits into
masterfrom
fh8833v100/shared-v100

Conversation

@dimerr

@dimerr dimerr commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Problem

fh8833v100_lite (Fullhan FH8632 / FH8632v2, kernel machine FH8833) has never been built by CI (UNBUILT_FAMILIES), and it does not produce a working image. Its fullhan-fh8833v100 kernel no longer builds with gcc 13; built with older patches, it hangs right after "booting the kernel". It also has no streamer.

This PR moves the board onto the FH885x V100 family, where FH8632 belongs:

  • Kernel: OPENIPC_SOC_FAMILY=fh8852v100, whose kernel tarball carries the FH8833 machine after ARM: fullhan: bring FH8833 (FH8632) into the FH885x V100 tree linux#159 (draft). This PR depends on it. The kernel config moves to board/fh8852v100/. It is the old config carried into that tree, with the v1 SADC under its new name FH_SADC_V1, eight PWMs, and the USB host that the shared fh_otg now drives.

  • Media: that family's toolchain, fullhan-osdrv-fh8852v100 and majestic. That media stack is FH8632's own:

    • media_process in FH8856_IPC_V1.2.0 carries chip_fh8x33_16M/64M/128M tables;
    • the published majestic.fh8852v100 binary contains FH8632 and FH8632v2.

    The FH8632 SDK's own libraries cannot replace these, because they lack API_ISP_SensorKick, which that majestic imports. Majestic is on for this board.

  • CI: the board leaves UNBUILT_FAMILIES and joins ALL_BOARDS.

load_fullhan, for the whole V100 family:

  • hevc.ko is skipped on FH8833, which has no HEVC encoder (/proc/cpuinfo Hardware: FH8833).

  • The media modules now wait for the ARC. rtvbus.ko loads whether or not the ARC starts. It clears the word at +0x7c of both ring halves, the ARC sets one of them, and vbus_mesg_doinit() refuses until then.

    Without that word, media_process.ko fails. Its failure path leaves a misc device behind, and the kernel oopses when majestic opens it; see the Before log. The script now waits up to two seconds for either word and otherwise loads no media modules. Where the ARC starts, the same modules load in the same order as before. That claim is reasoned from the disassembly, and it needs one FH8852 or FH8856 camera to confirm.

Hardware tested on

None. Not run on an FH8632 camera, and the load_fullhan change has not run on an FH8852 or FH8856 camera either; draft until it has.

Evidence

Built locally against OpenIPC/linux#159:

fh8833v100_lite  - uImage: [1704KB/2048KB]  - rootfs.squashfs: [4444KB/5120KB]

qemu-hisilicon fh8632 machine, test-fullhan-boot.sh:

  PASS: kernel up
  PASS: OpenIPC userland
  PASS: login prompt
  PASS: DHCP lease over the GMAC
  PASS: JFFS2 overlay written back to rootfs_data
fh_otg fh_otg: irq 27, io mem 0x00000000
hub 1-0:1.0: USB hub found

Before (this board, QEMU has no ARC, previous load_fullhan):

insmod: can't insert 'media_process.ko': Operation not permitted
...
Starting majestic: OK
Unable to handle kernel paging request at virtual address bf0ca8a8
Internal error: Oops: 7 [#1]
Modules linked in: rtvbus vmm vfat fat
PC is at misc_open+0x44/0x1ec
Process majestic (pid: 753, stack limit = 0xc22ea268)

After:

Loading vendor modules...
load_fullhan: the ARC did not start, media modules not loaded
Starting majestic: OK
Welcome to OpenIPC
$ python3 .github/scripts/ci-matrix.py --self-test
ci-matrix: self-test ok (113 boards, 158 packages, 76 cases)
$ STRICT=1 bash .github/scripts/test_shell_parse.sh
all parsed clean under busybox ash
$ STRICT=1 bash .github/scripts/test_strip_shell_comments.sh
All strip-shell-comments checks passed.

Scope

  • No kernel patches under general/package/all-patches/linux/ (those go to OpenIPC/linux)
  • No files specific to a single retail camera model (those go to OpenIPC/builder)
  • No probing or bring-up tooling (that goes to OpenIPC/ipctool)
  • Nothing under general/overlay/ or in a shared load_<vendor> script hardcodes a value specific to my board
  • Package sources come from an OpenIPC repository, and any version bump keeps at least the specificity of the pin it replaces (a new package should pin a full 40-character SHA)
  • No LD_PRELOAD, and no binaries that cannot be rebuilt from source
  • New code is selected by a defconfig, so CI actually builds it

@dimerr
dimerr marked this pull request as ready for review October 28, 2026 11:17
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Build FH8833 on the FH885x V100 stack and guard media startup

✨ Enhancement 🐞 Bug fix ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Move FH8833 to the FH885x V100 kernel, toolchain, and media stack to produce a buildable image.
• Enable Majestic and CI builds for the board.
• Wait for ARC readiness before loading media modules, preventing a failure-path kernel oops.
Diagram

graph TD
  Board["FH8833 defconfig"] --> Config["Kernel config"] --> Kernel["FH885x kernel"]
  Board --> OSDRV["V100 media stack"] --> ARC{"ARC ready?"} -->|yes| Media["Media modules"] --> Majestic["Majestic"]
  ARC -->|no| Skip["Skip media"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Expose ARC readiness through the kernel driver
  • ➕ Avoids userspace polling of fixed physical addresses.
  • ➕ Provides a clearer readiness contract for the shared loader.
  • ➖ Requires a coordinated upstream kernel change.
  • ➖ Does not remove the need to validate startup on FH8852, FH8856, and FH8833 hardware.

Recommendation: Reusing the existing FH885x V100 family is preferable to maintaining a separate FH8833 stack, given the stated kernel and media compatibility. The bounded userspace readiness check is a practical interim guard, but hardware validation is needed before merging the shared loader change; a driver-level readiness interface is worth considering longer term.

Files changed (4) +53 / -30

Enhancement (1) +15 / -9
fh8833v100_lite_defconfigSelect the FH885x V100 build and enable Majestic +15/-9

Select the FH885x V100 build and enable Majestic

• Switches from a locally built toolchain and the FH8833 family to the external FH885x V100 toolchain and family. Enables Majestic and its JSON-C and font dependencies for the board.

br-ext-chip-fullhan/configs/fh8833v100_lite_defconfig

Bug fix (1) +23 / -2
load_fullhanGate shared media startup on ARC readiness +23/-2

Gate shared media startup on ARC readiness

• Loads rtvbus, waits up to two seconds for either ARC ring readiness word, and skips media modules on failure to avoid the observed kernel oops. On a ready ARC, preserves the media load order while omitting HEVC on FH8833.

general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan

Other (2) +15 / -19
ci-matrix.pyAdd FH8833 to the CI board matrix +3/-4

Add FH8833 to the CI board matrix

• Adds fh8833v100_lite to ALL_BOARDS, removes its family from UNBUILT_FAMILIES, and adjusts self-test expectations for the additional Majestic consumer.

.github/scripts/ci-matrix.py

fh8833v100.generic.configAdapt the FH8833 kernel config to the shared V100 tree +12/-15

Adapt the FH8833 kernel config to the shared V100 tree

• Places the FH8833 configuration under the selected FH885x V100 family and aligns options with that kernel tree, including FH_SADC_V1. The configuration retains FH8833 machine selection and eight PWM channels.

br-ext-chip-fullhan/board/fh8852v100/fh8833v100.generic.config

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

qodo-free-for-open-source-projects Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Firmware changes lack camera validation 📘 Rule violation ☼ Reliability
Description
The new load_fullhan path changes ARC detection and media-module loading for the FH8852 V100
family, while the board also switches to that family's kernel and media stack. The pull request
states that no FH8632, FH8852, or FH8856 camera was tested, so failures in module startup or
streaming can reach shipped firmware without real-hardware evidence.
Code

general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[R27-45]

+if insmod rtvbus.ko ra=0xa3e00000 rs=65536 fn=rtthread_arc_FH8852.bin fa=0xa3f00000; then
+	for i in 1 2 3 4 5 6 7 8 9 10; do
+		if [ "$(devmem 0xa3e0007c 32)" != 0x00000000 ] ||
+		   [ "$(devmem 0xa3e0807c 32)" != 0x00000000 ]; then
+			arc=1
+			break
+		fi
+		usleep 200000
+	done
+fi
#insmod rtvbus.ko ra=0xa7e00000 rs=65536 fn=rtthread_arc_FH8856.bin fa=0xa7f00000
#reset sensor
set_gpio 13 1
+if [ "$arc" = 0 ]; then
+	echo "load_fullhan: the ARC did not start, media modules not loaded"
+	exit 1
+fi
Evidence
The changed loader alters whether the vendor media modules load and the changed defconfig moves the
board to a different kernel/media family. The PR description states that no affected camera was
tested, which fails the hardware-evidence requirement for image behavior changes.

Rule 3: Hardware evidence is present and honest
general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[21-45]
br-ext-chip-fullhan/configs/fh8833v100_lite_defconfig[38-64]

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 PR changes shipped kernel/media behavior and explicitly reports no testing on an FH8632, FH8852, or FH8856 camera. The hardware-evidence gate requires before/after output from an affected real camera for firmware behavior changes.
## Fix Focus Areas
- general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[21-45]
- br-ext-chip-fullhan/configs/fh8833v100_lite_defconfig[38-64]
## Recommended Fix
Run the affected image on a real FH8632 camera and on an FH8852 or FH8856 camera for the shared loader change. Record before/after boot, module-loading, and streaming output in the pull request, or defer the firmware behavior change until that evidence is available.

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


2. Shared loader names one SoC 📘 Rule violation ⚙ Maintainability
Description
The shared load_fullhan script adds an FH8833-specific branch to decide whether to load the HEVC
module. Because this loader serves the Fullhan family, the board-specific condition is embedded in
shared firmware startup logic instead of a per-board configuration seam.
Code

general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[R51-52]

+# FH8833 (FH8632) has no HEVC encoder
+grep -q FH8833 /proc/cpuinfo || insmod hevc.ko
Evidence
The checklist prohibits device-specific values in shared load scripts. The changed loader directly
tests for FH8833 and conditionally changes which vendor module is loaded.

general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[51-52]
Best Practice: Repository guidelines

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 shared Fullhan loader now contains an `FH8833`-specific module-loading condition, violating the shared firmware blast-radius boundary.
## Fix Focus Areas
- general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[51-52]
- br-ext-chip-fullhan/configs/fh8833v100_lite_defconfig[1-66]
## Recommended Fix
Remove the `FH8833` test from the shared loader and express the board-specific HEVC module selection through the per-board configuration or a board-selected module list, while preserving HEVC loading for boards that support it.

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


3. Cameras lose media support after ARC failure 📘 Rule violation ☼ Reliability
Description
The shared load_fullhan script exits before loading media_process, isp, vpu, and the encoder
modules when the ARC readiness words remain zero. This firmware-side startup workaround compensates
for the vendor media stack's failed initialization path and leaves affected cameras without their
media stack.
Code

general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[R42-45]

+if [ "$arc" = 0 ]; then
+	echo "load_fullhan: the ARC did not start, media modules not loaded"
+	exit 1
+fi
Evidence
The checklist requires streamer and SoC driver behavior to be fixed in the owning projects rather
than through firmware startup workarounds. The changed script explicitly waits for ARC state and
exits without loading the media modules when readiness is absent.

general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[21-45]
Best Practice: Repository guidelines

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 shared firmware startup script suppresses the media stack when the ARC does not become ready, compensating for vendor media-module initialization behavior in firmware.
## Fix Focus Areas
- general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[21-45]
## Recommended Fix
Move ARC readiness handling and failed-initialization cleanup into the owning kernel or vendor media driver, then keep the firmware loader's module sequence focused on loading supported modules through the established interface without silently disabling the media stack.

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



Remediation recommended

4. Module dependencies can remain unresolved ✓ Resolved
Description
The changed load_fullhan loader still invokes insmod for rtvbus.ko instead of the
tree-standard modprobe. When the shipped loader starts the vendor modules, direct insertion does
not resolve declared dependencies, so the ARC/media startup sequence can fail despite the new
readiness check.
Code

general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[27]

+if insmod rtvbus.ko ra=0xa3e00000 rs=65536 fn=rtthread_arc_FH8852.bin fa=0xa3f00000; then
Evidence
The changed shipped script directly invokes insmod rtvbus.ko; the compliance rule requires shipped
scripts to load kernel modules with modprobe so module dependencies resolve.

Rule 13: Shipped scripts follow tree conventions
general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[27-27]

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 shipped Fullhan loader uses `insmod` for the changed `rtvbus.ko` load, bypassing dependency resolution required by the tree convention.
## Fix Focus Areas
- general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[27-27]
## Recommended Fix
Replace the changed `insmod rtvbus.ko` invocation with the repository-standard `modprobe` form while preserving the existing module parameters and ARC readiness polling.

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


5. Failed memory reads can trigger a kernel oops ✓ Resolved
Description
load_fullhan compares each devmem command's output with zero without checking whether the read
succeeded, so an empty result sets arc=1. If a read fails while the ARC is not ready, the script
loads media_process.ko despite the new guard, reaching the module-failure path that the guard is
intended to avoid.
Code

general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[R29-31]

+		if [ "$(devmem 0xa3e0007c 32)" != 0x00000000 ] ||
+		   [ "$(devmem 0xa3e0807c 32)" != 0x00000000 ]; then
+			arc=1
Evidence
The new comparison accepts anything other than the literal zero string, including empty output from
a failed read; the resulting arc=1 bypasses the exit and reaches media_process.ko. The script's
own rationale identifies failure of that module's initialization as the path that leaves a dangling
misc device.

general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[21-35]
general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[42-48]
general/package/busybox/busybox.config[788-788]

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

## Issue description
A failed `devmem` command produces an empty value that the ARC readiness check treats as nonzero, allowing media modules to load without verified ARC readiness.
## Fix Focus Areas
- general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[27-35]
## Recommended Fix
Capture each read and its exit status separately. Set `arc=1` only when a read succeeds and returns a valid nonzero word; treat read failures as unverified readiness.

ⓘ 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 turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +27 to +45
if insmod rtvbus.ko ra=0xa3e00000 rs=65536 fn=rtthread_arc_FH8852.bin fa=0xa3f00000; then
for i in 1 2 3 4 5 6 7 8 9 10; do
if [ "$(devmem 0xa3e0007c 32)" != 0x00000000 ] ||
[ "$(devmem 0xa3e0807c 32)" != 0x00000000 ]; then
arc=1
break
fi
usleep 200000
done
fi
#insmod rtvbus.ko ra=0xa7e00000 rs=65536 fn=rtthread_arc_FH8856.bin fa=0xa7f00000

#reset sensor
set_gpio 13 1

if [ "$arc" = 0 ]; then
echo "load_fullhan: the ARC did not start, media modules not loaded"
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Firmware changes lack camera validation 📘 Rule violation ☼ Reliability

The new load_fullhan path changes ARC detection and media-module loading for the FH8852 V100
family, while the board also switches to that family's kernel and media stack. The pull request
states that no FH8632, FH8852, or FH8856 camera was tested, so failures in module startup or
streaming can reach shipped firmware without real-hardware evidence.
Agent Prompt
## Issue description
The PR changes shipped kernel/media behavior and explicitly reports no testing on an FH8632, FH8852, or FH8856 camera. The hardware-evidence gate requires before/after output from an affected real camera for firmware behavior changes.

## Fix Focus Areas
- general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[21-45]
- br-ext-chip-fullhan/configs/fh8833v100_lite_defconfig[38-64]

## Recommended Fix
Run the affected image on a real FH8632 camera and on an FH8852 or FH8856 camera for the shared loader change. Record before/after boot, module-loading, and streaming output in the pull request, or defer the firmware behavior change until that evidence is available.

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

Comment thread general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan Outdated
Comment on lines +51 to +52
# FH8833 (FH8632) has no HEVC encoder
grep -q FH8833 /proc/cpuinfo || insmod hevc.ko

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Shared loader names one soc 📘 Rule violation ⚙ Maintainability

The shared load_fullhan script adds an FH8833-specific branch to decide whether to load the HEVC
module. Because this loader serves the Fullhan family, the board-specific condition is embedded in
shared firmware startup logic instead of a per-board configuration seam.
Agent Prompt
## Issue description
The shared Fullhan loader now contains an `FH8833`-specific module-loading condition, violating the shared firmware blast-radius boundary.

## Fix Focus Areas
- general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[51-52]
- br-ext-chip-fullhan/configs/fh8833v100_lite_defconfig[1-66]

## Recommended Fix
Remove the `FH8833` test from the shared loader and express the board-specific HEVC module selection through the per-board configuration or a board-selected module list, while preserving HEVC loading for boards that support it.

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

Comment on lines +42 to +45
if [ "$arc" = 0 ]; then
echo "load_fullhan: the ARC did not start, media modules not loaded"
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

3. Cameras lose media support after arc failure 📘 Rule violation ☼ Reliability

The shared load_fullhan script exits before loading media_process, isp, vpu, and the encoder
modules when the ARC readiness words remain zero. This firmware-side startup workaround compensates
for the vendor media stack's failed initialization path and leaves affected cameras without their
media stack.
Agent Prompt
## Issue description
The shared firmware startup script suppresses the media stack when the ARC does not become ready, compensating for vendor media-module initialization behavior in firmware.

## Fix Focus Areas
- general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan[21-45]

## Recommended Fix
Move ARC readiness handling and failed-initialization cleanup into the owning kernel or vendor media driver, then keep the firmware loader's module sequence focused on loading supported modules through the established interface without silently disabling the media stack.

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

Comment thread general/package/fullhan-osdrv-fh8852v100/files/script/load_fullhan Outdated
@dimerr

dimerr commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Qodo review, point by point. Fixes are in 5a6916b.

  1. No camera validation: correct, and the reason this is a draft. The load_fullhan change needs one FH8852 or FH8856 camera.
  2. Shared loader names one SoC: kept. The test is on the SoC (Hardware: FH8833), not a board, and the reason is the die: FH8833 has no HEVC encoder, so hevc.ko would poke a block that is not there. That is the additive, per-SoC case CLAUDE.md allows in a load_<vendor>.
  3. Cameras lose media after an ARC failure: intended. Without the ARC, media_process.ko cannot initialise anyway (vbus_mesg_doinit() refuses, and insmod gives EPERM), so there was no media on that path before either. The difference is that the old path then oopsed the kernel when majestic opened the misc device the failed module left behind (log in the description). The V100 media_process_no_sc cannot replace it: its SDK objects are PIC (R_ARM_GOT_BREL), which no ARM module loader accepts.
  4. insmod instead of modprobe: fixed. The whole script now uses modprobe. Nothing here substitutes one module for another, so the dependencies modprobe resolves are the modules that were loaded before.
  5. A failed devmem read counts as ready: fixed, good catch. Only a hex value with a nonzero digit counts as ready, so empty output or an error is not.

Re-tested fh8833v100_lite in qemu-hisilicon fh8632: "the ARC did not start, media modules not loaded", majestic starts, no oops, boot checks 5/5.

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

Copy link
Copy Markdown

Qodo review, point by point. Fixes are in 5a6916b.

  1. No camera validation: correct, and the reason this is a draft. The load_fullhan change needs one FH8852 or FH8856 camera.
  2. Shared loader names one SoC: kept. The test is on the SoC (Hardware: FH8833), not a board, and the reason is the die: FH8833 has no HEVC encoder, so hevc.ko would poke a block that is not there. That is the additive, per-SoC case CLAUDE.md allows in a load_<vendor>.
  3. Cameras lose media after an ARC failure: intended. Without the ARC, media_process.ko cannot initialise anyway (vbus_mesg_doinit() refuses, and insmod gives EPERM), so there was no media on that path before either. The difference is that the old path then oopsed the kernel when majestic opened the misc device the failed module left behind (log in the description). The V100 media_process_no_sc cannot replace it: its SDK objects are PIC (R_ARM_GOT_BREL), which no ARM module loader accepts.
  4. insmod instead of modprobe: fixed. The whole script now uses modprobe. Nothing here substitutes one module for another, so the dependencies modprobe resolves are the modules that were loaded before.
  5. A failed devmem read counts as ready: fixed, good catch. Only a hex value with a nonzero digit counts as ready, so empty output or an error is not.

Re-tested fh8833v100_lite in qemu-hisilicon fh8632: "the ARC did not start, media modules not loaded", majestic starts, no oops, boot checks 5/5.

Point-by-point:

  1. finding 1 — Firmware changes lack camera validation: Still open. The QEMU fh8632 boot check is useful evidence for the ARC-failure path, but it does not satisfy the reported requirement for before/after validation on a real affected camera. Testing an FH8852 or FH8856 camera would close this gap.

  2. finding 2 — Shared loader names one SoC: Your rationale is technically clear, but the condition remains an FH8833-specific branch in a shared loader. If CLAUDE.md explicitly permits per-SoC exceptions for load_<vendor> scripts, that rule scope should be updated or the finding reconsidered; otherwise the finding remains applicable. No rule-management URL is available in the supplied review metadata.

  3. finding 3 — Cameras lose media support after ARC failure: The explanation addresses the behavioral concern: the guard prevents a known failed media_process initialization and subsequent oops rather than removing a working media path. The QEMU result supports that outcome. This is reasonable evidence for the intended behavior, although real-camera validation is still covered by finding 1.

  4. finding 4 — Module dependencies can remain unresolved: Resolved by replacing insmod with modprobe throughout the loader.

  5. finding 5 — Failed memory reads can trigger a kernel oops: Resolved. arc_ready() now rejects empty/error output and requires a valid nonzero hexadecimal value.

Overall, commit 5a6916b addresses findings 4 and 5 and provides useful validation for finding 3. The draft still has the real-camera evidence gap in finding 1; finding 2 depends on whether the repository rule explicitly allows this per-SoC exception.

@dimerr

dimerr commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

On finding 2, these are the rules in question.

CLAUDE.md, "No board-specific value in shared files":

A sensor name, I2C address, GPIO number, resolution, MAC prefix or IP literal does not belong in general/overlay/ or in a shared load_<vendor> default. Extending a load_<vendor> case arm, or adding a sensor to a package's list, is additive and fine

best_practices.md §1.2:

Flag only a change to an existing SNS_TYPE*, default resolution, or default profile in a shared load script. Extending a case arm, adding a new .ini, or adding a sensor to a package's sensor list changes no existing board and needs no such scrutiny.

The FH8833 test is not a board value; it names the SoC that lacks the HEVC block. It is additive in the same sense: FH8852 and FH8856 still load hevc.ko exactly as before, and only the FH8833, which has nothing for that module to drive, skips it. So I am keeping it as is.

@dimerr
dimerr force-pushed the fh8833v100/shared-v100 branch from 5a6916b to e368af1 Compare October 28, 2026 12:22
FH8632 (kernel machine FH8833) moves onto the FH885x V100 family:
OPENIPC_SOC_FAMILY becomes fh8852v100, so the board takes that family's
kernel tarball, which now carries the FH8833 machine, its published
toolchain, its media package and its majestic. That stack is FH8632's:
media_process in the FH8856_IPC_V1.2.0 SDK carries the fh8x33 chip
tables (16, 64 and 128 MB), and majestic.fh8852v100 names FH8632 and
FH8632v2. majestic is on for this board. The FH8632 SDK's own libraries
cannot replace these: they lack API_ISP_SensorKick, which majestic
imports.

The kernel config moves to board/fh8852v100/: the old one carried into
that tree, with the v1 SADC under its new name FH_SADC_V1, eight PWMs,
and the USB host the shared fh_otg now drives. The board leaves
UNBUILT_FAMILIES.

load_fullhan, for the whole family:
- hevc.ko is skipped on FH8833, which has no HEVC encoder;
- the media modules wait for the ARC. rtvbus.ko loads whether or not
  the ARC starts; it clears the word at +0x7c of both ring halves and
  the ARC sets one, and vbus_mesg_doinit() refuses until then. Without
  it media_process.ko fails, and that failure path leaves a misc device
  behind that oopses the kernel when majestic opens it. Now the script
  waits up to two seconds for either flag and otherwise loads no media
  modules. Where the ARC starts, the same modules load in the same order
  as before.

Depends on the FH8833 machine reaching fullhan-fh8852v100.

Built locally against that branch: uImage 1704/2048 KB, rootfs
4444/5120 KB. In qemu-hisilicon's fh8632 machine it boots to the login
prompt, gets a DHCP lease, writes the JFFS2 overlay and registers the
USB host; with no ARC in QEMU, load_fullhan reports it and loads no
media modules, and majestic starts without an oops. Not run on an
FH8632 camera, and the load_fullhan change has not run on an FH8852 or
FH8856 camera either.
- The ARC-ready check counts only a hex value with a nonzero digit as
  ready. A failed devmem read printed nothing, which compared unequal to
  0x00000000 and passed as ready.
- Modules load with modprobe instead of by path; depmod indexes the
  fullhan/ directory, and nothing here substitutes one module for
  another, so the dependencies modprobe resolves are the ones loaded.

fh8833v100_lite in qemu-hisilicon's fh8632 machine (no ARC): "the ARC did
not start, media modules not loaded", majestic starts, no oops; login,
DHCP and JFFS2 overlay as before.
@dimerr
dimerr force-pushed the fh8833v100/shared-v100 branch from e368af1 to 4cfe63b Compare October 28, 2026 13:31
@dimerr
dimerr merged commit 28f8a00 into master Oct 28, 2026
18 of 19 checks passed
@dimerr
dimerr deleted the fh8833v100/shared-v100 branch October 28, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant