I started working on support for the aforementioned NAS. My tree is here: https://github.com/Leo-PL/openwrt/tree/synology_ds211j
CPU: Marvell Kirkwood 88F6281 A1 @ 1.2GHz RAM: 128MB Samsung K4T1G164QE-HCF7 DDR2 (16-bit) @ 800MHz Flash: 4MB ST M25P32V6P SPI-NOR Storage: Two internal, fixed 3,5" SATA 3Gbps bays Network: Single rear Gigabit Ethernet port through Marvell 88E1116R PHY USB: Two rear and one front USB 2.0 ports through onboard Genesys Logic GL805G hub RTC: Ablic S-35390A I2C RTC Console: 3.3V TTL serial port at ttyS0 Embedded controller: Microchip PIC16F627A at ttyS1, running Synology firmmware.
The main difference from all other Kirkwood NASes I've encountered is, that this device uses only 4MB SPI-NOR Flash for booting, which holds U-boot, kernel and (stock) initramfs. Primary root filesystem lives on the HDDs on this line of devices. This 4MB is not enough to store OpenWrt installation by any means, and I'm trying to figure out the best way to boot the device.
There is upstream support in U-boot (under
ds109 target) as well as in Linux, including a device tree. Stock U-boot can only boot the kernel from TFTP or SPI. Upstream U-boot boots the device from USB by default using
fatload, however in OpenWrt, drivers for neither SATA controller nor USB storage are built into the kernel on
kirkwood target. They are not included in
DEFAULT_PACKAGES either, so initramfs won't be able to mount the storage either.
I'm trying to figure out how to proceed - currently, re-enabling one of those modules is the only thing that comes to my mind, as the initramfs has way different purpose in OpenWrt than in stock firmware, but maybe there is a better way? My initial idea was to borrow the booting scheme from
imx target with the
imx_sdcard method and perform installation on external USB drive, which would leave the internal HDDs free to use with any layout.
Currently, I think that whether upstream U-boot is chainloaded by stock one, or replaced entirely, is orthogonal to that and not an issue - if installation of the image is possible on SATA drive, the kernel should be loadable from the disk as well, to avoid the kernel size limitation in flash - there are 3328kB available for kernel and initramfs total in flash.
Ideas? Chiming in @CHKDSK88 as one of main