Support for Gigastone Smart Battery A4-52ER

Hello,

I have the device mentioned in the title and would be very interested in getting OpenWrt Ported to it but I have no idea where to start. I am pretty familiar with using Linux, desoldering flash chips and reading/writing to them, I have compiled OpenWrt on a couple of occasions for supported devices and have the hardware and the means to get access via serial UART. I am going to gather as much info as I can and make another post in this topic later today. If there is any info that would be handy I will make sure to add it to my list if it isn't there already. I am also okay with blindly trying some risky stuff since the router is fairly inexpensive and I can get another easily.

Cheers!

1 Like

Here is some additional info about the device in question as well as some pictures. I will try to add better photos when I can get to some decent lighting.

  • Gigastone Smart Battery A4-52ER
  • System-On-Chip: AR9331-AL3A
  • Flash-Chip: 8 MiB (Macronix MX25L6406E)
  • DRAM-Chip: 32MiB (Winbond W9725G6KB-25)
  • Li-ion Battery: 5200mAh
  • Wireless: WiFi 802.11 b/g/n
  • Default IP: 192.168.1.2
  • Default Admin Password: 0000
  • Default Telnet Login: root
  • Default Telnet Password: root

Here is a link to a dropbox folder with all the pictures since I am a new user and cannot add all of the photos in this post.

I will add additional info soon...

1 Like

Sorry I took so long to reply I was having some trouble trying to get proper input/output over serial since the usual baudrate (115200) wasn't working. After much troubleshooting I managed to get clear output. Here is what I get from the serial console...

U-Boot 1.1.4-g73b24108-dirty (Jan 15 2014 - 16:23:32)

AP121 (ar9331) U-boot

DRAM:  32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 139k for U-Boot at: 81fdc000
Reserving 192k for malloc() at: 81fac000
Reserving 44 Bytes for Board Info at: 81fabfd4
Reserving 36 Bytes for Global Data at: 81fabfb0
Reserving 128k for boot params() at: 81f8bfb0
Stack Pointer at: 81f8bf98
Now running in RAM - U-Boot at: 81fdc000
Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x17
flash size 8388608, sector count = 128
Flash:  8 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
: cfg1 0x5 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
eth0 up
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs26_reg_init_lan
ATHRS26: resetting s26
ATHRS26: s26 reset done
eth1 up
eth0, eth1
Hit any key to stop autoboot:  0 
## Booting image at 9f070000 ...
   Image Name:   Linux Kernel Image
   Created:      2014-11-18   3:16:43 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1022984 Bytes = 999 kB
   Load Address: 80002000
   Entry Point:  801f6610
   Verifying Checksum at 0x9f070040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 801f6610) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

Booting AR9330(Hornet)...
Linux version 2.6.31--LSDK-9.2.0_U10.5.13-GST-A4 (astro@astro) (gcc version 4.3.3 (GCC) ) #44 Tue Nov 18 11:16:25 CST 2014
flash_size passed from bootloader = 8
arg 1: console=ttyS0,115200
arg 2: root=31:05
arg 3: rootfstype=squashfs
arg 4: init=/sbin/init
arg 5: mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),64k(CONF),64k(NVRAM),1280k(uImage),4096k(rootfs),2304k(secfs),64k(ART)
arg 6: mem=32M
CPU revision is: 00019374 (MIPS 24Kc)
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS0,115200 root=31:05 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),64k(CONF),64k(NVRAM),1280k(uImage),4096k(rootfs),2304k(secfs),64k(ART) mem=32M 
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 29544k/32768k available (2016k kernel code, 3224k reserved, 700k data, 128k init, 0k highmem)
NR_IRQS:128
plat_time_init: plat time init done
Calibrating delay loop... 266.24 BogoMIPS (lpj=532480)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
===== ar7240_platform_init: 0
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
AR7240 GPIOC major 0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
fuse init (API version 7.12)
msgmni has been set to 57
alg: No test for lzma (lzma-generic)
alg: No test for stdrng (krng)
io scheduler noop registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
ttyS0: detected caps 00000000 should be 00000100
serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
console [ttyS0] enabled
brd: module loaded
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
PPPoL2TP kernel driver, V1.0
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver rndis_host
8 cmdlinepart partitions found on MTD device ar7240-nor0
Creating 8 MTD partitions on "ar7240-nor0":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000050000 : "u-boot-env"
0x000000050000-0x000000060000 : "CONF"
0x000000060000-0x000000070000 : "NVRAM"
0x000000070000-0x0000001b0000 : "uImage"
0x0000001b0000-0x0000005b0000 : "rootfs"
0x0000005b0000-0x0000007f0000 : "secfs"
0x0000007f0000-0x000000800000 : "ART"
usbmon: debugfs is not available
usbcore: registered new interface driver cdc_acm
cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (512 buckets, 2048 max)
ctnetlink v0.93: registering with nfnetlink.
ip_tables: (C) 2000-2006 Netfilter Core Team
arp_tables: (C) 2002 David S. Miller
TCP cubic registered
NET: Registered protocol family 17
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
ar7240wdt_init: Registering WDT success
VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
Freeing unused kernel memory: 128k freed
[I] rootfs up, version: ap121-2.6.31/2014-11-18-11:19
[I] secfs up, version: r1.7.12
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Port Status 1c000004 
ar7240-ehci ar7240-ehci.0: ATH EHCI
ar7240-ehci ar7240-ehci.0: new USB bus registered, assigned bus number 1
ehci_reset Intialize USB CONTROLLER in host mode: 3
ehci_reset Port Status 1c000000 
ar7240-ehci ar7240-ehci.0: irq 3, io mem 0x1b000000
ehci_reset Intialize USB CONTROLLER in host mode: 3
ehci_reset Port Status 1c000000 
ar7240-ehci ar7240-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: ATH EHCI
usb usb1: Manufacturer: Linux 2.6.31--LSDK-9.2.0_U10.5.13-GST-A4 ehci_hcd
usb usb1: SerialNumber: platform
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
ATHR_GMAC: Length per segment 1536
ATHR_GMAC: fifo cfg 3 01f00140
ATHR_GMAC: Mac address for unit 0:bf7f1002
ATHR_GMAC: c0:34:b4:88:90:32
ATHR_GMAC: Max segments per packet :   1
ATHR_GMAC: Max tx descriptor count :   40
ATHR_GMAC: Max rx descriptor count :   252
ATHR_GMAC: Mac capability flags    :   4403
ATHR_GMAC: Mac address for unit 1:bf7f1008
ATHR_GMAC: c0:34:b4:ff:ff:fe
ATHR_GMAC: Max segments per packet :   1
ATHR_GMAC: Max tx descriptor count :   40
ATHR_GMAC: Max rx descriptor count :   96
ATHR_GMAC: Mac capability flags    :   4D83
usb 1-1: new high speed USB device using ar7240-ehci and address 2
athr_gmac_ring_alloc Allocated 640 at 0x81659c00
athr_gmac_ring_alloc Allocated 4032 at 0x81cf2000
Setting Drop CRC Errors, Pause Frames and Length Error frames 
Setting PHY...
usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
usb 1-1: Product: USB2.0 Hub
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usb 1-1.2: new high speed USB device using ar7240-ehci and address 3
usb 1-1.2: New USB device found, idVendor=048d, idProduct=1338
usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.2: Product: Mass Storage Device
usb 1-1.2: Manufacturer: Generic 
usb 1-1.2: SerialNumber: 0000000000000006
usb 1-1.2: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
**** drop_caches_sysctl_handler: all done timer added ...**** 
Populating /dev using udev: done
Args: 1
asf: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath_hal: 0.9.17.1 (AR9380, DEBUG, REGOPS_FUNC, WRITE_EEPROM, 11D)
ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
ath_ahb: 9.2.0_U11.14 (Atheros/multi-bss)
__ath_attach: Set global_scn[0]
ACBKMinfree = 48
ACBEMinfree = 32
ACVIMinfree = 16
ACVOMinfree = 0
CABMinfree = 48
UAPSDMinfree = 0
Bootstrap clock 25MHz
ar9300RadioAttach: Need analog access recipe!!
Restoring Cal data from Flash
Using Cal data from Flash 0xbf7f0000
ath_get_caps[5184] rx chainmask mismatch actual 1 sc_chainmak 0
ath_get_caps[5159] tx chainmask mismatch actual 1 sc_chainmak 0
SC Callback Registration for wifi0
wifi0: Atheros 9380: mem=0xb8100000, irq=2
Creating ap for Smartbox_809032 on 
wlan_vap_create : enter. devhandle=0x81d4c2c0, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x81d4c2c0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
Added ath0 mode master
Configuring RF . . .
 ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1 
Created ath0 mode ap for "Smartbox_809032"
scsi 0:0:0:0: Direct-Access     Generic  Storage Device   0.00 PQ: 0 ANSI: 2
device ath0 entered promiscuous mode
br0: port 1(ath0) entering forwarding state
ARPING to 192.168.1.2 from 192.168.1.2 via br0
Sent 1 probe(s) (1 broadcast(s))
Received 0 reply (0 request(s), 0 broadcast(s))
WSCMODE:0, SECMODE:None

 (none) mips #44 Tue Nov 18 11:16:25 CST 2014 (none)
(none) login: sd 0:0:0:0: [sda] Attached SCSI removable disk


I also have dumps of everything from the flash chip I made when I desoldered it and made a backup just in case

I am getting late to this party, I have the A4-52ER also called Media streamer plus /Smart battery model A4-52ER. However, my device has 8MB nor flash and 64 MB of ram and u- boot doesn't seem to be the exact same. I have a screenshot showing those details:


I got access to the shell and copy the firmware out of the device. I have a copy of the all the scripts related to update the device from the web interface, I can upload them somewhere if needed. to perform a firmware update the web interface verify the extension (.BRN), the image name and the size. So, several attempts to install Openwrt through this route failed.
Later, I tried updating the firmware through u-boot using TFTP, I know I need to locate the GPIO to add image builder to make a custom but I was lazy ( I found them later, then I lost the file with GPIO numbers-actions) . I didn't do much research that time so I used the openwrt firmware (rootfs and kernel) from the ALFA Network Hornet-UB (poor choice). I almost succeed. The firmware didn't recognize where rootfs is located I think the re was a difference in size I didn't verify before the test. It was like 2 am I was drunk flashing routers making dropboxes lol. I have a screenshot of that attempt:


I have the firmware update file from the manufacturer. I don't have the skills to modify it. I asked for the source code very kindly, Gigastone rejected my petition.

1 Like

Hey just read your post breifly. I have work soon so I gotta keep this short but I was curious about your hardware revision since the RAM and Flash are larger on yours. I have another flash chip the same as the one on your hardware but since the RAM doesn't have exposed legs I'm not too sure I could swap it without killing my router.

Because of all this I was wondering if you might be able to provide me with some images of your hardware and possibly a dump of your flash to play around with on my hardware.

If you have any other relevant files/info it certainly sounds like you've been able to figure out more about your device than me.

Thanks!

My hardware is the one you will find googling "FCC ID PLE-ER5201" there you will find a lot of internal pics and more. The link here:


To replace your ram you might need a rework station or at least a hot air gun. The most critical information i found I think is that Gigastone uses a not conventional squashfs (version 3 I think) different from standard linux squashfs, I recall Binwalk couldn't extract it. I used the FMK (firmware mod kit) to unsquash the root and be able to navigate the file system. This hardware is almost identical/similar to the wifi pineapple nano. So, my goal is to re-purpose this device into a hardware security tool. Tell me what you think.
Regards,

@ JohnFreeman646
Did I mention that I almost succeed installing Openwrt. I just found a note I forgot I had.
Let me explain, if you take a look at the last part of the last screenshot I posted you can read that the firmware cannot locate the root, there says: kernel panic, not syncing VFS blah blah.
Well, I found that setting up a script from u-boot shell, where you indicate the root location then the firmware finds where is root and boot the new installed Openwrt. Here is the way to fix my error and make the new installation work.:
KERNEL_PANIC_FIX
Anyway, before I found this info I got upset and flashed the Hornet-UB bootloader and the device never boot again, well boot just to show the u-boot version and then stop. Therefore I cannot test that route yet. First, I have to re-flash my chip with the original firmware again.
Hopefully, someone here can confirm my makeshift assumption is true, or guide us on the right direction.
Cheers,

I can test any uboot, firmware etc etc on my unit currently running with a 16MB flash I have the tools to flash the chip from brick or any other state essentially so I'm not too worried aside from maybe gpio stuff possibly damaging the board bu on the otherhand I've never done playing around with routers that are not supported this way before. I have a debian linux install and have compiled modified images for a TP-Link router before so I can maybe help but idk where to start

