Generic Build AR9330= Ar7240 & Ath9380?

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
mohit0121
DD-WRT Novice


Joined: 05 Jan 2021
Posts: 9

PostPosted: Tue Jan 05, 2021 14:39    Post subject: Generic Build AR9330= Ar7240 & Ath9380? Reply with quote
Hello ddwrt Gurus,
I am just trying to make use of my old router(Generic CPE) as a repeater but it has a custom firmware which doesn't let me configure the way i want it to. thought to leverage DDWRT for this project. PS: I do have root access to it

Would you be guys kind enough in helping me find the appropriate firmware i can use it with, that would be very helpful.

Router Details >

Router Hardware :------------------------------------------------------------------------------------------
system type : Atheros AR9330 (Hornet)
processor : 0
cpu model : MIPS 24Kc V7.4
BogoMIPS : 266.24
wait instruction : yes
microsecond timers : yes
tlb_entries : 16
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ffb]
ASEs implemented : mips16
shadow register sets : 1
core : 0
VCED exceptions : not available
VCEI exceptions : not available

Kernel Info :-------------------------------------------------------------------------------------------------

free_area_init_node: node 0, pgdat 80215b30, node_mem_map 81000000
Normal zone: 64 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
Kernel command line: console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ar7240-nor0:128k(u-boot),64k(u-boot-env),2944k(rootfs),896k(uImage),64k(NVRAM),64k(config),2944k(brootfs),896k(buImage),64k(chksm),64k(bchk
sm),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: 30156k/32768k available (1701k kernel code, 2612k reserved, 432k data, 112k 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 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
msgmni has been set to 58
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
11 cmdlinepart partitions found on MTD device ar7240-nor0
Creating 11 MTD partitions on "ar7240-nor0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000030000 : "u-boot-env"
0x000000030000-0x000000310000 : "rootfs"
0x000000310000-0x0000003f0000 : "uImage"
0x0000003f0000-0x000000400000 : "NVRAM"
0x000000400000-0x000000410000 : "config"
0x000000410000-0x0000006f0000 : "brootfs"
0x0000006f0000-0x0000007d0000 : "buImage"
0x0000007d0000-0x0000007e0000 : "chksm"
0x0000007e0000-0x0000007f0000 : "bchksm"
0x0000007f0000-0x000000800000 : "ART"
usbmon: debugfs is not available
nf_conntrack version 0.5.0 (512 buckets, 2048 max)
TCP cubic registered
NET: Registered protocol family 17
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear
All bugs added by David S.
arch/mips/ar7240/gpio.c (ar7240_simple_config_init) AP_RESET_GPIO: 12
arch/mips/ar7240/gpio.c (ar7240_simple_config_init) JUMPSTART_GPIO: 11
ar7240wdt_init: Registering WDT success
TELENET-1:calling prepare_namespace saved_root_name=31:02
TELENET-1:calling name_to_dev_t=31:02
TELENET-1:calling mount_root=31:02
TELENET-2:calling mount_block_root=root
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 112k freed
ATHR_GMAC: Length per segment 1536
ATHR_GMAC: fifo cfg 3 01f00140
ATHR_GMAC: Mac address for unit 0:bf3f0000
ATHR_GMAC: fa:f3:00:21:43:4f
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:bf3f0006
ATHR_GMAC: 4e:46:49:47:5f:56
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
athr_gmac_ring_alloc Allocated 640 at 0x81cbf800
athr_gmac_ring_alloc Allocated 1536 at 0x81c52000
Setting Drop CRC Errors, Pause Frames and Length Error frames
ATHRS26: resetting s26
ATHRS26: s26 reset done
ATHRS26: Telenet : in kernel or fs Read s26---------------------------------- Telenet
ATHRS26: ADDR Telenet :108
ATHRS26: DATA_B Telenet :3e0001
ATHRS26: ADDR Telenet :208
ATHRS26: DATA_B Telenet :3d0001
ATHRS26: ADDR Telenet :308
ATHRS26: DATA_B Telenet :3b0001
ATHRS26: ADDR Telenet :408
ATHRS26: DATA_B Telenet :370001
ATHRS26: ADDR Telenet :508
ATHRS26: DATA_B Telenet :2f0001
ATHRS26: ADDR Telenet :608
ATHRS26: DATA_B Telenet :1f0001
ATHRS26Port 1: DATA_A Telenet :210001
ATHRS26Port 2: DATA_A Telenet :210001
ATHRS26Port 3: DATA_A Telenet :210001
ATHRS26Port 4: DATA_A Telenet :210001
Setting PHY...
ATHRS26 **athrs26_phy_setup ATHR_PHY_CONTROL 0 :1000
ATHRS26 **athrs26_phy_setup ATHR_PHY_CONTROL 1 :1000
ATHRS26 **athrs26_phy_setup ATHR_PHY_CONTROL 2 :1000
ATHRS26 **athrs26_phy_setup ATHR_PHY_CONTROL 3 :1000
ATHRS26 **athrs26_phy_setup ATHR_PHY_CONTROL 4 :3100
ATHR_GMAC: Enet Unit:1 PHY:3 is UP GMii 100Mbps full duplex
ATHR_GMAC: done cfg2 0x7215 ifctl 0x0 miictrl
Setting Drop CRC Errors, Pause Frames and Length Error frames
athr_gmac_ring_alloc Allocated 640 at 0x81d20c00
athr_gmac_ring_alloc Allocated 4032 at 0x81d22000
Setting Drop CRC Errors, Pause Frames and Length Error frames
Setting PHY...
ATHRS26 **athrs26_phy_setup ATHR_PHY_CONTROL 0 :1000
ATHRS26 **athrs26_phy_setup ATHR_PHY_CONTROL 1 :1000
ATHRS26 **athrs26_phy_setup ATHR_PHY_CONTROL 2 :1000
ATHRS26 athrs26_phy_setup ATHR_PHY_CONTROL 3 :1000
ATHRS26 athrs26_phy_setup ATHR_PHY_CONTROL 4 :1000
device eth0 entered promiscuous mode
device eth1 entered promiscuous mode
br0: port 2(eth1) entering forwarding state
**** drop_caches_sysctl_handler: all done timer added ...
ATHR_GMAC:unit 1: phy 3 not up carrier 1
br0: port 2(eth1) entering disabled state
ATHR_GMAC: Enet Unit:1 PHY:3 is UP GMii 100Mbps full duplex
ATHR_GMAC: done cfg2 0x7215 ifctl 0x0 miictrl
Setting Drop CRC Errors, Pause Frames and Length Error frames
br0: port 2(eth1) entering forwarding state
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_U10.1020 (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
ath_get_caps[5199] rx chainmask mismatch actual 1 sc_chainmak 0
ath_get_caps[5174] tx chainmask mismatch actual 1 sc_chainmak 0
SC Callback Registration for wifi0
wifi0: Atheros 9380: mem=0xb8100000, irq=2
wlan_vap_create : enter. devhandle=0x81e7c2c0, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x81e7c2c0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
VAP device ath0 created
br0: port 2(eth1) entering disabled state
br0: port 2(eth1) entering forwarding state

DES SSID SET=An0kit-ss3ccA-Eth3r_CP3
ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1
VAP device ath1 created
br0: port 2(eth1) entering disabled state
br0: port 2(eth1) entering forwarding state

DES SSID SET=Atheros_XSpan_2G_AP2
ieee80211_ioctl_siwmode: imr.ifm_active=131200, new mode=2, valid=1
device ath0 entered promiscuous mode
br0: port 3(ath0) entering forwarding state
device ath1 entered promiscuous mode
br0: port 4(ath1) entering forwarding state
/ #
---------------------------------------------------------------------
Meminfo :

MemTotal: 30268 kB
MemFree: 20464 kB
Buffers: 60 kB
Cached: 864 kB
SwapCached: 0 kB
Active: 976 kB
Inactive: 328 kB
Active(anon): 428 kB
Inactive(anon): 0 kB
Active(file): 548 kB
Inactive(file): 328 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 452 kB
Mapped: 676 kB
Slab: 6708 kB
SReclaimable: 108 kB
SUnreclaim: 6600 kB
PageTables: 88 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 15132 kB
Committed_AS: 2224 kB
VmallocTotal: 1048404 kB
VmallocUsed: 1448 kB
VmallocChunk: 1041832 kB
Sponsor
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 1783
Location: Illinois Moderator

PostPosted: Tue Jan 05, 2021 19:57    Post subject: Reply with quote
Is there a FCC ID on the bottom label?
If so, what's that number?

The specs of this router seem very similar to a TP-Link WR841ND v7 vintage router... or more closer to a WR2543ND: Your hardware looks like a private label of slightly cheaper version of the WR2543ND. The problem is the header file won't likely match to your private label router.

AR7240 CPU and ATH9380 wifi...N300 vintage router 10+yrs old with an anemic 400mhz CPU.

The combo of CPU and Wifi don't match anything I've seen under supported hardware before.

This thing will be a dog for sure...I would say invest $25-$35 in a used Archer A7v5.


Otherwise, OpenWRT with a generic build for that combo of hardware you have is the only other option AFAICT.

DD-wrt support will not be coming to your router any time soon.

What happens when you run wireshark; can you see if it looks for TFTP on boot with an ARP request?

If so, that will better show this is private label tp-link shit.

_________________
FORUM RULES

TIPS/TRICKS: Best QCA Wifi Settings | Latency tricks | QoS Port priority | NEVER USE MU-MIMO |
Why to NOT use MU-MIMO | Max Wifi Pwr by Country | Linux Wifi Pwr | AC MCS & AX MCS | QCA 5Ghz chnls to use | WIFI Freq WIKI | TFTP R7800 | Don't buy AX | IPERF3 How-To

[R9000]52396 nightly (Main Router)
[EA8500]43192 & 45493 (2xOffsite)
[R7800] resting
[WDR3600]BS 44715 (Offsite)
[A7v5]BS 43038 (Offsite+spare napping)
o2bad455
DD-WRT User


Joined: 08 Oct 2015
Posts: 252

PostPosted: Tue Jan 05, 2021 21:13    Post subject: Re: Generic Build AR9330= Ar7240 & Ath9380? Reply with quote
mohit0121 wrote:

Router Hardware
...
mtdparts=ar7240-nor0:128k(u-boot),64k(u-boot-env),2944k(rootfs),896k(uImage),64k(NVRAM),64k(config),2944k(brootfs),896k(buImage),64k(chksm),64k(bchk
sm),64k(ART) mem=32M


Could something like this work?

Router Model: D-Link DIR-601-A1
Firmware Version: DD-WRT v3.0-r42617 std (03/05/20)
Kernel Version: Linux 3.10.108-d10 #40869 Thu Mar 5 02:49:56 +04 2020
CPU Model: Atheros AR7240 ver 1 rev 1.2 (0x00c2)
CPU Cores: 1
CPU Features: MIPS32r1 MIPS32r2 MIPS16
CPU Clock: 350 MHz
mohit0121
DD-WRT Novice


Joined: 05 Jan 2021
Posts: 9

PostPosted: Wed Jan 06, 2021 6:59    Post subject: Reply with quote
Thank you for the quick response:

I am a nerd, so pls forgive me for my silly questions..

The system type reads : Atheros AR9330 (Hornet) is it similar or different then AR7240?

@msoengineer - I haven't tested it via wireshark (will try for sure) . I tried to find out the FCC ID but unfortunately no luck.

I was just researching and found out an old thread from ddwrt that talks about the smiliar hardware. pls have a look https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=279582&highlight=atheros+ar9330

second link i found was this (mentioned below)..pls guide me would this be a suitable match?

https://openwrt.org/toh/tp-link/tl-wr740n

@o2bad455 - Thank you for the kind suggestion but i think it would not be a match because the cpu type and clock is different ?
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 1783
Location: Illinois Moderator

PostPosted: Wed Jan 06, 2021 13:37    Post subject: Reply with quote
The 9330 is a SoC which happens to have a Ar7240 CPU and ATH9380 wifi.

There are similar SoC's 9331 with similar specs... But, very few with any support.

That, plus the 4mb/32mb, makes it nearly impossible that openwrt will support the hardware.

BS has been struggling to keep the code efficient and clean enough to keep these low flash routers alive...

At this point, your time will be better spent on other things in life. Find a used archer A7v5 to use.

_________________
FORUM RULES

TIPS/TRICKS: Best QCA Wifi Settings | Latency tricks | QoS Port priority | NEVER USE MU-MIMO |
Why to NOT use MU-MIMO | Max Wifi Pwr by Country | Linux Wifi Pwr | AC MCS & AX MCS | QCA 5Ghz chnls to use | WIFI Freq WIKI | TFTP R7800 | Don't buy AX | IPERF3 How-To

[R9000]52396 nightly (Main Router)
[EA8500]43192 & 45493 (2xOffsite)
[R7800] resting
[WDR3600]BS 44715 (Offsite)
[A7v5]BS 43038 (Offsite+spare napping)


Last edited by msoengineer on Wed Jan 06, 2021 15:33; edited 1 time in total
mohit0121
DD-WRT Novice


Joined: 05 Jan 2021
Posts: 9

PostPosted: Wed Jan 06, 2021 15:25    Post subject: Reply with quote
@msoengineer: Thank you so much for your efforts, Much appreciated.

This was sitting idle at my place, thought to make use of it rather then spending on buying another one. Since I am free.. I'll be really happy to see this shit working Smile you know the kind of happiness we get when we loose weight and our old jean fits in... you know, what i mean!

Any other thoughts on the router? would TP-Link 740 N a closest match for this ?
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 1783
Location: Illinois Moderator

PostPosted: Wed Jan 06, 2021 16:02    Post subject: Reply with quote
I am not a guru with Linux or "hacking" other than having some soldering and reading skills and I'm a monkey that can replicate what I watch/read....

TL/DR:

You need to get a dump of mtd0 saved and send it to brainslayer. This is known as the "CFE.bin"

most consoles allow to simply do cat /dev/mtdblock0 > /tmp/original_mystery_cfe.bin

(check cat /proc/mtd first, to find the correct partition)

for example on my R9000 (now running dd-wrt):
Code:

root@R9000:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 001e0000 00020000 "u-boot"
mtd1: 00120000 00020000 "u-boot-env"
mtd2: 00140000 00020000 "ART"
mtd3: 00140000 00020000 "ART.bak"
mtd4: 00440000 00020000 "kernel"
mtd5: 02800000 00020000 "rootfs"
mtd6: 00740000 00020000 "ddwrt"
mtd7: 02c40000 00020000 "linux"
mtd8: 04480000 00020000 "netgear"
mtd9: 12c00000 00020000 "plex"
mtd10: 05780000 00020000 "reserve"
mtd11: 00080000 00020000 "crashdump"
mtd12: 00380000 00020000 "language"
mtd13: 00120000 00020000 "nvram"
mtd14: 00120000 00020000 "pot"


Then you need to find something in the original firmware which can be "mis-used" to transfer the cfe.bin to your local computer. scp, tftp, ftp

If you're saavy, you can also "mis-use" the webserver of the original firmware to download it, by changing the default directory to /tmp there is no singular way to save & transfer the CFE.bin which works for all routers/devices.

Some possible useful hints: but all broadcom based
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=140581#140581
https://wiki.dd-wrt.com/wiki/index.php/CFE_backup
https://openwrt.org/docs/techref/bootloader/cfe
http://mutt.com/tag/cfe/

All of this is beyond my "playing" around experience and I have not yet delved into this level of "hacking" yet... no time or real need... My time is too valuable to spend it on this right now... Maybe one day I will make the time for it.

Otherwise, feel free to contribute and make a how-to guide to help me and others.

_________________
FORUM RULES

TIPS/TRICKS: Best QCA Wifi Settings | Latency tricks | QoS Port priority | NEVER USE MU-MIMO |
Why to NOT use MU-MIMO | Max Wifi Pwr by Country | Linux Wifi Pwr | AC MCS & AX MCS | QCA 5Ghz chnls to use | WIFI Freq WIKI | TFTP R7800 | Don't buy AX | IPERF3 How-To

[R9000]52396 nightly (Main Router)
[EA8500]43192 & 45493 (2xOffsite)
[R7800] resting
[WDR3600]BS 44715 (Offsite)
[A7v5]BS 43038 (Offsite+spare napping)
zen1932
DD-WRT User


Joined: 22 Feb 2018
Posts: 77

PostPosted: Wed Jan 06, 2021 16:03    Post subject: Reply with quote
after your boot log, the partition 'ART' is located
at 0x7f0000, this device has a flash of 8MB.

So you should search for a 8MB flash and AR9330 based
similar router.
o2bad455
DD-WRT User


Joined: 08 Oct 2015
Posts: 252

PostPosted: Wed Jan 06, 2021 17:37    Post subject: Reply with quote
Good stuff here! Admittedly, matching the SoC would be easiest/best if there were a close enough match, but it just seems to me that the focus should be on matching the CPU and wireless families (as well as obviously minimum flash size for the build). Clock speed is a red herring, at least from slower build to faster hardware.

Question: Would the System on a Chip (SoC) itself be irrelevant as long as its internal components (mainly cpu family and wireless family, but please correct me if I'm wrong) were matched (as well as obviously minimum flash size for the build, and possibly minimum RAM size for the OS), even if only as discrete components in a supported device build? Or, is there something special about OS parameters for a SoC?

I'd thought SoC was mainly packaging (with some obvious size/cost benefits) along the lines of a re-branded device where the mere movement of discrete comonents onto a SoC should make little difference to operation, except possibly allowing for potentially faster clock speeds due to shorter interconnections, although temperatures might be more critical depending on SoC heat-sink/fan. But clock speed can be tweaked anyway such as we've done from the old WRT's to more recent R7000's (which I've overclocked 20-60%, and ran one at +20% for over a year up-time with no related issues). Besides, a slower-clocked build (e.g., 350 MHz) would likely run just fine out-of-the-box on slightly faster hardware (e.g., 400 MHz).
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 1783
Location: Illinois Moderator

PostPosted: Wed Jan 06, 2021 17:48    Post subject: Reply with quote
The key to making it work is getting the CFE.bin and then looking at the details contained in there to be able to tweak it to make dd-wrt work...

AFAIK, BS is the only one left that can do that work. Eko, Tornado, Sash, Markus are all doing other things and can't help.

The issue is that all this is a hazing ritual to ferret out the real developers from the everyday casual hack like me...

Again, I need to focus my time on keeping my day job and then family.... this is just a dumb router that helps me get online....I am not making a career out of it, nor any side-cash...purely volunteering too much time already...

I am moving on now. Best of luck and maybe another lurking guru will chime in with real details to help put together a how-to guide....

_________________
FORUM RULES

TIPS/TRICKS: Best QCA Wifi Settings | Latency tricks | QoS Port priority | NEVER USE MU-MIMO |
Why to NOT use MU-MIMO | Max Wifi Pwr by Country | Linux Wifi Pwr | AC MCS & AX MCS | QCA 5Ghz chnls to use | WIFI Freq WIKI | TFTP R7800 | Don't buy AX | IPERF3 How-To

[R9000]52396 nightly (Main Router)
[EA8500]43192 & 45493 (2xOffsite)
[R7800] resting
[WDR3600]BS 44715 (Offsite)
[A7v5]BS 43038 (Offsite+spare napping)
o2bad455
DD-WRT User


Joined: 08 Oct 2015
Posts: 252

PostPosted: Thu Jan 07, 2021 13:11    Post subject: Reply with quote
Thanks and understood @msoengineer! I'd also have to agree with your advice to @mohit0121 about moving on to fresher hardware. Even if the build I'd mentioned earlier had both flashed and booted, I just realized that it doesn't support repeater mode from the wireless mode pull-down menu (the intended application IIRC). Not much of a reward for all the effort involved, unless solely an academic exercise (which is ok too). Cheers!
mohit0121
DD-WRT Novice


Joined: 05 Jan 2021
Posts: 9

PostPosted: Mon Jan 11, 2021 9:49    Post subject: Reply with quote
Gentleman,
once again thank you so much for the information, its indeed very useful.

@MSOengineer, I certainly respect your time and agree what you said.

@o2bad455 - Thank you so much for contributing, I cannot thank you guys enough.

apparently, I happened to open the router and thats what i found

SOC: Atheros AR9331-AL3A
FP30V84.K3
1532
TAIWAN

Ram : Etron Tech : EM6AA160TSB-5G
T10CC06BKT612.12
what do you guys think, can this lead us somewhere?
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14249
Location: Texas, USA

PostPosted: Mon Jan 11, 2021 17:05    Post subject: Reply with quote
https://dd-wrt.com/donations/

https://dd-wrt.com/router-detection/

Could've sworn I already posted this in this thread...

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
mohit0121
DD-WRT Novice


Joined: 05 Jan 2021
Posts: 9

PostPosted: Tue Jan 19, 2021 12:13    Post subject: Reply with quote
Hello Gurus,

after lot of back and forth emails with brain slayer, I got to know the generic uimage that should be compatible with my router is glinet ar 150 or 8 devices. I have downloaded the firmware from the betas ddwrt section but the irony is my router doesnt let me even upgrade the router from the OEM GUI. when i tried to connect via telnet then i got to know that it only updates via the script and on the given instructions hardcoded in the router. I am hereby attaching those scripts, if any of the guru here can suggest something?

here is the script:

#!/bin/sh

if [ -f /tmp/.upgrade ]; then
echo -e "<p>upgrade already in progress</p>"
exit 1
else
echo "1" > /tmp/.upgrade
fi

IMAGE=$1
tftp_server=$2
MTD_PART=""

cleanup()
{
if [ -f /tmp/.upgrade ]; then
rm /tmp/.upgrade
fi
}

file_cleanup()
{
rm -rf /tmp/tmproot/* 2>/dev/null
umount /tmp/tmproot 2>/dev/null
rmdir /tmp/tmproot 2>/dev/null

}

file_cleanup_all()
{
rm -rf /tmp/tmproot/* 2>/dev/null
umount /tmp/tmproot 2>/dev/null
rmdir /tmp/tmproot 2>/dev/null
cleanup
}

download_image_tftp()
{
md5pass=0
dntries=0
while [ $md5pass -ne 1 -a $dntries -le 2 ]
do
echo "downloading ..."
tftp -l $IMAGE -r $IMAGE -g $tftp_server
# tftp -l $IMAGE.md5 -r $IMAGE.md5 -g $tftp_server
(( dntries = dntries + 1 ))
if [ -f $IMAGE ]; then
md5pass=1
fi
done
return $md5pass
}

download_image_tftp_md5()
{
md5pass=0
dntries=0
while [ $md5pass -ne 1 -a $dntries -le 2 ]
do
echo "downloading ..."
tftp -l $IMAGE -r $IMAGE -g $tftp_server
# tftp -l $IMAGE.md5 -r $IMAGE.md5 -g $tftp_server
(( dntries = dntries + 1 ))
if [ -f $IMAGE ]; then
if [ -f $IMAGE.md5 ]; then
md5sum $IMAGE > _$IMAGE.md5
mmddiff=`diff -q $IMAGE.md5 _$IMAGE.md5`
if [ -z "$mmddiff" ]; then
md5pass=1
else
md5pass=0
fi
fi
fi
done
return $md5pass
}

download_image()
{
if [ ! -z $tftp_server ]; then
download_image_tftp
return $?
fi
return 1
}

file_check()
{
#IMAGE=$1
if [ "${IMAGE}" = "ap121-2.6.31-squashfs" ]; then
file_cleanup
mkdir -p /tmp/tmproot
mount none /tmp/tmproot -t tmpfs

cd /tmp/
download_image
dnverify=$?

if [ ! -f "${IMAGE}" ]; then
echo -e "Error:Could not upgrade File $IMAGE not found!"
file_cleanup_all
exit 1
fi
if [ $dnverify -ne 1 ]; then
echo "Error:md5 verify failed for File $IMAGE"
file_cleanup_all
exit 1
fi

mv /tmp/"${IMAGE}" /tmp/tmproot/
cp /etc/test.sh /tmp/tmproot/
# echo -e "Upgradation in Progress....." # added by Pallavi : status : nothing print on web
#echo -e '</p></body></html>'

killall -q autoscan.sh > /dev/null
killall -q udhcpc > /dev/null
killall -q ntpclient > /dev/null
killall -q zapd > /dev/null
killall -q dropbear > /dev/null
killall -q factoryreset > /dev/null
# flash_upload rootfs "${IMAGE}"
# . /etc/test.sh $image & 2> /dev/null
. /tmp/tmproot/test.sh &
else
if [ "${IMAGE}" = "vmlinux.lzma.uImage" ]; then
cd /tmp
download_image
dnverify=$?

if [ ! -f "${IMAGE}" ]; then
echo -e "Error:Could not upgrade File $IMAGE not found!"
cleanup
exit 1
fi
if [ $dnverify -ne 1 ]; then
echo "Error:md5 verify failed for File $IMAGE"
cleanup
exit 1
fi

flash_upload kernel "${IMAGE}"
rm "${IMAGE}" 2> /dev/null
else
echo -e "Error:Could not upgrade unknown File ${IMAGE}!"
rm "${IMAGE}" 2> /dev/null
fi
fi
}


flash_upload()
{
part=$1
image=$2
if [ $part = rootfs ]; then
echo -e "Upgradation in Progress....." # added by Pallavi : status : nothing print on web
#echo -e '</p></body></html>'
killall -q autoscan.sh > /dev/null
killall -q udhcpc > /dev/null
killall -q ntpclient > /dev/null
killall -q zapd > /dev/null
killall -q dropbear > /dev/null
#killall -q httpd > /dev/null
killall -q factoryreset > /dev/null
#killall -q wpa_supplicant > /dev/null
. /tmp/flash_rootfs.sh $image &
else
if [ $part = kernel ]; then
#echo "erasing kernel flash partition ..."
flash_eraseall /dev/mtd3 -q
#sleep 1
sync
#dd if=vmlinux.lzma.uImage of=/dev/mtd3
#echo -e "dd if=$image of=/dev/mtd3"
dd if=$image of=/dev/mtd3 status=noxfer
#sync
echo -e "Upgrade DONE"
#echo -e '</p></body></html>'
cleanup
else
cleanup
fi
fi
}

file_check
mohit0121
DD-WRT Novice


Joined: 05 Jan 2021
Posts: 9

PostPosted: Tue Jan 19, 2021 12:21    Post subject: Reply with quote
This is the Root full flash script file:

#!/bin/sh
#umount -a
mkdir -p /tmp/tmproot
mount none /tmp/tmproot -t tmpfs
cd /tmp/tmproot


if [ -z $1 ]; then
tftpserver=192.168.1.29
else
tftpserver=$1
fi

IMAGE=vmlinux.lzma.uImage
echo "downloading ..."
tftp -l $IMAGE -r $IMAGE -g $tftpserver
sleep 5

if [ -f $IMAGE ]; then
echo "downloaded "
else
echo "download of $IMAGE failed"
exit 1;
#if [ -f $IMAGE.MD5 ]; then
#echo "downloaded MD5"
#fi
fi

IMAGE=ap121-2.6.31-squashfs
echo "downloading ..."
tftp -l $IMAGE -r $IMAGE -g $tftpserver

#tftp -l $IMAGE.MD5 -r $IMAGE.MD5 -g 192.168.1.29
#sleep 3

if [ -f $IMAGE ]; then
echo "downloaded "
else
echo "download of $IMAGE failed"
exit 1;
#if [ -f $IMAGE.MD5 ]; then
#echo "downloaded MD5"
#fi
fi

#md5sum $IMAGE.MD5 > /tmp/md5
#mddiff='diff /tmp/md5 $IMAGE.MD5'
#rm /tmp/md5
#if [ -z $mddiff ]; then
# mdmatch=1
#else
# mdmatch=0
#fi

#if [ $mdmatch == 0 ]; then
# echo "CKSUM Fail"
# exit 1
#fi

#mkdir /tmp/tmproot/{proc,sys,usr,var,oldroot}
mkdir oldroot
mkdir sbin
mkdir proc
cp -a /bin .
cp -a /sbin .
#cp -ax /usr/{bin,sbin,lib} /tmp/tmproot/usr/
#cp -ax /var/{account,empty,lib,local,lock,nis,opt,preserve,run,spool,tmp,yp} /tmp/tmproot/var/
cp -a /dev .


ln -s busybox bin/tftp
#ln -s busybox bin/flash_eraseall
ln -s mtderase sbin/flash_eraseall
ln -s ../bin/busybox sbin/pivot_root
ln -s ../bin/busybox sbin/reboot
ln -s ../bin/busybox sbin/init

umount /proc
#pivot_root /tmp/tmproot/ /tmp/tmproot/oldroot
pivot_root . oldroot
mount none /proc -t proc

echo "erasing kernel ..."
flash_eraseall /dev/mtd2
sleep 1
dd if=vmlinux.lzma.uImage of=/dev/mtd2
echo "DONE"

echo "erasing rootfs..."
flash_eraseall /dev/mtd1
sleep 1
dd if=ap121-2.6.31-squashfs of=/dev/mtd1
echo "DONE"

#tftp -l vmlinux.lzma.uImage -r vmlinux.lzma.uImage -g 192.168.1.29
#flash_eraseall /dev/mtd2
#dd if= vmlinux.lzma.uImage of=/dev/mtd2

reboot
#pivot_root /oldroot /oldroot/tmp/tmproot
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum