Supporting ZSUN Wifi Card Reader (16MB Flash, 64MB RAM, AR9331)

Some mmc package perhaps?
https://openwrt.org/packages/table/start?dataflt[Name_pkg-dependencies*~]=mmc

@maurer would you be so kind to explain how can one reproduce your work?

just do a git clone and apply this patch

I have done this, and got it to compile. However, you need to make some tweaks to make kernel have a small enough size. I have been reluctant to try it myself though, because I fear if I brick it, I will have a hard time unbricking it.

It would be great if the efforts of the alternative u-boot was made public. It supports uploading a new firmware if regular flashing fails for some reason (or so I have imagined it anyway, not sure of current state)

Is the right time to do this now, or should one wait until lede becomes openwrt again. I guess no one knows how long that will take.

The lede version I am using on my zsun now lacks usb support, or at least I am unable to get it working. It would be great to be able to share the sdcard as a smb drive that was automounted on startup. That is how I mainly use my zsun, as a portable wireless storage for my kids to have their movies on.

However, another very good use is to have travelmate on it, I think it would be nice in addition to that to also have some sort of text based web browser, to be able to login to those pesky hotel wifis. At least I think that would work if you were able to authenticate through a web page on the actual device (the router) that is connecting to the wifi.

It is a bit strange that such a versatile little device gets so little attention (if I am wrong on this, please point me to where the attention is) and that it cant get official support.

Another thing that is bothering me a bit, how do you reset your configuration to the default state when you have messed around adding stuff in the menus? I cant seem to be able to do this.

Phew, long post. If you managed to read this far, congrats, you must be as interested in this device as I am.

Quick recap:

  1. How to get proper smb sharing with automount working on lede? (works on older openwrt release perfectly)
  2. How to reset menu config when compiling firmware?
  3. Alternative U-boot would be great (safer to flash)

Cheers,
/J

check this

Bare with my ignorance but I'm not a programmer.

I'm starting from here:

I prefer to use stable(17.01.4 atm) if it is not a problem.

As i understand things before I do "make defconfig" I have to apply @dirlede patch.

patch  <../zsun.patch 
can't find file to patch at input line 32
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|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
--------------------------
File to patch:

At this point I'm totaly lost. I suppose I'm using wrong command or options to get patch in place.

you'll need to patch the original patch as it's not applying cleanly
i'm not a programmer either.
if you want to compile from source just use my SDK (17.01.4 dec. 2017)

I want to build the knowledge to continue updating the image of zsun and not to rely on someone and wait him/her to have free time to do that. It is obvious that this unit wont get official support.

can some explain me what is this doing?

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

it's replacing this line:
zcn-1523h-5)
with these two:
zcn-1523h-5|
zsun-sdreader)

Hi all, I've recently bought this device and then upgraded its firmware to open-wrt. But while trying to install k-mod based opkg things onto it with the Open-wrt version Chaos Calmer 15.05 it gave me kernel depencies mismatch errors.

As a result of that, I've started to search for new builts for this tiny powerful device, and in this page I've found latest Lede builts. It was fine while working with the latest versions and after upgrading It's just worked fine without any fatal errors, just except the depencies error still remained.

Due to that, I've tried to upgrade my firmware to Mr. Maruer's shared minimal bin image via factory upgrade page while on luci - Lede 17.01 just to see if it whould fix my depency issue and after the upgrade finished and rebooted my device started to suddenly have a nonstoppable bootloop, which is repeats in each 5 seconds periodicly. :no_mouth:

Well, the main problem with this is, It's just unstoppable and booting in each 5 seconds now while powered. So I think for being able to do a successful flash via the existing options in a brick condition like this, like serial connection or chip based programmers device has to be in a calm state and listening for any input at those connectors, not in a bootloop like this. So I've run out of ideas. Any ideas from you whould help :innocent:

no need for calm state if you manage to get serial access - that's how you you stop the bootloop

Could someone that has compiled a working image for zsun please post their
scripts/diffconfig.sh > mydiffconfig

It would be great to see if I am on the right track, thanks in advance!
/J

18.06 released, anyone want share bin for that?

If you read further than this sentence I will not be held responsible for anything. Dragons ahead. You have been warned.

link removed

What I did was this. I applied the patch included in the link above using the configuration in config.seed. This produced the upgrade image and whatever else as well. Completely untested.

I dont have the possibility to resurrect a dead device so I am afraid to test it myself, but if you have the power of resurrection or have spare devices, go ahead and try. If you find any obvious mistakes I can be persuaded to correct them.

It seemed not to work when flashed. at least wifi does not come on. the led does light up at boot.

/J

What is the best way to restore a bricked zsun?

What hardware do I need, and what else is needed to get something working on it again?

/J

I have never attempted to do it, but I am inclined to say: One of the usual TTL USB adapters, some very fine pitched wire, and considerable soldering acumen.

1 Like

i think u need to pry open the case,and solder header to serial listed here (top right)

image

then u can connect it to your favorite usb to serial ( mine is fake but fine&cheap pl2303 )

thanks, I am a bit afraid of soldering, but no better way to face your demons than to actually do it I guess.

Well, if you conquer this one, the soldering demons won't have anything on you anymore. Godspeed! :slight_smile:

no need to solder - just buy the 1$ SMD clips from ebay (colorful ones) !