That is the attitude we want, Adventure! Alright, being the case you can recover from anything let’s go the experiments/trials-error sessions:
1.- Make a back up of u-boot and all the files shown in the your dmesg:"u-boot",”u-boot-env",”CONF",”NVRAM",”uImage”,”rootfs”,”secfs""ART"
2.- verify and take note of the size of U-boot , Ulmage and roofs.
3.- From here https://archive.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/
here you need to gather a kernel and rootfs from a device similar to yours (same AR9331 with same flash size and ram size) , your restriction is 32mb ram size, (until you get to install another ram module) here a list to choose the right device in your case:
https://openwrt.org/toh/views/toh_extended_all?dataflt[CPU*~]=AR9331&dataflt[RAM+MB*~]=32&dataflt[Flash+MB*~]=
verify the U-boot , Ulmage and roofs you are gathering from supported devices are equal or smaller size than their comparable files from your Gigastone device. (TREMENDOUSLY IMPORTANT)
4.- Now the brute force session number 1, starts:
place the kernel and rootfs in a VFAT formatted USB flash drive (fat16 or fat32) because this router already has support for VFAT .
Connect your Linux laptop/PC to the mini router via Ethernet and power up the mini router

  1. Connect the USB Flash drive to the smartbox
  2. Telnet to the smartbox with the following command:
    • telnet 192.168.1.2
    • root/root
  3. Mount the USB flash drive with the following command:
    • mount /dev/sda1 /mnt
  4. Wait for a little bit and verify that you see files
    • ls /mnt
    • You should see your files. Do not go further if you do not see files, otherwise start over.
  5. Upgrade kernel and rootfs
    • mtd_write write /mnt/rootfs-hornet-UB-or-whatever.img rootfs
    • mtd_write write /mnt/kernel-hornet-UB-or-whatever.img Ulmage
      Reboot the router with the command: reboot, or power cycle the device. After this process we should have success or a broken device LOL.
  • In case the success, there will be the possibility that lights or the reset/power button are not responding to commands. However, we will be able to find the GPIO info inside the Openwrt file system and then be able to make new custom Openwrt firmware that will have everything working out of the box.

In case we break the device, the original U-boot still should work. So, we need to get UART access and TFTP. Then, you can try to replicate my route a little bit more involved with details and the u-boot script mentioned in the last post (that would be called brute force session number 2).

Brute force session number 3, would be to install a pepe2k modified U-boot that will allow the installation of any firmware.


All this situation is a learning process, trial/error, then re-flash the chip with the original firmware and rinse and repeat.

@ JohnFreeman646 SUCCESS!!!!

This weekend I had some free time. I tried the pepe2k u-boot for the MR3040 I followed the TFTP directions accordingly and flashed u-boot. It went smooth and directly to the u-boot webserver page to update firmware ( you can activate it also from u-boot console, just enter httpd). From the webserver page I flashed the sysupgrade image of MR3020v1 Chaos calmer 15.05.1 and I had the Openwrt logo from the terminal. :star_struck:

Everything was fine but wifi didn't work.This situation was related to u-boot overwriting the mac address of the wireless card. The solution was to return to u-boot console and flash a new mac address with the command:
setmac C0:34:B4:AA:BB:CC
The first 3 pairs of hex starting from the left belong to the manufacturer ID Gigastone, the other 3 pairs are up to you. After this command wifi worked alright and the buttons and lights were consistent as the original firmware.

Now it's time to do some clean up, I need help. Openwrt just recognized 4MB flash and 32MB, so I modified the image builder to create MR3020v1 with 8MB and 64 ram but I get just kernel and rootfs, not factory or sysupgrade. I need assistance here to make this baby shine, I found a Gluon guide but it seems I am missing some details to add support.

Anyway, in the meantime I have flashed the Pulpstone-openwrt for the MR3020v1 modified for 8M-16M flash and 64 ram and I have everything working as expected also this firmware is built with extroot ready to roll, luci and 3MB of extra space recognizing 64 ram and 8M flash. The link here:


These days this device Smartbox-A4/media streamer plus can be found in ebay.com for $10 with shipping included to all US. In Amazon.com and bhphotovideo.com for $14, If anyone is near NYC check the Microcenter store there can be found for $8.

Oh man that's some really good news, I need to give this a try. My Smartbox A4 is currently experiencing a weird problem where the connection to the battery keeps cutting out randomly causing issues with booting the router at all. I tried replacing the wires on the battery but it didn't quite work. I'm downloading the files you mentioned and I will give it a go after I manage to get it booting reliably. My last soldering iron tip just broke too (Don't I just have the best luck?). Thankfully I have to visit work today and will try to fix it there once I'm done the work needed. Will try to update tonight and let you know how it goes.

I have seen somewhere in the little paper/manual that came with this router that if there were not features being used the firmware will put the device into stand by/off to save battery power. Do all the testings while the smartbox-A4 is being plug to an outlet.

Anyways, because everything worked for me the brute forcing way, I wanted to try the easy/smart ass way. I flashed once again the original firmware into Smartbox-A4.

I found one other of my notes from while ago. In the original firmware there was a script called "flashcp". After calling flashcp --help, there was the definition of use:
flashcp -v <"file"> mtd_device
UHHMM, I also recalled, that while trying to update the firmware through the device webserver page the update will fail. However, the firmware file will be transferred to /tmp inside the device file system.
So I tried the following:
telnet 192.168.1.2
root/root
cd ..
Then go to the webserver and try to update the firmware using u-boot-MR3040-pepep2k (it will fail but no worries)
again in terminal verify: ls /tmp/ you should see your file, then enter:
flashcp -v /tmp/u-boot-MR3040-pepe2k /dev/mtd0

and I got SUCCESS!!! once again. I went to 192.168.1.1 and I could see the firmware update page I flashed Pulpstone-openwrt and no issues at all with 8M flash and 64 ram. This time no UART, or TFTP or flash addresses,very easy. Big thanks to pepe2k and his awesome work.

I still want to build my own modified firmware size for CC 15.05.1. The community needs a guide for AR71XX builds /mods. Suggestions are appreciated.

With 8 MB of flash and 32 MB of RAM, you should be able to port it to ath79. 64 MB is even more comfortable. ar71xx is dead as far as development goes.

If you've got the energy, you might want to send them a copy of the GPL in your request, as well as reporting it as described at https://www.gnu.org/licenses/gpl-violation.en.html

So I ended up buying a spare Smartbox A4-52ER off a buddy of mine and turns out this one has 64MB of RAM which is nice. I'll be putting a 16MB Flash chip on it here in a moment. Testing went well as I was able to get the pepe2k u-boot installed and working, although strangely after installing that I have to hold the reset button while pressing the power button to have it power on and not just turn off right away. Also installed Pulpstone which worked decently as well. As stated in a previous post someone mentioned this device being very similar to the Wifi Pineapple, I enjoy pentesting as a hobby and would be very interested in seeing if there was a way to run that firmware on this device. I'll have to see if I can compile an image then just try to make something that has some proper configs and names etc etc I'm not too familiar with the process but I'm a avid learner.

Anyway, just an update. Let me know if any of you guys manage to make any progress, I'll make a collection of files and instructions to install once I do some more testing for the sake of having everything in a easy to find package.

Those are good news, I'm glad it worked for you. The u-boot I used from pepe2k was the MR3040 then flashed the openwrt firmware using u-boot, I tried with several smartbox A4 and always worked alright no extra buttons to push. I had UART connected with a terminal session open while doing the whole thing to debug any possible issue but it shouldn't have any impact in the process. Did you run the script to map the GPI0s? If you want to push an image for this device it should be well made.

I managed to modify the CC 15.05.01 image builder and I have created an image with 8MB openwrt for the device. The sd card slot will be shown as sda1 and I used to extroot leaving a the USB port free for an extra USB wifi adapter.

With 8MB of flash It was an easy task to fit the Mark IV firmware which is already running on this gigastone device, of course before you flash this firmware you need to unpack the pineapple binary and break the firmware security which is in the web page of the firmware, then recompile the image and flash it to gigastone. When everything is up and running I created a sim link to the sd card so I can install more modules. Now the Smartbox A4 became a wifi pineapple Mark IV no issues.
Here is the boot session:

t
*********************************************
*   U-Boot 1.1.4  (Nov 19 2014, 09:46:02)   *
*********************************************

AP121 (AR9331) U-Boot for TL-MR3040

