Skip to content

qemu-boot: FH8626V100 runs 4.9.129, so its flash is spi0.0 - #217

Open
dimerr wants to merge 2 commits into
masterfrom
fh8626-mtdid
Open

dimerr wants to merge 2 commits into
masterfrom
fh8626-mtdid

Conversation

@dimerr

@dimerr dimerr commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

test-fullhan-boot.sh gives any SoC name ending in v100 the 3.0.8 kernels' spi_flash MTD id. FH8626V100's kernel is 4.9.129 (OpenIPC/linux fullhan-fh8852v200, OpenIPC/linux#53), and there the flash is spi0.0. The mtdparts= was therefore ignored, the board's built-in partitions were used, and no root was mounted (VFS: Unable to mount root fs on unknown-block(31,3)).

With this change, an OpenIPC fh8626v100_lite image passes all five checks on the fh8626v100 machine. The 3.0.8 boards (fh8852v100, fh8856v100, fh8833v100) still get spi_flash.

The *v100 arm sent fh8626v100 the 3.0.8 kernels' spi_flash MTD id; its
kernel (fullhan-fh8852v200) names the flash spi0.0, so the mtdparts were
ignored and the board's built-in partitions mounted no root.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Use spi0.0 for FH8626V100 QEMU boot partitions

🐞 Bug fix 🕐 Less than 10 minutes

Grey Divider

AI Description

• Select FH8626V100’s kernel MTD ID so its flash partition layout is recognized.
• Preserve spi_flash for the 3.0.8 v100 boards.
Diagram

graph TD
  SOC["SoC name"] --> FH{"FH8626V100?"} -->|Yes| SPI["spi0.0"] --> PARTS["mtdparts argument"]
  FH -->|No| V100{"Other v100?"} -->|Yes| LEGACY["spi_flash"] --> PARTS
  V100 -->|No| SPI
Loading
High-Level Assessment

The exact-match override is the smallest appropriate fix for this boot test: it corrects FH8626V100 without changing the legacy v100 selection. Sharing MTD-ID selection with the separate flash-image script would broaden this PR’s scope.

Files changed (1) +1 / -0

Bug fix (1) +1 / -0
test-fullhan-boot.shSelect spi0.0 for FH8626V100 +1/-0

Select spi0.0 for FH8626V100

• Adds an exact SoC match ahead of the v100 suffix rule, so FH8626V100 passes its kernel’s spi0.0 MTD ID in mtdparts. Other v100 boards retain spi_flash.

qemu-boot/test-fullhan-boot.sh

@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 (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Generated FH8626V100 images miss their root partition ✓ Resolved
Description
The new fh8626v100 selection passes spi0.0, but fh-openipc-flash.sh still embeds spi_flash
in generated image boot arguments for every *v100 SOC. Booting a generated FH8626V100 image
through its stored bootargs therefore uses the wrong MTD master, leaving the intended partitions
unavailable to root=/dev/mtdblock3.
Code

qemu-boot/test-fullhan-boot.sh[48]

+    fh8626v100) MTDID=spi0.0 ;;        # 4.9.129, despite the suffix
Evidence
The changed script selects spi0.0 specifically for FH8626V100, while the companion image builder
independently generates mtdparts using spi_flash for all V100 SOCs. That builder's boot
arguments are consumed when the generated image is booted, so the new exception is not propagated to
a directly related path.

qemu-boot/fh-openipc-flash.sh[58-65]
qemu-boot/test-fullhan-boot.sh[48-54]
.github/workflows/ci.yml[1287-1311]
docs/fullhan.md[150-155]

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 boot test now treats `fh8626v100` as a 4.9 kernel whose flash MTD name is `spi0.0`, but `qemu-boot/fh-openipc-flash.sh` still maps every `*v100` SOC to `spi_flash`. Images generated for FH8626V100 retain the wrong `mtdparts` boot argument and can fail to mount the intended root partition.
## Fix Focus Areas
- qemu-boot/fh-openipc-flash.sh[59-62]
- qemu-boot/test-fullhan-boot.sh[48-50]
## Recommended Fix
Apply the same exact-match exception in `fh-openipc-flash.sh` before its wildcard `*v100` case, selecting `spi0.0` for `fh8626v100` and retaining `spi_flash` for the 3.0.8 V100 boards. Update the related comments and documentation to record the exception, and add FH8626V100 to the boot-test CI matrix so the generated-image and synthetic-kernel paths are validated.

ⓘ 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 thread qemu-boot/test-fullhan-boot.sh
It writes the mtdparts= into the generated image's U-Boot environment
and maps every *v100 SoC to spi_flash too, so an FH8626V100 image booted
from its own bootargs had the same unmountable root.
@dimerr

dimerr commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Qodo's finding is right, and the fix is in 4fe304c: fh-openipc-flash.sh gets the same fh8626v100 → spi0.0 arm ahead of *v100. I have not added it to boot-fullhan's matrix: that job boots the published openipc.<soc>-nor-lite.tgz, and there is none for fh8626v100 until OpenIPC/firmware#2714 is merged and released.

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

Copy link
Copy Markdown

Qodo's finding is right, and the fix is in 4fe304c: fh-openipc-flash.sh gets the same fh8626v100 → spi0.0 arm ahead of *v100. I have not added it to boot-fullhan's matrix: that job boots the published openipc.<soc>-nor-lite.tgz, and there is none for fh8626v100 until OpenIPC/firmware#2714 is merged and released.

Understood. Finding 1 is resolved by commit 4fe304c, which adds the fh8626v100 → spi0.0 exception in fh-openipc-flash.sh. Leaving fh8626v100 out of the boot-fullhan matrix is reasonable until openipc.fh8626v100-nor-lite.tgz is published after OpenIPC/firmware#2714.

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