openwrt/target/linux
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
..
airoha kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
apm821xx apm821xx: WNDR4700: fix broken sysupgrade, factory images 2023-10-20 18:13:57 +02:00
archs38 treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
armsr x86,armsr: interpolate GRUB_SERIAL into /etc/inittab 2023-11-19 17:33:37 +01:00
at91 treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
ath25 kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
ath79 ath79: use "fixed-layout" for Embedded Wireless devices 2023-11-15 07:14:32 +01:00
bcm27xx kernel: bump 6.1 to 6.1.61 2023-11-03 13:02:30 +01:00
bcm47xx kernel: bump 5.15 to 5.15.133 2023-10-04 21:03:12 +02:00
bcm53xx bcm53xx: refresh kernel config for 6.1 2023-11-06 13:25:59 +01:00
bcm63xx kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
bcm4908 kernel: bump 5.15 to 5.15.137 2023-10-27 19:43:06 +01:00
bmips kernel: bump 6.1 to 6.1.60 2023-10-26 12:08:52 +02:00
gemini gemini: usb-fotg210: remove uneeded dependency on @USB_SUPPORT 2023-11-08 22:01:44 +01:00
generic kernel: 6.1: Add missing config option DEVTMPFS_SAFE 2023-11-19 16:43:07 +01:00
imx kernel: backport NVMEM patches queued for the v6.5 2023-06-16 09:45:38 +02:00
ipq40xx ipq40xx: wpj428: switch to zimage to fit kernel partition 2023-10-20 18:13:57 +02:00
ipq806x ipq806x: fix wrong LEDs mode for non-standard qca8k LEDs 2023-11-15 01:23:03 +01:00
ixp4xx ixp4xx: Add USRobotics USR8200 support 2023-10-25 11:29:29 +02:00
kirkwood kirkwood: add support for Iomega Storcenter ix4-200d 2023-05-20 15:35:37 +02:00
lantiq kernel: bump 5.15 to 5.15.138 2023-11-10 17:33:59 +01:00
layerscape treewide: fix shell errors during dump stage 2023-11-13 14:01:25 +01:00
malta kernel: remove CRYPTO_BLAKE2S from all >=5.15 2023-07-08 16:54:01 +02:00
mediatek mediatek: filogic: add JCG Q30 PRO support 2023-11-19 16:52:16 +01:00
mpc85xx mpc85xx: add Enterasys WS-AP3715i reset button 2023-09-27 23:13:36 +02:00
mvebu mvebu: add support for Synology DS213j 2023-11-20 13:24:06 +00:00
mxs mxs: add testing kernel 6.1 2023-07-01 12:54:30 +02:00
octeon kernel: bump 5.15 to 5.15.125 2023-08-09 22:06:24 +02:00
octeontx kernel: bump 5.15 to 5.15.138 2023-11-10 17:33:59 +01:00
omap treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
oxnas treewide: disable CONFIG_SLUB_DEBUG in target configs 2023-11-09 21:23:01 +01:00
pistachio kernel: fix mtd/NVMEM regression affecting U-Boot env NVMEM driver 2023-10-31 17:33:28 +01:00
qoriq treewide: disable CONFIG_SLUB_DEBUG in target configs 2023-11-09 21:23:01 +01:00
qualcommax qualcommax: add addresses to DP nodes 2023-11-18 12:23:54 +01:00
ramips ramips: D-Link Dxx-1xx0 image fixes 2023-11-20 00:24:54 +01:00
realtek realtek: add support for TP-Link T1600G-28TS v3 2023-10-20 18:13:57 +02:00
rockchip treewide: disable CONFIG_SLUB_DEBUG in target configs 2023-11-09 21:23:01 +01:00
sifiveu kernel: remove CONFIG_DEVTMPFS_SAFE from target config 2023-11-19 16:46:24 +01:00
sunxi sunxi: enable cpufreq driver for H6 SoC 2023-10-28 18:31:43 +02:00
tegra treewide: remove files for building 5.10 kernel 2023-05-12 13:02:43 +02:00
uml kernel: bump 6.1 to 6.1.53 2023-09-23 13:10:28 +02:00
x86 x86,armsr: interpolate GRUB_SERIAL into /etc/inittab 2023-11-19 17:33:37 +01:00
zynq generic: enable CONFIG_ARM_CRYPTO for 32bit arm targets 2023-05-10 19:01:45 +02:00
Makefile build: fix issues with targets installed via feeds 2022-09-27 13:41:12 +02:00