@rabarbara9 provided the latest (17.01.1) LEDE builds as binaries. There is no image builder included in the provided download package but a zsun-patch (0001-Zsun.patch, 12kb).
I guess someone how is skilled can port this to the most recent version (17.01.4 & maybe snapshot) and provide a custom image builder for our so beloved ZSUN!
This tiny hardware is quite powerful and with 16mb flash there could be a lot's of things included (travelmate, adblock with ssl support and far more!)
Here is the 0001-Zsun.patch
From 27f1a2ccecf15aba391057ff5511edb261966a19 Mon Sep 17 00:00:00 2001
From: devtop <devtop@one>
Date: Sat, 29 Apr 2017 03:25:21 +0200
Subject: [PATCH 1/1] Zsun
---
.../linux/ar71xx/base-files/etc/board.d/02_network | 3 +-
target/linux/ar71xx/base-files/etc/diag.sh | 3 +-
target/linux/ar71xx/base-files/etc/rc.button/BTN_1 | 5 +
.../etc/uci-defaults/99_zsun-enable-wifi | 7 ++
target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +
.../ar71xx/base-files/lib/preinit/50_failsafe_wipe | 11 +++
.../ar71xx/base-files/lib/upgrade/platform.sh | 3 +-
target/linux/ar71xx/config-4.4 | 1 +
.../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++
target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 +
.../files/arch/mips/ath79/mach-zsun-sdreader.c | 101 +++++++++++++++++++++
.../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 +
target/linux/ar71xx/image/generic.mk | 13 +++
target/linux/ar71xx/mikrotik/config-default | 1 +
target/linux/ar71xx/nand/config-default | 1 +
15 files changed, 161 insertions(+), 3 deletions(-)
create mode 100644 target/linux/ar71xx/base-files/etc/rc.button/BTN_1
create mode 100644 target/linux/ar71xx/base-files/etc/uci-defaults/99_zsun-enable-wifi
create mode 100644 target/linux/ar71xx/base-files/lib/preinit/50_failsafe_wipe
create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-zsun-sdreader.c
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 10f84bf..579883b 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -115,7 +115,8 @@ ar71xx_setup_interfaces()
tube2h|\
unifiac-lite|\
wndap360|\
- wp543)
+ wp543|\
+ zsun-sdreader)
ucidef_set_interface_lan "eth0"
;;
a40|\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 7b8aac8..f0d2568 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -34,7 +34,8 @@ get_status_led() {
dr344|\
tew-632brp|\
wpj344|\
- zbt-we1526)
+ zbt-we1526|\
+ zsun-sdreader)
status_led="$board:green:status"
;;
ap136-010|\
diff --git a/target/linux/ar71xx/base-files/etc/rc.button/BTN_1 b/target/linux/ar71xx/base-files/etc/rc.button/BTN_1
new file mode 100644
index 0000000..3902df9
--- /dev/null
+++ b/target/linux/ar71xx/base-files/etc/rc.button/BTN_1
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+logger Resetting the SD card reader
+echo "0" > /sys/class/gpio/gpio18/value
+echo "1" > /sys/class/gpio/gpio18/value
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/99_zsun-enable-wifi b/target/linux/ar71xx/base-files/etc/uci-defaults/99_zsun-enable-wifi
new file mode 100644
index 0000000..fb4fc56
--- /dev/null
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/99_zsun-enable-wifi
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+uci set wireless.@wifi-device[0].disabled=0
+uci commit wireless
+wifi
+
+exit 0
\ No newline at end of file
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b035535..9dfac52 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -1217,6 +1217,9 @@ ar71xx_board_detect() {
*ZCN-1523H-5)
name="zcn-1523h-5"
;;
+ *"ZSUN WiFi SD Card Reader")
+ name="zsun-sdreader"
+ ;;
*EmbWir-Dorin)
name="ew-dorin"
;;
diff --git a/target/linux/ar71xx/base-files/lib/preinit/50_failsafe_wipe b/target/linux/ar71xx/base-files/lib/preinit/50_failsafe_wipe
new file mode 100644
index 0000000..b514462
--- /dev/null
+++ b/target/linux/ar71xx/base-files/lib/preinit/50_failsafe_wipe
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+failsafe_wipe() {
+ echo "Doing a factory reset."
+ mount_root
+ firstboot -y
+ sleep 10
+ reboot -f
+}
+
+boot_hook_add failsafe failsafe_wipe
\ No newline at end of file
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 4f479ce..2d12b9e 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -310,7 +310,8 @@ platform_check_image() {
wpj558|\
zbt-we1526|\
zcn-1523h-2|\
- zcn-1523h-5)
+ zcn-1523h-5|\
+ zsun-sdreader)
[ "$magic_long" != "68737173" -a "$magic_long" != "19852003" ] && {
echo "Invalid image type."
return 1
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index ff6bb13..660e4df 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -225,6 +225,7 @@ CONFIG_ATH79_MACH_XD3200=y
CONFIG_ATH79_MACH_Z1=y
CONFIG_ATH79_MACH_ZBT_WE1526=y
CONFIG_ATH79_MACH_ZCN_1523H=y
+CONFIG_ATH79_MACH_ZSUN_SDREADER=y
CONFIG_ATH79_NVRAM=y
CONFIG_ATH79_PCI_ATH9K_FIXUP=y
# CONFIG_ATH79_ROUTERBOOT is not set
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 894367f..4ccf42c 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1856,3 +1856,13 @@ config ATH79_MACH_TL_WPA8630
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_M25P80
select ATH79_DEV_WMAC
+
+config ATH79_MACH_ZSUN_SDREADER
+ bool "ZSUN WiFi SD Card Reader"
+ select SOC_AR933X
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index c91d03f..4cc4a04 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -229,3 +229,4 @@ obj-$(CONFIG_ATH79_MACH_XD3200) += mach-sr3200.o
obj-$(CONFIG_ATH79_MACH_Z1) += mach-z1.o
obj-$(CONFIG_ATH79_MACH_ZBT_WE1526) += mach-zbt-we1526.o
obj-$(CONFIG_ATH79_MACH_ZCN_1523H) += mach-zcn-1523h.o
+obj-$(CONFIG_ATH79_MACH_ZSUN_SDREADER) += mach-zsun-sdreader.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-zsun-sdreader.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-zsun-sdreader.c
new file mode 100644
index 0000000..56d2a32
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-zsun-sdreader.c
@@ -0,0 +1,101 @@
+/*
+ * ZSUN WiFi SD Card Reader support
+ *
+ * Copyright (C) 2015 by Andrzej Surowiec <emeryth@hackerspace.pl>
+ * Based on mach-carambola2.c copyright (C) 2013 Darius Augulis <darius@8devices.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+#include <asm/mach-ath79/ath79.h>
+#include <asm/mach-ath79/ar71xx_regs.h>
+#include "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-spi.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define ZSUN_SDREADER_GPIO_LED_SYSTEM 0
+
+#define ZSUN_SDREADER_GPIO_SW_SD 22
+#define ZSUN_SDREADER_GPIO_USB_SWITCH 21
+#define ZSUN_SDREADER_GPIO_SD_RESET 18
+
+#define ZSUN_SDREADER_MAC0_OFFSET 0x0000
+#define ZSUN_SDREADER_MAC1_OFFSET 0x0006
+#define ZSUN_SDREADER_CALDATA_OFFSET 0x1000
+#define ZSUN_SDREADER_WMAC_MAC_OFFSET 0x1002
+
+#define ZSUN_SDREADER_KEYS_POLL_INTERVAL 20 /* msecs */
+#define ZSUN_SDREADER_KEYS_DEBOUNCE_INTERVAL (3 * ZSUN_SDREADER_KEYS_POLL_INTERVAL)
+
+static struct gpio_led zsun_sdreader_leds_gpio[] __initdata = {
+ {
+ .name = "zsun-sdreader:green:system",
+ .gpio = ZSUN_SDREADER_GPIO_LED_SYSTEM,
+ .active_low = 0,
+ }
+};
+
+static struct gpio_keys_button zsun_sdreader_gpio_keys[] __initdata = {
+ {
+ .desc = "SD Card insert switch",
+ .type = EV_KEY,
+ .code = BTN_1,
+ .debounce_interval = ZSUN_SDREADER_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = ZSUN_SDREADER_GPIO_SW_SD,
+ .active_low = 1,
+ }
+};
+
+
+static void __init zsun_sdreader_common_setup(void)
+{
+ u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+
+ ath79_register_m25p80(NULL);
+ ath79_register_wmac(art + ZSUN_SDREADER_CALDATA_OFFSET,
+ art + ZSUN_SDREADER_WMAC_MAC_OFFSET);
+
+ ath79_setup_ar933x_phy4_switch(true, true);
+
+ //ath79_init_mac(ath79_eth0_data.mac_addr, art + ZSUN_SDREADER_MAC0_OFFSET, 0);
+ ath79_init_mac(ath79_eth1_data.mac_addr, art + ZSUN_SDREADER_MAC1_OFFSET, 0);
+
+
+ ath79_register_mdio(0, 0x0);
+
+ //ath79_register_eth(0);
+ ath79_register_eth(1);
+}
+
+static void __init zsun_sdreader_setup(void)
+{
+ zsun_sdreader_common_setup();
+
+ ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
+ AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
+ AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
+ AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
+ AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
+
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(zsun_sdreader_leds_gpio),
+ zsun_sdreader_leds_gpio);
+ ath79_register_gpio_keys_polled(-1, ZSUN_SDREADER_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(zsun_sdreader_gpio_keys),
+ zsun_sdreader_gpio_keys);
+ gpio_request_one(ZSUN_SDREADER_GPIO_USB_SWITCH, GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED, "USB switch");
+ gpio_request_one(ZSUN_SDREADER_GPIO_SD_RESET, GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_CHANGEABLE, "SD reader reset");
+
+ ath79_register_usb();
+}
+
+MIPS_MACHINE(ATH79_MACH_ZSUN_SDREADER, "ZSUN-SDREADER", "ZSUN WiFi SD Card Reader",
+ zsun_sdreader_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index b9a8e3e..3f05878 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -294,6 +294,7 @@ enum ath79_mach_type {
ATH79_MACH_ZBT_WE1526, /* Zbtlink ZBT-WE1526 */
ATH79_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */
ATH79_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */
+ ATH79_MACH_ZSUN_SDREADER, /* Zsun WiFi SD Card Reader */
};
#endif /* _ATH79_MACHTYPE_H */
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index d978dec..54b2f0f 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -725,3 +725,16 @@ define Device/bhr-4grv2
IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
endef
TARGET_DEVICES += bhr-4grv2
+
+define Device/zsun-sdreader
+ DEVICE_TITLE := ZSUN WiFi SD Card Reader
+ BOARDNAME := ZSUN-SDREADER
+ ROOTFS_SIZE := 14912k
+ KERNEL_SIZE := 1216k
+ IMAGE_SIZE := 16128k
+ CONSOLE := ttyATH0,115200
+ MTDPARTS := spi0.0:64k(u-boot)ro,64k(u-boot-env)ro,14912k(rootfs),1216k(kernel),64k(nvram),64k(art),16128k@0x20000(firmware)
+ IMAGES := sysupgrade.bin
+ IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
+endef
+TARGET_DEVICES += zsun-sdreader
diff --git a/target/linux/ar71xx/mikrotik/config-default b/target/linux/ar71xx/mikrotik/config-default
index 44ea327..1092c85 100644
--- a/target/linux/ar71xx/mikrotik/config-default
+++ b/target/linux/ar71xx/mikrotik/config-default
@@ -190,6 +190,7 @@ CONFIG_ATH79_MACH_RBSXTLITE=y
# CONFIG_ATH79_MACH_Z1 is not set
# CONFIG_ATH79_MACH_ZBT_WE1526 is not set
# CONFIG_ATH79_MACH_ZCN_1523H is not set
+# CONFIG_ATH79_MACH_ZSUN_SDREADER is not set
# CONFIG_ATH79_NVRAM is not set
CONFIG_ATH79_ROUTERBOOT=y
CONFIG_CMDLINE="rootfstype=squashfs noinitrd"
diff --git a/target/linux/ar71xx/nand/config-default b/target/linux/ar71xx/nand/config-default
index 515266b..d73568c 100644
--- a/target/linux/ar71xx/nand/config-default
+++ b/target/linux/ar71xx/nand/config-default
@@ -80,6 +80,7 @@
# CONFIG_ATH79_MACH_WZR_HP_G300NH2 is not set
# CONFIG_ATH79_MACH_WZR_HP_G450H is not set
# CONFIG_ATH79_MACH_ZCN_1523H is not set
+# CONFIG_ATH79_MACH_ZSUN_SDREADER is not set
# CONFIG_ATH79_NVRAM is not set
CONFIG_CMDLINE="rootfstype=squashfs noinitrd"
# CONFIG_IP17XX_PHY is not set
--
2.1.4