mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-10 08:44:39 +01:00
kirkwood: add support for D-Link DNS-325 A1
The D-Link DNS-325 A1 is NAS with 2x HDD (3.5 inch) bays, 1x 10/100/1000Base-T port and 1x USB 2.0 port
Device specification:
SoC: Marvell 88F6281-A1 1.2 GHz
RAM: 256 MB (2xSEC K4T1G084QF-HCF7:128Mx8 @400 CL6)
Flash: 128 MB (SAMSUNG 946 K9F1G08U0B PCB0)
SATA: 2x internal SATA II drives
Ethernet: 1x Gigabit (Marvell 88E1116R-NNC1)
LED: 7x (white: Power, white/red: Right SATA Activity, USB Activity, Left SATA Activity)
Key: 3x (Power, Reset, USB Copy/Unmount)
Serial: 5 pin header (RXD,GAP,3.3V,GND,TXD), (115200,8,N,1), 3.3V TTL
USB ports: 1x USB 2.0
Flash instruction:
NOTE: this process uses a serial connection. It will upgrade the bootloader and reset the bootloader environment variables
USB flash stick setup
Format to FAT32 without mbr
Copy these files to USB flash stick: dlink_dns-325-a1-initramfs-uImage dlink_dns-325-a1-squashfs-factory.bin dlink_dns-325-a1-squashfs-sysupgrade.bin u-boot.kwb (from u-boot-dns325 directory)
NAS setup
Connect LAN cable between router and NAS device
Connetc USB flash stick to NAS device
Connect serial to NAS device
Boot from new u-boot and install it
$ kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyUSB0
Power on NAS
After download copleted and booted NAS device with new u-boot stop in bootloader by pressing any key
=> usb start
=> fatload usb 0 0x1000000 /u-boot.kwb
=> nand erase.part u-boot
=> nand write 0x1000000 u-boot ${filesize}
=> reset
Update MAC address in u-boot env
Stop in bootloader by pressing any key
Get your MAC address from label on chassis
=> setenv ethaddr XX:XX:XX:XX:XX:XX
=> saveenv
Install OpenWrt by flashing factory image from u-boot
=> usb start
=> fatload usb 0 0x1000000 /dlink_dns-325-a1-squashfs-factory.bin
=> nand erase.part ubi
=> nand write 0x1000000 ubi ${filesize}
=> reset
Based-on: #9296
Signed-off-by: Konstantin Meshkov <skyline@mail.ru>
[ refresh uboot patches ]
Link: https://github.com/openwrt/openwrt/pull/17924
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
6065edf3b2
commit
7e829b8209
7 changed files with 132 additions and 0 deletions
|
|
@ -25,6 +25,11 @@ define U-Boot/dns320l
|
|||
BUILD_DEVICES:=dlink_dns320l
|
||||
endef
|
||||
|
||||
define U-Boot/dns325
|
||||
NAME:=D-Link DNS-325 A1
|
||||
BUILD_DEVICES:=dlink_dns-325-a1
|
||||
endef
|
||||
|
||||
define U-Boot/dockstar
|
||||
NAME:=Seagate DockStar
|
||||
BUILD_DEVICES:=seagate_dockstar
|
||||
|
|
@ -112,6 +117,7 @@ endef
|
|||
|
||||
UBOOT_TARGETS := \
|
||||
dns320l \
|
||||
dns325 \
|
||||
dockstar dockstar_second_stage \
|
||||
goflexhome \
|
||||
ib62x0 ib62x0_second_stage \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
From e7e650e8bdb09ac46da017250394f8c589df10bb Mon Sep 17 00:00:00 2001
|
||||
From: Tom Rini <trini@konsulko.com>
|
||||
Date: Mon, 14 Sep 2020 15:48:47 -0400
|
||||
Subject: [PATCH] arm: kirkwood: dns325: Correct CONFIG_NR_DRAM_BANKS parameter
|
||||
|
||||
Testing on a DNS-325 NAS has shown that in order for the device to work
|
||||
we need to set CONFIG_NR_DRAM_BANKS to 1 and not 2.
|
||||
|
||||
Tested-by: Dmitry N. Kolesnikov <dk.diklab@gmail.com>
|
||||
Reported-by: Dmitry N. Kolesnikov <dk.diklab@gmail.com>
|
||||
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
|
||||
Signed-off-by: Tom Rini <trini@konsulko.com>
|
||||
---
|
||||
configs/dns325_defconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/configs/dns325_defconfig
|
||||
+++ b/configs/dns325_defconfig
|
||||
@@ -6,7 +6,7 @@ CONFIG_SYS_TEXT_BASE=0x600000
|
||||
CONFIG_TARGET_DNS325=y
|
||||
CONFIG_ENV_SIZE=0x20000
|
||||
CONFIG_ENV_OFFSET=0xE0000
|
||||
-CONFIG_NR_DRAM_BANKS=2
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
CONFIG_IDENT_STRING="\nD-Link DNS-325"
|
||||
# CONFIG_SYS_MALLOC_F is not set
|
||||
CONFIG_BOOTDELAY=3
|
||||
65
package/boot/uboot-kirkwood/patches/100-dns325.patch
Normal file
65
package/boot/uboot-kirkwood/patches/100-dns325.patch
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
--- a/configs/dns325_defconfig
|
||||
+++ b/configs/dns325_defconfig
|
||||
@@ -27,7 +27,7 @@ CONFIG_CMD_FAT=y
|
||||
CONFIG_CMD_JFFS2=y
|
||||
CONFIG_CMD_MTDPARTS=y
|
||||
CONFIG_MTDIDS_DEFAULT="nand0=orion_nand"
|
||||
-CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:896k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)"
|
||||
+CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xe0000@0x0(u-boot),0x20000@0xe0000(u-boot-env),-@0x100000(ubi)"
|
||||
CONFIG_CMD_UBI=y
|
||||
CONFIG_ISO_PARTITION=y
|
||||
CONFIG_OF_CONTROL=y
|
||||
--- a/include/configs/dns325.h
|
||||
+++ b/include/configs/dns325.h
|
||||
@@ -66,46 +66,12 @@
|
||||
*/
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
- "stdin=serial\0" \
|
||||
- "stdout=serial\0" \
|
||||
- "stderr=serial\0" \
|
||||
- "loadaddr=0x800000\0" \
|
||||
- "autoload=no\0" \
|
||||
- "console=ttyS0,115200\0" \
|
||||
- "mtdparts="CONFIG_MTDPARTS_DEFAULT \
|
||||
- "optargs=\0" \
|
||||
- "bootenv=uEnv.txt\0" \
|
||||
- "importbootenv=echo Importing environment ...; " \
|
||||
- "env import -t ${loadaddr} ${filesize}\0" \
|
||||
- "loadbootenv=fatload usb 0 ${loadaddr} ${bootenv}\0" \
|
||||
- "setbootargs=setenv bootargs console=${console} " \
|
||||
- "${optargs} " \
|
||||
- "${mtdparts} " \
|
||||
- "root=${bootenvroot} " \
|
||||
- "rootfstype=${bootenvrootfstype}\0" \
|
||||
- "subbootcmd=run setbootargs; " \
|
||||
- "if run bootenvloadimage; then " \
|
||||
- "bootm ${loadaddr};" \
|
||||
- "fi;\0" \
|
||||
- "nandroot=ubi0:rootfs ubi.mtd=rootfs\0" \
|
||||
- "nandrootfstype=ubifs\0" \
|
||||
- "nandloadimage=nand read ${loadaddr} kernel\0" \
|
||||
- "setnandbootenv=echo Booting from nand ...; " \
|
||||
- "setenv bootenvroot ${nandroot}; " \
|
||||
- "setenv bootenvrootfstype ${nandrootfstype}; " \
|
||||
- "setenv bootenvloadimage ${nandloadimage}\0"
|
||||
+ "mtdids="CONFIG_MTDIDS_DEFAULT "\0" \
|
||||
+ "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0"
|
||||
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
- "if test -n ${bootenv} && usb start; then " \
|
||||
- "if run loadbootenv; then " \
|
||||
- "echo Loaded environment ${bootenv} from usb;" \
|
||||
- "run importbootenv;" \
|
||||
- "fi;" \
|
||||
- "if test -n ${bootenvcmd}; then " \
|
||||
- "echo Running bootenvcmd ...;" \
|
||||
- "run bootenvcmd;" \
|
||||
- "fi;" \
|
||||
- "fi;" \
|
||||
- "run setnandbootenv subbootcmd;"
|
||||
+ "ubi part ubi; " \
|
||||
+ "ubi read 0x800000 kernel; " \
|
||||
+ "bootm 0x800000"
|
||||
|
||||
#endif /* _CONFIG_DNS325_H */
|
||||
|
|
@ -214,3 +214,23 @@
|
|||
+CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
--- a/configs/dns325_defconfig
|
||||
+++ b/configs/dns325_defconfig
|
||||
@@ -48,3 +48,8 @@ CONFIG_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
+CONFIG_CMD_BOOTZ=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_LZMA=y
|
||||
+CONFIG_LZO=y
|
||||
--- a/include/configs/dns325.h
|
||||
+++ b/include/configs/dns325.h
|
||||
@@ -74,4 +74,6 @@
|
||||
"ubi read 0x800000 kernel; " \
|
||||
"bootm 0x800000"
|
||||
|
||||
+#include "openwrt-kirkwood-common.h"
|
||||
+
|
||||
#endif /* _CONFIG_DNS325_H */
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ checkpoint,l-50|\
|
|||
cloudengines,pogoe02|\
|
||||
cloudengines,pogoplugv4|\
|
||||
dlink,dns320l|\
|
||||
dlink,dns-325-a1\
|
||||
globalscale,sheevaplug|\
|
||||
iom,ix2-200|\
|
||||
iom,ix4-200d|\
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ kirkwood_setup_interfaces()
|
|||
cloudengines,pogoplugv4|\
|
||||
ctera,c200-v1|\
|
||||
dlink,dns320l|\
|
||||
dlink,dns-325-a1|\
|
||||
globalscale,sheevaplug|\
|
||||
iom,iconnect-1.1|\
|
||||
iom,ix2-200|\
|
||||
|
|
|
|||
|
|
@ -189,6 +189,18 @@ define Device/dlink_dns320l
|
|||
endef
|
||||
TARGET_DEVICES += dlink_dns320l
|
||||
|
||||
define Device/dlink_dns-325-a1
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DNS-325
|
||||
DEVICE_VARIANT := A1
|
||||
DEVICE_DTS := kirkwood-dns325
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-hwmon-lm75 kmod-hwmon-gpiofan \
|
||||
kmod-thermal kmod-usb-ledtrig-usbport kmod-gpio-button-hotplug block-mount \
|
||||
mdadm kmod-md-linear kmod-usb-storage kmod-fs-ext4 e2fsprogs partx-utils \
|
||||
fdisk kmod-rtc-mv
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dns-325-a1
|
||||
|
||||
define Device/endian_4i-edge-200
|
||||
DEVICE_VENDOR := Endian
|
||||
DEVICE_MODEL := 4i Edge 200
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue