summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network3
-rw-r--r--target/linux/mvebu/cortexa9/config-5.153
-rw-r--r--target/linux/mvebu/cortexa9/config-6.13
-rw-r--r--target/linux/mvebu/image/cortexa9.mk19
-rw-r--r--target/linux/mvebu/patches-5.15/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch134
-rw-r--r--target/linux/mvebu/patches-6.1/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch134
6 files changed, 295 insertions, 1 deletions
diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
index 5c176d4963..b9ac2bb1ae 100644
--- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
+++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
@@ -12,7 +12,8 @@ mvebu_setup_interfaces()
local board="$1"
case "$board" in
- ctera,c200-v2)
+ ctera,c200-v2|\
+ synology,ds213j)
ucidef_set_interface_lan "eth0" "dhcp"
;;
cznic,turris-omnia)
diff --git a/target/linux/mvebu/cortexa9/config-5.15 b/target/linux/mvebu/cortexa9/config-5.15
index e666dd486f..266596d638 100644
--- a/target/linux/mvebu/cortexa9/config-5.15
+++ b/target/linux/mvebu/cortexa9/config-5.15
@@ -1,4 +1,7 @@
CONFIG_LED_TRIGGER_PHY=y
CONFIG_MTD_SPLIT_SEIL_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_VIRT_CONCAT=y
CONFIG_PHY_MVEBU_A38X_COMPHY=y
+CONFIG_POWER_RESET_QNAP=y
CONFIG_RTC_DRV_MV=y
diff --git a/target/linux/mvebu/cortexa9/config-6.1 b/target/linux/mvebu/cortexa9/config-6.1
index b2625c3b32..7f825a806b 100644
--- a/target/linux/mvebu/cortexa9/config-6.1
+++ b/target/linux/mvebu/cortexa9/config-6.1
@@ -4,6 +4,9 @@ CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
CONFIG_IRQSTACKS=y
CONFIG_LED_TRIGGER_PHY=y
CONFIG_MTD_SPLIT_SEIL_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_VIRT_CONCAT=y
CONFIG_PHY_MVEBU_A38X_COMPHY=y
+CONFIG_POWER_RESET_QNAP=y
CONFIG_RTC_DRV_MV=y
CONFIG_THREAD_INFO_IN_TASK=y
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
diff --git a/target/linux/mvebu/patches-5.15/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch b/target/linux/mvebu/patches-5.15/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
new file mode 100644
index 0000000000..280fc5957e
--- /dev/null
+++ b/target/linux/mvebu/patches-5.15/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
@@ -0,0 +1,134 @@
+--- a/arch/arm/boot/dts/armada-370-synology-ds213j.dts
++++ b/arch/arm/boot/dts/armada-370-synology-ds213j.dts
+@@ -31,6 +31,7 @@
+
+ chosen {
+ stdout-path = "serial0:115200n8";
++ append-rootblock = "nullparameter="; /* override the bootloader args */
+ };
+
+ memory@0 {
+@@ -94,6 +95,8 @@
+ status = "okay";
+ phy = <&phy1>;
+ phy-mode = "sgmii";
++ nvmem-cells = <&macaddr_vendor_0>;
++ nvmem-cell-names = "mac-address";
+ };
+
+ sata@a0000 {
+@@ -175,6 +178,24 @@
+ gpio = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+ };
+ };
++
++ virtual_flash {
++ compatible = "mtd-concat";
++
++ devices = <&mtd_kernel &mtd_gap &mtd_gap2>;
++
++ partitions {
++ compatible = "fixed-partitions";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ partition@0 {
++ compatible = "openwrt,uimage", "denx,uimage";
++ label = "firmware";
++ reg = <0x0 0x0>;
++ };
++ };
++ };
+ };
+
+ &mdio {
+@@ -265,48 +286,52 @@
+ reg = <0>; /* Chip select 0 */
+ spi-max-frequency = <20000000>;
+
+- /*
+- * Warning!
+- *
+- * Synology u-boot uses its compiled-in environment
+- * and it seems Synology did not care to change u-boot
+- * default configuration in order to allow saving a
+- * modified environment at a sensible location. So,
+- * if you do a 'saveenv' under u-boot, your modified
+- * environment will be saved at 1MB after the start
+- * of the flash, i.e. in the middle of the uImage.
+- * For that reason, it is strongly advised not to
+- * change the default environment, unless you know
+- * what you are doing.
+- */
+- partition@0 { /* u-boot */
+- label = "RedBoot";
+- reg = <0x00000000 0x000c0000>; /* 768KB */
+- };
++ partitions {
++ compatible = "fixed-partitions";
+
+- partition@c0000 { /* uImage */
+- label = "zImage";
+- reg = <0x000c0000 0x002d0000>; /* 2880KB */
+- };
++ partition@0 { /* u-boot */
++ label = "u-boot";
++ reg = <0x00000000 0x000c0000>; /* 768KB */
++ read-only;
++ };
+
+- partition@390000 { /* uInitramfs */
+- label = "rd.gz";
+- reg = <0x00390000 0x00440000>; /* 4250KB */
+- };
++ mtd_gap: partition@c0000 { /* gap */
++ label = "gap";
++ reg = <0x000c0000 0x00040000>; /* 256KB */
++ };
+
+- partition@7d0000 { /* MAC address and serial number */
+- label = "vendor";
+- reg = <0x007d0000 0x00010000>; /* 64KB */
+- };
++ partition@100000 { /* u-boot-env */
++ label = "u-boot-env";
++ reg = <0x00100000 0x00010000>; /* 64KB */
++ };
+
+- partition@7e0000 {
+- label = "RedBoot config";
+- reg = <0x007e0000 0x00010000>; /* 64KB */
+- };
++ mtd_kernel: partition@110000 {
++ label = "kernel";
++ reg = <0x00110000 0x006c0000>; /* 6912KB */
++ };
+
+- partition@7f0000 {
+- label = "FIS directory";
+- reg = <0x007f0000 0x00010000>; /* 64KB */
++ partition@7d0000 { /* MAC address and serial number */
++ reg = <0x007d0000 0x00010000>; /* 64KB */
++ label = "vendor";
++ read-only;
++
++ compatible = "nvmem-cells";
++
++ nvmem-layout {
++ compatible = "fixed-layout";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ macaddr_vendor_0: macaddr@0 {
++ reg = <0x0 0x6>;
++ };
++ };
++ };
++
++ mtd_gap2: partition@7e0000 {
++ label = "gap2";
++ reg = <0x007e0000 0x00020000>; /* 128KB */
++ };
+ };
+ };
+ };
diff --git a/target/linux/mvebu/patches-6.1/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch b/target/linux/mvebu/patches-6.1/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
new file mode 100644
index 0000000000..280fc5957e
--- /dev/null
+++ b/target/linux/mvebu/patches-6.1/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
@@ -0,0 +1,134 @@
+--- a/arch/arm/boot/dts/armada-370-synology-ds213j.dts
++++ b/arch/arm/boot/dts/armada-370-synology-ds213j.dts
+@@ -31,6 +31,7 @@
+
+ chosen {
+ stdout-path = "serial0:115200n8";
++ append-rootblock = "nullparameter="; /* override the bootloader args */
+ };
+
+ memory@0 {
+@@ -94,6 +95,8 @@
+ status = "okay";
+ phy = <&phy1>;
+ phy-mode = "sgmii";
++ nvmem-cells = <&macaddr_vendor_0>;
++ nvmem-cell-names = "mac-address";
+ };
+
+ sata@a0000 {
+@@ -175,6 +178,24 @@
+ gpio = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+ };
+ };
++
++ virtual_flash {
++ compatible = "mtd-concat";
++
++ devices = <&mtd_kernel &mtd_gap &mtd_gap2>;
++
++ partitions {
++ compatible = "fixed-partitions";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ partition@0 {
++ compatible = "openwrt,uimage", "denx,uimage";
++ label = "firmware";
++ reg = <0x0 0x0>;
++ };
++ };
++ };
+ };
+
+ &mdio {
+@@ -265,48 +286,52 @@
+ reg = <0>; /* Chip select 0 */
+ spi-max-frequency = <20000000>;
+
+- /*
+- * Warning!
+- *
+- * Synology u-boot uses its compiled-in environment
+- * and it seems Synology did not care to change u-boot
+- * default configuration in order to allow saving a
+- * modified environment at a sensible location. So,
+- * if you do a 'saveenv' under u-boot, your modified
+- * environment will be saved at 1MB after the start
+- * of the flash, i.e. in the middle of the uImage.
+- * For that reason, it is strongly advised not to
+- * change the default environment, unless you know
+- * what you are doing.
+- */
+- partition@0 { /* u-boot */
+- label = "RedBoot";
+- reg = <0x00000000 0x000c0000>; /* 768KB */
+- };
++ partitions {
++ compatible = "fixed-partitions";
+
+- partition@c0000 { /* uImage */
+- label = "zImage";
+- reg = <0x000c0000 0x002d0000>; /* 2880KB */
+- };
++ partition@0 { /* u-boot */
++ label = "u-boot";
++ reg = <0x00000000 0x000c0000>; /* 768KB */
++ read-only;
++ };
+
+- partition@390000 { /* uInitramfs */
+- label = "rd.gz";
+- reg = <0x00390000 0x00440000>; /* 4250KB */
+- };
++ mtd_gap: partition@c0000 { /* gap */
++ label = "gap";
++ reg = <0x000c0000 0x00040000>; /* 256KB */
++ };
+
+- partition@7d0000 { /* MAC address and serial number */
+- label = "vendor";
+- reg = <0x007d0000 0x00010000>; /* 64KB */
+- };
++ partition@100000 { /* u-boot-env */
++ label = "u-boot-env";
++ reg = <0x00100000 0x00010000>; /* 64KB */
++ };
+
+- partition@7e0000 {
+- label = "RedBoot config";
+- reg = <0x007e0000 0x00010000>; /* 64KB */
+- };
++ mtd_kernel: partition@110000 {
++ label = "kernel";
++ reg = <0x00110000 0x006c0000>; /* 6912KB */
++ };
+
+- partition@7f0000 {
+- label = "FIS directory";
+- reg = <0x007f0000 0x00010000>; /* 64KB */
++ partition@7d0000 { /* MAC address and serial number */
++ reg = <0x007d0000 0x00010000>; /* 64KB */
++ label = "vendor";
++ read-only;
++
++ compatible = "nvmem-cells";
++
++ nvmem-layout {
++ compatible = "fixed-layout";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ macaddr_vendor_0: macaddr@0 {
++ reg = <0x0 0x6>;
++ };
++ };
++ };
++
++ mtd_gap2: partition@7e0000 {
++ label = "gap2";
++ reg = <0x007e0000 0x00020000>; /* 128KB */
++ };
+ };
+ };
+ };