Repository navigation
Conversation
|
Preview of the website obtained from the PR: https://b08a5b9a.hack-gpon-preview.pages.dev |
|
Preview of the website obtained from the PR: https://3afb09bb.hack-gpon-preview.pages.dev |
|
Preview of the website obtained from the PR at ce0575f: https://1314bd95.hack-gpon-preview.pages.dev Always the latest preview of this PR: https://pr-522.hack-gpon-preview.pages.dev |
|
Sorry for the late reply, I have been very busy with work lately. Thanks for the review! I tested both Why
|
| Sender | Time | Retries | Reported size | Clean return to FALCON => |
RAM CRC32 |
|---|---|---|---|---|---|
ymodem.js (this PR) |
571 ms |
0 |
0x000009c4 (2500 B, exact) |
Yes | c7335ce6 (exact) |
xymini.js (main) |
10,156 ms |
3 |
0xc00 (3072 B, padded; no Total Size) |
No (stuck emitting 06 43 until CAN) |
N/A |
Sharing code with xymini.js
Since rootLantiq.js (Huawei MA5671A) is the only current caller of xymini.js, there are two clean options:
- Option A: Keep
ymodem.jsseparate in this PR soxymini.jsand the Huawei flow stay untouched, then migraterootLantiq.jsonto the shared sender in a follow-up PR after testing on Huawei hardware. - Option B: Export
sendYmodemfromxymini.jsalongside the existingsendXYMiniexport in this PR (keepingrootLantiq.jsunchanged).
Let me know which option you prefer.
Physical hardware validation completed + fix pushed
I also completed full end-to-end validation on a real Nokia G-010S-A using the supported 2026-08-14 image (4,456,683 bytes, SHA-256 5c0d6853645d72748cf844f9e64fc57c38924cc7938ef14a40a827015bbc1248) and pushed a fix (481ed1a) for a real-hardware bug caught during the test:
- Fixed
help <cmd>capability check: Real Nokia U-Boot prints aUsage:section on successfulhelp loady,help sf, andhelp crc32, which trippedcommandFailed()ininspectDevice(). Fixed innokiaFirmware.jsand updated the mock intests/nokiaFirmware.test.js(134/134tests andnpm run buildpass). - Full
flashNokiaFirmware(..., { bootMode: 'trial' })run: Completed in435.0 s(11,319 B/sYMODEM throughput), with full 6 MiB readback + erased-tail CRC32 verification and 698-byteselect_imagemigration + readback +saveenv. Both the protected Slot 0 (0x0c0000..0x6bffff, CRC327a2202fe) and tail partitions (0xcc0000..0xffffff, CRC326ac3329e) remained byte-for-byte unchanged. - Boot, trial fallback, and default slot verified: Verified automatic fallback to Slot 0 with
boot_failreset by the migratedselect_image, committed Slot 1 boot (0x6c0000,lct02.5G HSGMII up, ping 0% loss, Dropbear SSH:22and HTTP:80reachable,onu vig9.90.6.1,onu ploamsgcurr_state=1), and idempotentenableNokiaSerialon live U-Boot.
Once you confirm Option A vs Option B, I can adjust the module layout if needed and mark this PR ready for review.
|
Ok, top |
|
Preview of the website obtained from the PR at 481ed1a: https://70f275a2.hack-gpon-preview.pages.dev Always the latest preview of this PR: https://pr-522.hack-gpon-preview.pages.dev |
Why this is needed
Following #518, G-010S-A has a dedicated browser UART-console helper, but it still needs its own firmware-writing procedure. YMODEM itself is usable on Nokia; the Huawei rooting flow, flash map and boot-selection assumptions cannot be reused.
The existing Huawei layout uses image 0 at
0x0c0000with length0x740000, and image 1 at0x800000with length0x800000. Nokia uses two0x600000slots at0x0c0000and0x6c0000, followed by persistent partitions from0xcc0000. Applying the Huawei erase ranges to Nokia would erase part of the other image, or the configuration/identity partitions.What this adds
/ont-nokia-g-010s-a-ymodempage and Vue component, linked from the Nokia page and the Huawei YMODEM warning.FALCON =>challenge, exact inspected U-Boot build, known boot scripts and slot map, valid committed/trial state, UART settings, RAM bounds, required commands and 16 MiB SPI flash.resetorbootmis sent.The original committed image, bootloader and Nokia configuration/calibration regions are preserved by the flash procedure. Firmware first-boot behaviour may still change configuration. Saved
c_imgis not used to infer which slot to protect; ambiguous or pending trial states are rejected. Device state is rechecked after review and after the long transfer. Each important command requires a fresh success marker, and all activation values are read back beforesaveenv.Cancellation after erase/write or after environment mutation produces an explicit uncertain-state error, not a success or an ordinary cancellation. A received bad-environment CRC warning also blocks both Nokia tools.
Firmware evidence
Three supplied model-specific images were inspected. Each is 4,456,683 bytes (
0x4400eb), has valid uImage and fwtool CRCs, and a successfully decompressed root filesystem:5c0d6853645d72748cf844f9e64fc57c38924cc7938ef14a40a827015bbc12481a7a582e20d0605c1b1d7159b5473dc77a42b79a2b5ad0ce9a8c7b5356c756f2d7c047e07912619c29896db627365cc7fcb20cbe5fa2d736a976b5b16908aa46Their kernel/header bytes are identical (SHA-256
f1a9b5da90ed7ee6cdcf2313d5e2dabf138ccf677c4deec03d008a663c8ac61d), and all advertise genericSFPmetadata. Eleven root-filesystem paths differ, including hardware/optics and upgrade handling. A filename or generic uImage header therefore cannot establish model compatibility. The new validator accepts the inspected Nokia file and rejects both actual Huawei/Alcatel files, including renamed copies.The initial supported image is deliberately limited to that Nokia SHA-256 and the exact
U-Boot 2015.04-lantiq-gpon-1.3.6.1 (Feb 07 2018 - 17:12:06)build with a known legacy or migrated boot profile. Structural validity alone does not add support for other stock/custom images.The supplied Nokia backup comprises overlapping MTD exports. Its non-overlapping regions reconstruct the 16 MiB map; both saved environment records have valid CRCs.
rootfs/rootfs_datamust not be concatenated as additional physical partitions. No private dump, identifiers, passwords, calibration, firmware binaries or extracted filesystems are included in this PR.Independent public samples
These artifacts were downloaded and compared as binary data:
df1dc75189a73b79b0051701d3ad5610fa725cbc999e00afc792f54563d84bf4. Both environment CRCs are valid and directly establish the0x740000/0x800000slot allocation.mtd2:0x740000bytes, SHA-2568ddf47bf45715ce316a6bad84b28e1fc76c6a1d51573575092c5cc3f9b5cfeda;mtd5:0x800000bytes, SHA-25612132f28b803f29624d37d6e99fe06ff0621192b62fa712dd650b2a5c6fab4bb. These are rooted partition dumps, not a full factory SPI backup.0x600000slot, SHA-256ed6fe3cb46465c55348a5ed3c0f3aafea1bdf51a3717ca1796059991e7232ba1; also matched an independently published copy. The BFGB21 owner attachment likewise contains one 6 MiB slot, not a full MTD collection.mtd0, SHA-256c6c461ede9f5d9f3fd8117452a0e9c97e01bb29be40a9e4a2df4e9d39216a837. The 2017 build differs and is not accepted.select_imageis exactly identical to the supplied module's, including whitespace; SHA-256 of that value is4c24a9dbefbc32b5f56e4b8e64d2765bc75998ac4d823a827b11b2eb0f63c786. A different codekow environment variant is not treated as the same profile.An independent full 16 MiB Huawei or Nokia SPI dump was not obtained. The evidence above should not be described as three complete factory dumps. Public filenames were also checked against contents: a Huawei image labelled “Official” matches the known rooted mtd5, and a file named
uboot_env.binis actually the1224ABORTrecovery executable, not saved environment data.Why the boot-script migration matters
Static inspection of the matching Nokia loader shows that its
bootmpath increments and savesboot_fail, and can switch/mark an image invalid at the failure threshold. Resetting the counter once is insufficient.The supported Nokia image's
/lib/upgrade/common.sh(SHA-25651f4a401e9c60025d641f95cb394473c2de2ec1b962b8b1cda2242605af5b054) migrates selection tocommitted_imageand resetsboot_failon each normal boot. This migration normally runs in Linux sysupgrade; it is not automatically applied by first boot after a raw UART write.For trial/default activation, this tool applies those exact reviewed settings only after flash readback succeeds. It does not invoke a second sysupgrade that could overwrite the previous slot. Quoted assignments preserve literal
${...}expressions; the complete command plus acknowledgement marker is checked against the inspected bootloader's input limit. Staging leaves environment and boot scripts unchanged.Validation and remaining work
node --test --test-reporter=spec tests/*.test.js).npm run buildpassed on Node 22.23.4, including static rendering and image optimisation.git diff --checkpasses.Draft: end-to-end validation on a physical G-010S-A is still pending. Static binary analysis and simulated serial tests establish the implementation's intended behaviour, not a successful hardware flash. The page states this limitation. The remaining validation is a real transfer/readback and cold boot of the new image, verification of UART/network/GPON access, and trial/default-selection behaviour on the supported loader/profile.