Skip to content

DNR-322L rev A: first build (#180) - #181

Open
UniqueDroid wants to merge 10 commits into
mainfrom
feature/dnr322l
Open

UniqueDroid wants to merge 10 commits into
mainfrom
feature/dnr322l

Conversation

@UniqueDroid

@UniqueDroid UniqueDroid commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

First build for the D-Link DNR-322L rev A – a tester with two units (A2) came forward in #180.

Based on main after 0.3.0-beta.14 – it goes into 0.3.0-beta.15 (its CHANGELOG line is in that section now). Merge only after the first boot on a DNR-322L.

What the box is

The board of the DNS-320 rev A ("2 Bay NAS REV-A1") sold as a network video recorder: same SoC (88F6281), LEDs dns320:*, gpio-fan, temperature through the second serial port, gpio-poweroff. From the tester's unit under Alt-F 1.0.1: 256 MB RAM (not 128, as the list said), and this flash layout:

mtd3: 04600000 "image"          70 MB (DNS-320L: 100 MB)
mtd4: 00a00000 "mini firmware"
mtd5: 00500000 "config"
mtd6: 00200000 "my-dlink"
mtd7: 01e00000 "nuuo package"   30 MB, after "image"

What changes

  • board/dlink/dns320l/dts/kirkwood-dnr322l.dts: on top of the kernel's kirkwood-dns320.dts, model D-Link DNR-322L-rev-Ax NAS, the partitions above in the order Alt-F has them (after its kirkwood-dnr322l-a.dts). Compiled here with dtc against the includes of 6.18.58.
  • post-image.sh: DNR-322L-rev-Ax, signature 1 8 2 1 1 8 (DNR-322, from legacy/alt-f/mkfw.sh), initramfs at 0x01000000 like the DNS-325 and the DNS-320 rev A (same U-Boot family).
  • board.sh: *DNR-322L* – control mcu-temp, kernel RTC, the LEDs and the power-back GPIO of the DNS-320 rev A; BOARD_RAM_SMALL=0.
  • shareos-install-ubi: accepts an image of 0x04600000 and gives the rootfs volume 32 MB there instead of 48, so that about as much is left for rootfs_data. The NUUO partition is not touched – everything is found by name.
  • tests/test-boards.sh, tests/test-flash-bin.sh; docs/DEVICES.md / GERAETE.md; CHANGELOG.md.

The initramfs address – cause found

Read from the files, not measured on the box (analysis by Jan; the kernel size is checked against the artifact of this pull request):

kernel unpacked in RAM from 0x8000 to
Alt-F 1.0 (4.4.86) 4.9 MB 0x4d9200
ShareOS (6.18.58) 9.3 MB (9,763,200 bytes) 0x957980, with BSS about 0x9a0000

The stock U-Boot of the DNR-322L A2 (Marvell 3.4.14) runs nand read.e 0xa00000 0x100000 0x300000; nand read.e 0xf00000 0x600000 0x300000; bootm 0xa00000 0xf00000, and bootm copies the ramdisk to the load address of its header. Alt-F uses 0x800000 on every model, which is free above its small kernel. Our kernel covers 0x800000 itself – that is the "INITRD … overlaps in-use memory region" of the DNS-325 and the reboot loop of #96. 0x1000000 is above the kernel and above what its decompressor takes behind it (to about 0xc00000); the ramdisk ends at 0x1300000 at most, of 256 MB.

The comment in post-image.sh and docs/DEVICES.md / GERAETE.md say so now. Why the DNS-320L boots with 0x800000 and the same kernel is concluded (its U-Boot 3.6.0 cannot be copying the ramdisk there), not measured; nothing is changed for it here.

Not tried on hardware

Nothing of this has run on a DNR-322L. The address is well founded now, but only a boot shows it: the first test starts the build from RAM over TFTP on the serial console (tftpboot 0xa00000 uImage; tftpboot 0xf00000 urootfs; bootm 0xa00000 0xf00000), which takes the same path as the start from flash and writes nothing.


Generated by Claude Code

The board of the DNS-320 rev A sold as a network video recorder. Device
tree kirkwood-dnr322l.dts on top of the kernel's kirkwood-dns320.dts with
the flash layout of the box (read from a DNR-322L A2 under Alt-F: image
70 MB, nuuo package 30 MB, then mini firmware, config, my-dlink), D-Link
signature 1/8/2/1/1/8 ('DNR-322'), initramfs at 0x1000000 like the other
88F6281 boards. board.sh: the DNS-320 rev A's control, LEDs and buttons.
shareos-install-ubi accepts the 70 MB 'image' and gives the system 32 MB
of it. Not tried on hardware.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sb3gb1FHs6DNkZHKinKAJv
The check took the model from the file name by cutting at '-DNS' and
expected 0x800000 for every model it did not list, so the new bundle
failed it. The model name is read from the end of the file name now and
the DNR-322L is listed with the address of the DNS-320 rev A.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sb3gb1FHs6DNkZHKinKAJv
The unpacked kernel is 9.3 MB (0x8000..0x957980, measured on the uImage
of this branch) and covers the address Alt-F loads its initramfs to;
Alt-F's own kernel ends at 0x4d9200. U-Boot 3.4 (DNS-325, DNS-320 rev A,
DNR-322L) copies the ramdisk to the load address of its header. Comment
in post-image.sh and the device docs say so; nothing changes in the
images.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sb3gb1FHs6DNkZHKinKAJv
Its CHANGELOG line goes to the new section, the device tables say
'built from 0.3.0-beta.15'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sb3gb1FHs6DNkZHKinKAJv
@UniqueDroid
UniqueDroid marked this pull request as ready for review November 19, 2026 20:05

@UniqueDroid UniqueDroid left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Review – DNR-322L rev A: first build (head 6993676)

Own PR, so comment only. Looks good to merge from the code side; the remaining risk is the untested hardware, which the CHANGELOG and docs state clearly.

Checked

  • CI green: firmware (dns320l) (incl. check-initrd-address.sh on the bundles), backend-tests, static-analysis, CodeQL.
  • Locally on the PR head: tests/test-boards.sh 21/21, tests/test-install-ubi.sh 5/5, tests/check-acl.py, tests/check-i18n.py (9 languages OK), node tests/check-i18n-coverage.js (0 untranslated). test-flash-bin.sh needs a built output/ and was skipped here.
  • Flash layout in kirkwood-dnr322l.dts is contiguous and ends at 128 MB: image 0xb00000+0x4600000 → nuuo 0x5100000+0x1e00000 → mini firmware 0x6f00000+0xa00000 → config 0x7900000+0x500000 → my-dlink 0x7e00000+0x200000. Image size 0x4600000 = 73400320 = Alt-F's xtra_image_max for the DNR-322L.
  • D-Link header 1 8 2 1 1 8 matches legacy/alt-f/mkfw.sh (DNR322L row); *DNR-322L* comes before *DNS-320* in board_detect, and the model string does not contain DNS-320, so no mis-detection.
  • The new comment on the initramfs address (kernel itself covers 0x800000) is a clear improvement.

Suggestions (non-blocking)

  1. Test for the new partition size. tests/test-install-ubi.sh covers 0x06400000 and 0x06600000 but not the new 0x04600000, nor the 32 MiB volume:
    mtd 04600000; run
    check "DNR-322L (0x04600000): size accepted" "! grep -q 'unexpected size' $T/out && grep -q 'missing' $T/out"
    (The 32 MiB branch is only reached with a real image file; a check with a small dummy file and a stub ubiformat would cover it, if worth it.)
  2. Memory node name. The new DTS adds memory { … } while kirkwood-dns320b.dts uses memory@0. If the included kirkwood-dns320.dts names its node differently, the DTB ends up with two memory nodes (dtc only warns). ATAGs win anyway, but a quick look avoids surprises: dtc -I dtb -O dts output/dns320l/images/kirkwood-dnr322l.dtb | grep -A2 memory.
  3. Nit: the header comment of usr/lib/shareos/board.sh (L9, list of BOARD_ID values) does not mention dnr322l yet.
  4. CLAUDE.md's test list does not mention test-install-ubi (pre-existing, unrelated to this PR).

Generated by Claude Code

From the review of #181:
- test-install-ubi: the size 0x04600000 is accepted, and with stub flash
  tools the rootfs volume is 48 MiB on the DNS-320L and 32 MiB on the
  DNR-322L, rootfs_data takes the rest (fails without the 32 MiB rule)
- the memory node stays 'memory': kirkwood-dns320.dts names it so, the
  compiled tree has one node with 256 MB; a comment says why
- board.sh lists dnr322l among the BOARD_ID values; CLAUDE.md lists
  test-install-ubi

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sb3gb1FHs6DNkZHKinKAJv

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