DRAM:   64 MB
FLASH:  Macronix MX25L64 (8 MB)
CLOCKS: 400/400/200/33 MHz (CPU/RAM/AHB/SPI)

LED on during eth initialization...

Hit any key to stop autobooting:  0

Booting image at: 0x9F020000

   Image name:   OpenWrt r36088
   Image type:   MIPS Linux Kernel Image (lzma compressed)
   Data size:    957040 Bytes = 934.6 kB
   Load address: 0x80060000
   Entry point:  0x80060000

Uncompressing kernel image... OK!
Starting kernel...

[    0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sat Mar 23 16:49:30 UTC 2013
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00004000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00004000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=TL-MR3020 console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 61488k/65536k available (2211k kernel code, 4048k reserved, 418k data, 212k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 29 on device: ath79
[    0.100000] MIPS: machine is TP-LINK TL-MR3020
[    0.350000] bio: create slab <bio-0> at 0
[    0.360000] Switching to clocksource MIPS
[    0.360000] NET: Registered protocol family 2
[    0.370000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.370000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.380000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.380000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.390000] TCP reno registered
[    0.390000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.400000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.400000] NET: Registered protocol family 1
[    0.430000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.430000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.440000] msgmni has been set to 120
[    0.440000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.450000] io scheduler noop registered
[    0.450000] io scheduler deadline registered (default)
[    0.460000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.470000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART
[    0.480000] console [ttyATH0] enabled, bootconsole disabled
[    0.480000] console [ttyATH0] enabled, bootconsole disabled
[    0.490000] m25p80 spi0.0: found mx25l6405d, expected m25p80
[    0.500000] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    0.500000] 5 tp-link partitions found on MTD device spi0.0
[    0.510000] Creating 5 MTD partitions on "spi0.0":
[    0.510000] 0x000000000000-0x000000020000 : "u-boot"
[    0.520000] 0x000000020000-0x000000109c70 : "kernel"
[    0.520000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.540000] 0x000000109c70-0x0000007f0000 : "rootfs"
[    0.540000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.550000] mtd: partition "rootfs" set to be root filesystem
[    0.560000] mtd: partition "rootfs_data" created automatically, ofs=5D0000, len=220000
[    0.570000] 0x0000005d0000-0x0000007f0000 : "rootfs_data"
[    0.570000] 0x0000007f0000-0x000000800000 : "art"
[    0.580000] 0x000000020000-0x0000007f0000 : "firmware"
[    0.600000] ag71xx_mdio: probed
[    0.610000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    1.160000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    1.170000] TCP cubic registered
[    1.170000] NET: Registered protocol family 17
[    1.180000] Bridge firewalling registered
[    1.180000] 8021q: 802.1Q VLAN Support v1.8
[    1.190000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    1.200000] Freeing unused kernel memory: 212k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
[    7.040000] JFFS2 notice: (466) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 22 of xref (0 dead, 4 orphan) found.
[    7.830000] SCSI subsystem initialized
[    8.000000] usbcore: registered new interface driver usbfs
[    8.000000] usbcore: registered new interface driver hub
[    8.010000] usbcore: registered new device driver usb
[    8.290000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.300000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[    8.310000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    8.340000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    8.360000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    8.360000] hub 1-0:1.0: USB hub found
[    8.360000] hub 1-0:1.0: 1 port detected
[    8.380000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    8.410000] Initializing USB Mass Storage driver...
[    8.410000] usbcore: registered new interface driver usb-storage
[    8.420000] USB Mass Storage support registered.
[    8.690000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    8.840000] hub 1-1:1.0: USB hub found
[    8.840000] hub 1-1:1.0: 2 ports detected
[    9.130000] usb 1-1.2: new high-speed USB device number 3 using ehci-platform
[    9.420000] scsi0 : usb-storage 1-1.2:1.0
[   11.100000] scsi 0:0:0:0: Direct-Access     Generic  Storage Device   0.00 PQ: 0 ANSI: 2
[   11.110000] sd 0:0:0:0: [sda] 3842048 512-byte logical blocks: (1.96 GB/1.83 GiB)
[   11.120000] sd 0:0:0:0: [sda] Write Protect is off
[   11.130000] sd 0:0:0:0: [sda] No Caching mode page present
[   11.130000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.140000] sd 0:0:0:0: [sda] No Caching mode page present
[   11.140000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.150000]  sda: sda1 sda2
[   11.160000] sd 0:0:0:0: [sda] No Caching mode page present
[   11.160000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   11.170000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   28.830000] EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
[   28.960000] EXT4-fs (sda1): couldn't mount as ext2 due to feature incompatibilities
[   29.850000] EXT4-fs (sda1): recovery complete
[   29.850000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
switching to external rootfs
- init -

Please press Enter to activate this console. [   30.590000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[   30.600000] Backport based on wireless-testing.git master-2012-09-07
[   30.600000] compat.git: wireless-testing.git
[   30.650000] cfg80211: Calling CRDA to update world regulatory domain
[   30.650000] cfg80211: World regulatory domain updated:
[   30.660000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   30.660000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   30.670000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   30.680000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   30.690000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   30.700000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   30.830000] cfg80211: World regulatory domain updated:
[   30.840000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   30.840000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   30.850000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   30.860000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   30.870000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   30.880000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   31.230000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[   31.240000] cfg80211: Calling CRDA for country: US
[   31.240000] cfg80211: Regulatory domain changed to country: US
[   31.250000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   31.260000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   31.270000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   31.270000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   31.280000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   31.290000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   31.300000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
Failed to set regulatory domain: -1
[   31.510000] PPP generic driver version 2.4.2
[   31.600000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   31.730000] NET: Registered protocol family 24
[   31.800000] nf_conntrack version 0.5.0 (964 buckets, 3856 max)
[   36.650000] device eth0 entered promiscuous mode
[   43.670000] device wlan0 entered promiscuous mode
[   43.780000] br-lan: port 2(wlan0) entered forwarding state
[   43.780000] br-lan: port 2(wlan0) entered forwarding state
[   45.780000] br-lan: port 2(wlan0) entered forwarding state
[   59.140000] device wlan0 left promiscuous mode
[   59.140000] br-lan: port 2(wlan0) entered disabled state
[   60.350000] device wlan0 entered promiscuous mode
[   60.450000] br-lan: port 2(wlan0) entered forwarding state
[   60.460000] br-lan: port 2(wlan0) entered forwarding state
[   62.460000] br-lan: port 2(wlan0) entered forwarding state
[   63.520000] device br-lan entered promiscuous mode



BusyBox v1.19.4 (2013-03-02 13:43:56 GMT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __                          \
 |       |.-----.-----.-----.|  |  |  |.----.|  |_                      \  \
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|                   \  \  \
 |_______||   __|_____|__|__||________||__|  |____|   <,  .v ,  // ) ) )  )  )
          |__| W I R E L E S S   F R E E D O M         \\; \// //     /  /  /
 ATTITUDE ADJUSTMENT          (MK4 Ver. 2.8) ---------- ;\\|||//;       /  /
  * 1/4 oz Vodka      Pour all ingredients into mixing ,'<\/><\/`         /
  * 1/4 oz Gin        tin with ice, strain into glass.,.`X/\><\\>`
  * 1/4 oz Amaretto                                   ;>/>><\\><\/`
  * 1/4 oz Triple sec                                 |<\\>>X/<>/\|
  * 1/4 oz Peach schnapps                             `<\/><\/><\\;
  * 1/4 oz Sour mix                                    '/\<>/\<>/'
  * 1 splash Cranberry juice                             `<\/><;`
 -------------------------Cooked by Knightrider007---WiFi_Pineapple MKIV
root@Pineapple:/#
root@Pineapple:/#
root@Pineapple:/#  

Due to my lack of experience and knowledge about OpenWRT development stuff I'm not sure what or where this GPIO script is that can be used to map the GPIO. If you could help me a bit with that I would appreciate it. Aside from that if you have a copy of a pre-baked image I wouldn't mind giving that a try especially if it's the Wifi Pineapple Firmware. Anyway, I plan to try and compile my own images but I am currently needing to reinstall my copy of Debian.

Thanks!

2 Likes

I am looking to see if we have any movement on a working or testing prepackaged firmware

I have 2 of a4 and would love to use more in a better working system but I am not a developer but I am willing to test anything out

Are you aware of the implications that the low memory (32MB RAM) has?

https://openwrt.org/supported_devices/432_warning

yes i am aware and i do not have a problem i have 2 and only use as basic battery and file storage so if 1 acts up i can deal i a just looking for new life.