Skip to content

v0.2.0-beta.17

Pre-release
Pre-release

Choose a tag to compare

@UniqueDroid UniqueDroid released this 31 Oct 18:27
· 12 commits to main since this release
9c87d9b

SMB 3 with signing about three times as fast (the crypto engine computes the signatures, #94), an SMB compatibility mode up to SMB 2.1, taking over disks with data from Alt-F or the D-Link firmware without erasing them, DNS-320 rev A no longer restarts in a loop after flashing (#96), and switching off by schedule finally works (#82). Plus a tidier interface: schedule overview with dates, an APPS tab in My ShareOS and a one-line header.

What's Changed

  • DNS-320 rev A: initramfs at 0x1000000 as on the DNS-325 (#96) by @UniqueDroid in #98
  • SMB compatibility mode (SMB 2.1) for faster signed transfers, AES in ARM assembly (#94) by @UniqueDroid in #99
  • Storage: take over disks with data (Alt-F, D-Link) instead of erasing them by @UniqueDroid in #100
  • SMB 3 signing through the Kirkwood crypto engine (CESA): 4-10 → 19-23 MB/s (#94) by @UniqueDroid in #101
  • Hardening: dns320l-daemon buffers, dns323-fw complete writes, flash-bin lock by @UniqueDroid in #102
  • crond reads /etc/crontabs – no ShareOS scheduled job ran (#82) by @UniqueDroid in #104
  • UI: Apps tab in Mein ShareOS, device name and access lower in System → Allgemein by @UniqueDroid in #106
  • Power schedule: show when the box comes on again, warn when off, 1-minute margin by @UniqueDroid in #105
  • docs: release 0.2.0-beta.17 by @UniqueDroid in #107

Full Changelog: v0.2.0-beta.16...v0.2.0-beta.17


  • SMB 3 with signing about three times as fast: the crypto engine computes the signatures (#94). Windows 11 signs every SMB connection, and on the 800 MHz Kirkwood the signature limited writing: measured on a DNS-320L, about 35 MB/s without signing (the disks), only 4–10 MB/s with SMB 3.1.1 – ksmbd computes AES-CMAC on the CPU, where AES manages about 12 MB/s. The Kirkwood has a crypto engine (Marvell CESA) that does AES-CBC at about 38 MB/s with DMA, but ksmbd could not use it. A kernel patch (0001-ksmbd-cmac-via-cbc) computes the AES-CMAC of messages from 8 KiB through cbc(aes) – the engine – (CMAC is a CBC-MAC; the last block and the subkeys on the CPU), checks the first result against the old way and falls back to it on any error. Measured: 19–23 MB/s signed, the CPU load of ksmbd went from about 64 % to under 10 %. shareos-shares loads marvell-cesa before ksmbd; module parameter ksmbd.cbc_cmac=0 switches it off. Tested before on a UML kernel with Samba's smbclient (signing required, checksums equal). Tried as well and dropped: AES-GMAC signing (GHASH in C on ARMv5 is not faster, 3–8 MB/s).
  • SMB compatibility mode (Freigaben → Dienste → SMB → Kompatibilitätsmodus (höchstens SMB 2.1), off by default) for devices that have trouble with SMB 3: limits ksmbd to SMB 2.1 (HMAC-SHA256 signature on the CPU, 9–14 MB/s signed; no encryption, no multichannel). Changing it restarts ksmbd (the protocol range is only read at start); a ksmbd.mountd left over without the kernel module is restarted instead of being taken for a running SMB server. The kernel also has AES in ARM assembly now (CONFIG_CRYPTO_AES_ARM). tests/test-users.sh checks the setting.
  • Take over disks with data instead of erasing them. Speicher → Laufwerke shows „ übernehmen“ at every partition (or RAID array) with a file system ShareOS does not know yet – the data disks of Alt-F or the D-Link firmware. It becomes a volume as it is: nothing is erased, ext4 gets the quick check and the quota feature as every volume, the first Linux volume becomes the apps area, RAID 1/0/linear arrays get their layout and go into mdadm.conf. Before, only the setup wizard was offered, which erases the disks (asked by a tester right after switching from Alt-F). shareos-storage adopt <name> <partition>, rpcd shareos.storage adopt; tests/test-storage.sh (+4 checks). SWITCHING/UMSTIEG explain it, with the SSH commands for older versions.
  • DNS-320 rev A: no more reboot loop after flashing (#96). The stock U-Boot copies the initramfs to its load address before the kernel starts; on the DNS-325 0x800000 lies in memory the kernel uses, so the kernel dropped the initramfs, found no /init and restarted every minute (fixed for the DNS-325 in 0.2.0-beta.9). The DNS-320 rev A – the same SoC (88F6281) and U-Boot family – showed the same kind of loop (LEDs on, restart about every minute, no network), so its initramfs is now loaded at 0x1000000 as on the DNS-325. A box already in the loop needs a serial console once to start the new image from RAM (see the issue). tests/check-initrd-address.sh checks the new address.
  • Scheduled jobs did not run at all (#82). BusyBox crond reads <dir>/crontabs, and buildroot's busybox config sets the dir to /etc/cron – while shareos-cron writes root's crontab to /etc/crontabs/root. So crond saw an empty /etc/cron/crontabs, and none of the ShareOS jobs ran: the scheduled switch-off (reported: the box switched on by schedule but not off), the hourly wake-up alarm, the message checks every 10 minutes, automatic updates, scheduled SMART tests, cloud jobs, Paperless inboxes, app tasks, the Zabbix collector. Running a job by hand always worked, which hid it. CONFIG_FEATURE_CROND_DIR="/etc" now, and post-build.sh stops the build if crond would read another directory. On a box before beta.17: rm -rf /etc/cron/crontabs; ln -s /etc/crontabs /etc/cron/crontabs; /etc/init.d/S50crond restart.
  • Power schedule: you see when the box comes on again. The schedule is a short overview first (the days with their times, next switch-on/-off, aktiv/aus) with Einrichten/Bearbeiten; the table only opens on that button. The page shows the next switch-on and switch-off with the full date; saving says "the box switches on on Sat., 07.11.2026, 10:15" (or that none is planned); the power-off dialog says when the schedule switches it on again. Times entered while the switch Zeitplan einschalten is off get a clear warning (easy to miss before). The switch-on must now be only one minute ahead (was three) when you save or switch off – the alarm counts whole minutes and the MCU cuts the power 3 s after the shutdown; before, a test like "on at 10:15, switch off at 10:13" silently set the alarm for the next week. tests/test-power.sh updated.
  • Interface: Mein ShareOS has its own tab APPS with all apps of the user (star = favourite); the start page keeps only the favourites at the top (FAV APPS). System → Allgemein: device name and access (root password) moved down, between App & Widgets and Über (section GERÄT & ZUGANG).
  • Header stays on one line. The status chips (messages, update, VPN, apps …) use the free room left of ONLINE; the ones that do not fit go behind a small +N button (amber when a warning is among them), which opens them as a list under the row – the header keeps its height and the clock stays on the right. The MELDUNG chip no longer counts the “update available” message while the UPDATE chip is shown (it counted the same thing twice; the message stays under System → Meldungen and still goes out by mail/push).
  • Hardening after an external code review (static analysis by another AI, checked against the code; the suggested patch was not taken over as it was, because it only moved one overflow into the next buffer). dns320l-daemon: the arguments of a -x command were assembled into 64 bytes with sprintf and copied into 512-byte messages with strcpy – now at most 256 bytes, snprintf, refused when too long (a heap overflow before, shown with AddressSanitizer); the command name is checked against its 64 bytes; the answer of the daemon is read with room for the terminating zero (one byte past the buffer before); write_str_to_file writes the string as it is instead of through a 64-byte copy, and completely. dns323-fw: complete writes (write_all), the disabled size check is documented (damaged files fail the checksums). shareos-flash-bin: one firmware write at a time (lock with the pid; a stale one is taken over). All of this was only reachable locally as root (the daemon listens on a root-only Unix socket) – nothing changes in how fan, LEDs and MCU are driven. tests/test-flash-bin.sh +2 checks.