summaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/image
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2023-11-19 22:01:47 +0000
committerDaniel Golle <daniel@makrotopia.org>2023-11-20 13:24:06 +0000
commit3f7637b05047badc15a58b1581c071892bc6e340 (patch)
tree6c78ea9ebb26e587af34e83cf6c81f5eb91da4d8 /target/linux/mvebu/image
parent2723f16ddadc6400cdbbadd0a54bc97b309597e1 (diff)
downloadopenwrt-3f7637b05047badc15a58b1581c071892bc6e340.tar.gz
openwrt-3f7637b05047badc15a58b1581c071892bc6e340.tar.bz2
openwrt-3f7637b05047badc15a58b1581c071892bc6e340.zip
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>
Diffstat (limited to 'target/linux/mvebu/image')
-rw-r--r--target/linux/mvebu/image/cortexa9.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index 3234d62cd9..a49401d904 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -388,3 +388,22 @@ define Device/solidrun_clearfog-pro-a1
SUPPORTED_DEVICES += armada-388-clearfog armada-388-clearfog-pro
endef
TARGET_DEVICES += solidrun_clearfog-pro-a1
+
+define Device/synology_ds213j
+ DEVICE_VENDOR := Synology
+ DEVICE_MODEL := DS213j
+ KERNEL_SIZE := 6912k
+ IMAGE_SIZE := 7168k
+ FILESYSTEMS := squashfs ubifs
+ KERNEL := kernel-bin | append-dtb | uImage none
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
+ DEVICE_DTS := armada-370-synology-ds213j
+ IMAGES := sysupgrade.bin
+ IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
+ check-size | append-metadata
+ DEVICE_PACKAGES := \
+ kmod-rtc-s35390a kmod-hwmon-gpiofan kmod-hwmon-drivetemp \
+ kmod-md-raid0 kmod-md-raid1 kmod-md-mod e2fsprogs mdadm \
+ -ppp -kmod-nft-offload -firewall4 -dnsmasq -odhcpd-ipv6only
+endef
+TARGET_DEVICES += synology_ds213j