summaryrefslogtreecommitdiffstats
path: root/package/utils
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2024-01-05 18:42:53 +0100
committerZoltan HERPAI <wigyori@uid0.hu>2024-06-01 01:29:09 +0200
commit8619d7af67c28ff974373c9a2937da1025cd81e5 (patch)
tree031752137fe1be2cb576af692ee537eb51ca194c /package/utils
parentab9bb79d8e30a574c7628c73c4522429805d9307 (diff)
downloadopenwrt-8619d7af67c28ff974373c9a2937da1025cd81e5.tar.gz
openwrt-8619d7af67c28ff974373c9a2937da1025cd81e5.tar.bz2
openwrt-8619d7af67c28ff974373c9a2937da1025cd81e5.zip
kirkwood: add D-Link DNS-320L support
Dual-slot NAS based on Marvell Kirkwood. Specifications: - Marvell 88F6702 @1GHz - 256Mb RAM - 128Mb NAND - 1x GbE LAN (Marvell 88E1318R) - 1x USB 2.0 - 2x SATA - Weltrend WT69P3 ("supervisor" MCU chip) - Serial on J2 (115200,8n1) - Newer bootROM so kwboot-ing via serial is possible Notes: - The Weltrend MCU is controlled by the package added in utils/dns320l-mcu. - The original MAC address is stored in the "mini firmware" image's first 17 bytes. - Compared to the original MTD layout, the uImage+rootfs are now stored in a common ubi partition. Installation: 1. Serial console - Connect your levelshifter to the serial console on J2 (refer to the wiki page for pinout) 2. Update u-boot - Download the u-boot.kwb image for the device - Powercycle the NAS - Run "kwboot -b u-boot-dns320l/u-boot.kwb /dev/ttyUSB0 -p" - Connect to the serial console with minicom - tftp 0x0800000 u-boot-dns320l/u-boot.kwb (Please note that "PHY reset timed out" seems to be customary on kirkwood devices, the egiga0 interface works regardless.) - nand erase 0x0 100000 - nand write 0x0800000 0x0 0x100000 - reset 3. Install OpenWrt - Boot up the initramfs image - tftpboot 0x800000 openwrt-kirkwood-generic-dlink_dns320l-initramfs-uImage; bootm 0x800000 - Download the sysupgrade image and perform sysupgrade Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> Reviewed-by: Pawel Dembicki <paweldembicki@gmail.com>
Diffstat (limited to 'package/utils')
-rw-r--r--package/utils/dns320l-mcu/Makefile36
-rw-r--r--package/utils/dns320l-mcu/files/dns320l-mcu.init14
2 files changed, 50 insertions, 0 deletions
diff --git a/package/utils/dns320l-mcu/Makefile b/package/utils/dns320l-mcu/Makefile
new file mode 100644
index 0000000000..724a664a8b
--- /dev/null
+++ b/package/utils/dns320l-mcu/Makefile
@@ -0,0 +1,36 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dns320l-mcu
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/wigyori/dns320l-daemon.git
+PKG_SOURCE_DATE:=2024-05-11
+PKG_SOURCE_VERSION:=c74941880e0a8d2bc0344b3256b984397512e8c3
+PKG_MIRROR_HASH:=e0f186a0c139ccfac3d311f49e2fecdbd02fa3f9fe6ced4b1ce0baa603d49fc3
+PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
+PKG_LICENSE:=GPL-3.0+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dns320l-mcu
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Utility to control the MCU on DNS-320L
+ DEPENDS:=@TARGET_kirkwood
+ URL:=https://github.com/wigyori/dns320l-mcu
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS) -Wall"
+endef
+
+define Package/dns320l-mcu/install
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/dns320l-mcu.init $(1)/etc/init.d/dns320l-mcu
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/dns320l-daemon $(1)/usr/bin/dns320l-mcu
+endef
+
+$(eval $(call BuildPackage,dns320l-mcu))
diff --git a/package/utils/dns320l-mcu/files/dns320l-mcu.init b/package/utils/dns320l-mcu/files/dns320l-mcu.init
new file mode 100644
index 0000000000..eb1c579907
--- /dev/null
+++ b/package/utils/dns320l-mcu/files/dns320l-mcu.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+# Copyright (c) 2024 OpenWrt.org
+
+START=99
+
+USE_PROCD=1
+PROG=/usr/bin/dns320l-mcu
+
+start_service() {
+ procd_open_instance
+ procd_set_param command "$PROG"
+ procd_set_param respawn
+ procd_close_instance
+}