openwrt/target/linux/mvebu
Daniel Golle 3f7637b050 mvebu: add support for Synology DS213j
The Synology DS213j is a rather dated dual-bay SATA NAS based on on the
Marvell Armada-370 SoC. It has long been supported in vanilla Linux,
however, flash partitioning there didn't match with reality (ie. the
bootloaders expectations) and nobody cared to wrap up OpenWrt support
for the device.

CPU: Marvell Armada-370 ARMv7 SoC @ 1200 MHz
RAM: 512 MB DDR3
Flash: 8 MB (Micron Technology N25Q064)
Network: 1x 1000M/100M/10M Ethernet (Marvell 88E1510)
SATA: 2x 3.0Gbps
USB: 2x USB 2.0

As OS options are becoming limited on that still quite useful hardware,
patch the flash partitions to be able to get the most out of it when
using OpenWrt.

The vendor firmware loads kernel and initrd from fixed addresses in
the flash, not making use of a modifyable environment stored in flash
which is stored at a location right in the middle of the vendor's
zImage partition (at 0x100000).

Stock firmware flash layout:

0x000000 ~ 0x0c0000 : "RedBoot" (actually U-Boot)
0x0c0000 ~ 0x390000 : "zImage"
0x390000 ~ 0x7d0000 : "rd.gz"
0x7d0000 ~ 0x7e0000 : "vendor" (contains MAC address, serial no)
0x7e0000 ~ 0x7f0000 : "RedBoot Config" (unused? legacy left-over)
0x7f0000 ~ 0x800000 : "FIS directory" (unused? legacy left-over)

OpenWrt flash layout:

0x000000 ~ 0x0c0000 : "u-boot"
0x0c0000 ~ 0x100000 : "gap"
0x100000 ~ 0x110000 : "u-boot-env"
0x110000 ~ 0x7d0000 : "kernel"
0x7d0000 ~ 0x7e0000 : "vendor" (contains MAC address, serial no)
0x7e0000 ~ 0x800000 : "gap2"

"kernel", "gap" and "gap2" are concatenated using the mtd-concat
virtual MTD driver, resulting in a partition "firmware" used by
OpenWrt for kernel, rootfs and rootfs-overlay, 0x720000 (7296kiB) in
total.

Installation:
1. Connect to internal serial console port and Ethernet port,
   providing a TFTP server at a static IPv4 address, e.g.
   192.168.1.254/24.
2. Interrupt bootloader using CTRL+C
3. Configure bootloader to load OpenWrt on future boot:
   setenv bootcmd "bootm f4110000"
   saveenv
4. Load and boot initramfs image via TFTP:
   setenv ipaddr 192.168.1.1
   setenv serverip 192.168.1.254
   tftpboot openwrt-mvebu-cortexa9-synology_ds213j-initramfs-kernel.bin
   bootm
5. Use sysupgrade to load final image.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-20 13:24:06 +00:00
..
base-files/lib/preinit mvebu: switch to generic sdcard upgrade method 2021-08-07 01:43:39 +03:00
cortexa9 mvebu: add support for Synology DS213j 2023-11-20 13:24:06 +00:00
cortexa53 mvebu: eDPU: add support for version with external switch 2023-09-19 12:12:17 +02:00
cortexa72 mvebu: cortexa72: enable USB PHY 2023-09-08 23:49:00 +02:00
files/arch mvebu: add support for IIJ SA-W2 2023-10-31 14:02:01 +01:00
image mvebu: add support for Synology DS213j 2023-11-20 13:24:06 +00:00
patches-5.15 mvebu: add support for Synology DS213j 2023-11-20 13:24:06 +00:00
patches-6.1 mvebu: add support for Synology DS213j 2023-11-20 13:24:06 +00:00
config-5.15 mvebu: refresh the 5.15 kconfigs 2022-08-16 22:38:46 +01:00
config-6.1 mvebu: refresh 6.1 configs 2023-09-08 23:49:00 +02:00
Makefile mvebu: add kernel 6.1 as testing kernel 2023-08-02 16:21:19 +02:00
modules.mk kernel: add kmod-leds-turris-omnia 2022-06-24 09:18:03 +02:00