Skip to content

nt98566_lite_xm-ivg-n8s: the split NOR layout - #299

Merged
openipc-ai merged 1 commit into
masterfrom
ivg-n8s-split
Dec 5, 2026
Merged

openipc-ai merged 1 commit into
masterfrom
ivg-n8s-split

Conversation

@openipc-ai

Copy link
Copy Markdown
Contributor

nt98566_lite_xm-ivg-n8s (#279) copied firmware's nt98566_lite defconfig a few days before OpenIPC/firmware#3049 moved the NT98566 NOR boards to the split layout, so it still builds the fixed-slot image. It is the only 8 MB NOR profile here not on the split layout.

This adds the two lines #3049 gave nt98566_lite:

  • BR2_ROOTFS_POST_IMAGE_SCRIPT=…/post-image-split.sh: the uImage, then the squashfs at the next 64 KiB, bounded only as a whole (7616K on this chip's 8 MB layout).
  • BR2_OPENIPC_NOR_KERNEL_READ_SIZE=0x3B0000: OpenIPC's Novatek U-Boot reads the kernel for the size its layout scan finds, and its published builds scan only up to 0x400000.

With these, the defconfig is firmware's nt98566_lite again, apart from the board's comment.

The owner's camera runs firmware's nightly nt98566_lite layout, which is already split since #3049. Per #3049, the published Novatek U-Boot boots this image, and sysupgrade --archive with the split package moves a camera off the fixed layout. So this board gets the same move its firmware nightly made.

ci-matrix.py --self-test: ok (152 devices). CI builds this one device.

The profile copied firmware's nt98566_lite before OpenIPC/firmware#3049
moved it to the split layout, and so still built the fixed-slot image.
It now packages with post-image-split.sh and reads the kernel for 0x3B0000,
as firmware's nt98566_lite does, so OpenIPC's Novatek U-Boot (which scans
only up to 0x400000) boots it.
@qodo-free-for-open-source-projects

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

Copy link
Copy Markdown

PR Summary by Qodo

nt98566_lite_xm-ivg-n8s: move to split NOR layout

⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Packages the image with post-image-split.sh, matching firmware's nt98566_lite split layout.
• Sets BR2_OPENIPC_NOR_KERNEL_READ_SIZE=0x3B0000 so Novatek U-Boot's layout scan stays below
 0x400000.
• Adds a comment explaining the read-size constraint; no other defconfig lines change.
Merge Risk 🟡 Medium

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The changed configuration directly controls the generated uImage/squashfs layout consumed by this board's Novatek bootloader; no other device configuration uses the new boundary symbol, so this is one bounded board firmware integration.
Sources

devices/nt98566_lite_xm-ivg-n8s/br-ext-chip-novatek/configs/nt98566_lite_xm-ivg-n8s_defconfig[71-76]

BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh"
# OpenIPC's Novatek U-Boot reads the kernel for the size its layout scan
# finds (the uImage up to the squashfs), not a fixed 2 MiB slot. Its
# published builds scan only up to 0x400000, so the squashfs, and with it
# the uImage's end, has to start below that for them to boot the image.
BR2_OPENIPC_NOR_KERNEL_READ_SIZE=0x3B0000
Behavioral complexity 🟡 Medium 🧩 Compatibility cases, Coordinated invariants

  • Before, the target used the generic image-generation configuration without an explicit bootloader scan boundary.
  • After, image generation invokes post-image splitting and publishes a 0x3B0000 kernel-read limit.
  • New correctness conditions are that the kernel and squashfs placement remain below the bootloader's supported scan range and that the split artifacts remain mutually consistent.
  • This introduces compatibility with an existing Novatek U-Boot layout and a coordinated image-size invariant; the change does not by itself add runtime concurrency or a new algorithm.
Sources

devices/nt98566_lite_xm-ivg-n8s/br-ext-chip-novatek/configs/nt98566_lite_xm-ivg-n8s_defconfig[71-76]

BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh"
# OpenIPC's Novatek U-Boot reads the kernel for the size its layout scan
# finds (the uImage up to the squashfs), not a fixed 2 MiB slot. Its
# published builds scan only up to 0x400000, so the squashfs, and with it
# the uImage's end, has to start below that for them to boot the image.
BR2_OPENIPC_NOR_KERNEL_READ_SIZE=0x3B0000
Potential damage 🟡 Medium 🩹 Temporary loss

  • If the generated layout violates the target bootloader's scan assumptions, the camera may fail to boot or accept the firmware until a compatible image is reflashed.
  • The source supports the boot-layout dependency, but the external splitter's exact safeguards are not available here.
  • Reflashing a known-compatible image can restore operation; reverting the configuration stops future bad builds but does not repair a device already flashed with an unusable image.
Sources

devices/nt98566_lite_xm-ivg-n8s/br-ext-chip-novatek/configs/nt98566_lite_xm-ivg-n8s_defconfig[71-76]

BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_GENERAL_PATH)/scripts/post-image-split.sh"
# OpenIPC's Novatek U-Boot reads the kernel for the size its layout scan
# finds (the uImage up to the squashfs), not a fixed 2 MiB slot. Its
# published builds scan only up to 0x400000, so the squashfs, and with it
# the uImage's end, has to start below that for them to boot the image.
BR2_OPENIPC_NOR_KERNEL_READ_SIZE=0x3B0000
Assessed commit 8e45152
Diagram

graph TD
  A["nt98566_lite_xm-ivg-n8s defconfig"] --> B["post-image-split.sh"] --> C["uImage kernel"] --> E[("NOR flash 8 MB")] --> F["U-Boot reads 0x3B0000"]
  B --> D["squashfs at next 64 KiB"] --> E
Loading
High-Level Assessment

The PR mirrors the two options firmware's nt98566_lite already uses, so this device follows the same layout as the shared profile. The chosen value 0x3B0000 keeps the read within the 0x400000 scan limit the PR describes; I did not verify whether other values would also work. A shared defconfig fragment for NT98566 split-layout boards would reduce drift, but that is a broader refactor outside this PR. The per-device copy is acceptable for a two-line change.

Files changed (1) +6 / -0

Other (1) +6 / -0
nt98566_lite_xm-ivg-n8s_defconfigSwitch to split NOR packaging and set kernel read size +6/-0

Switch to split NOR packaging and set kernel read size

• Adds BR2_ROOTFS_POST_IMAGE_SCRIPT pointing to post-image-split.sh, replacing the fixed-slot image this profile built before. Adds BR2_OPENIPC_NOR_KERNEL_READ_SIZE=0x3B0000 with a comment explaining that Novatek U-Boot's scan only goes up to 0x400000.

devices/nt98566_lite_xm-ivg-n8s/br-ext-chip-novatek/configs/nt98566_lite_xm-ivg-n8s_defconfig

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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can open the rule or relationship behind a finding in one click

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai
openipc-ai merged commit eba4e0e into master Dec 5, 2026
7 checks passed
@openipc-ai
openipc-ai deleted the ivg-n8s-split branch December 5, 2026 13:03
igorssv pushed a commit to igorssv/builder that referenced this pull request Dec 5, 2026
The profile copied firmware's nt98566_lite before OpenIPC/firmware#3049
moved it to the split layout, and so still built the fixed-slot image.
It now packages with post-image-split.sh and reads the kernel for 0x3B0000,
as firmware's nt98566_lite does, so OpenIPC's Novatek U-Boot (which scans
only up to 0x400000) boots it.
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