Can't program region at .. flashing fonera 2200

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
fo02667
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 8

PostPosted: Fri Jan 06, 2012 16:51    Post subject: Can't program region at .. flashing fonera 2200 Reply with quote
i'm trying to flash my fonera 2200 by serial using V24 preSP2 but i receive this error:
Can't program region at 0xa81c0000: Unknown error

here my step:
RedBoot> fis init -f
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0xa8030000-0xa87e0000: ..........................................
................................................................................
.
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> load -r -v -b 0x80041000 linux.bin
Using default protocol (TFTP)
|
Raw file loaded 0x80041000-0x8066efff, assumed entry at 0x80041000
RedBoot> fis create -l 0x00630000 linux
... Erase from 0xa8030000-0xa8660000: ..........................................
.........................................................
... Program from 0x80041000-0x8066f000 at 0xa8030000: .........................V

Can't program region at 0xa81c0000: Unknown error


(i used -l 0x00630000 because i read from BrainSlayer i must use a size bigger than my file's one (linux.bin is 6479872 bytes long) aligned to x10000)
can someone help me please?
many thanks.
Sponsor
Sash
DD-WRT Guru


Joined: 20 Sep 2006
Posts: 17619
Location: Hesse/Germany

PostPosted: Fri Jan 06, 2012 18:58    Post subject: Reply with quote
there is an search function
_________________
Forum Guidelines...How to get help
&
Forum Rules
&
RTFM/STFW
&
Throw some buzzwords into the WIKI search Exclamation
_________________
I'm NOT rude, just offer pure facts!
_________________
Atheros (TP-Link & Clones, etc ) debrick service in EU
_________________
Guide on HowTo be Safe, Secure and Protect Your Online Anonymity!
fo02667
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 8

PostPosted: Fri Jan 06, 2012 19:52    Post subject: Reply with quote
i tried...
searching for "fonera 2200 flash program region"
i found 74 pages: in the first 10 can't find nothing useful.... must i to go on? Sad
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Fri Jan 06, 2012 21:08    Post subject: Reply with quote
If "fis init -f" doesn't help, you're out of luck due to bad flash. This is often seen in FON2200. The best you can do is to install DD-WRT V24 RC6.2 or OpenWrt. Remember to create a 0x10000 bytes dummy partition at 0xa81c0000.

DD-WRT Forum :: View topic - FON2100: "Can't program region at 0xa8320000"
DD-WRT Forum :: View topic - Fonera 2200 flashing error "Can't program region"

_________________
DD-WRT Forum - Atheros Recommended Build
fo02667
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 8

PostPosted: Fri Jan 06, 2012 21:36    Post subject: Reply with quote
thank you for your kind reply.
how can i obtain this: "create a 0x10000 bytes dummy partition at 0xa81c0000"?
the command:
fis create -b 0x80041000 -f 0xa81c0000 -l 0x002C0000 -e 0x00000000 rootfs
is the right one?
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Sat Jan 07, 2012 11:08    Post subject: Reply with quote
If you prefer DD-WRT V24 RC6.2, do this,
  • Connect Fonera to local network with internet.
  • Set gateway ip address to "bootp_my_gateway_ip".
  • Set local ip address to <local_ip_address>.
  • Set 83.141.4.210 (www.dd-wrt.com) to <server_address>.

Code:
RedBoot> fc bootp_my_gateway_ip 192.168.1.1
Update RedBoot non-volatile configuration - continue (y/n)? y
RedBoot> reset

Code:
RedBoot> ip -l 192.168.1.254/24 -h 83.141.4.210
IP: 192.168.1.254/255.255.255.0, Gateway: 192.168.1.1
Default server: 83.141.4.210
RedBoot> fis init -f
RedBoot> fis create -f 0xa81c0000 -l 0x10000 -n bad_0xa81c0000
RedBoot> fis create -f 0xa81b0000 -l 0x10000 -n nvram
RedBoot> load -r -v -b 0x80041000 -m http /dd-wrtv2/downloads/obsolete/release%20candidates/DD-WRT%20v24%20RC6.2/Atheros%20WiSoc/Fonera/vmlinux.bin.l7
RedBoot> fis create -r 0x80041000 -e 0x80041000 -l 0xc0000 vmlinux.bin.l7
RedBoot> load -r -v -b 0x80041000 -m http /dd-wrtv2/downloads/obsolete/release%20candidates/DD-WRT%20v24%20RC6.2/Atheros%20WiSoc/Fonera/root.fs
RedBoot> fis create rootfs
RedBoot> fis list
RedBoot> fconfig -d boot_script_data
boot_script_data:
Enter script, terminate with empty line
>> fis load -l vmlinux.bin.l7
>> exec
>>
Update RedBoot non-volatile configuration - continue (y/n)? y

fonera_flashing.txt

If you'd like to try OpenWrt Backfire 10.03.1, do this:
  • Connect Fonera to local network with internet.
  • Set gateway ip address to "bootp_my_gateway_ip".
  • Set local ip address to <local_ip_address>.
  • Set 78.24.191.177 (downloads.openwrt.org) to <server_address>.

Code:
RedBoot> fc bootp_my_gateway_ip 192.168.1.1
Update RedBoot non-volatile configuration - continue (y/n)? y
RedBoot> reset

Code:
RedBoot> ip -l 192.168.1.254/24 -h 78.24.191.177
IP: 192.168.1.254/255.255.255.0, Gateway: 192.168.1.1
Default server: 78.24.191.177
RedBoot> fis init -f
RedBoot> fis create -f 0xa81c0000 -l 0x10000 -n bad_0xa81c0000
RedBoot> load -r -v -b 0x80041000 -m http /backfire/10.03.1/atheros/openwrt-atheros-vmlinux.lzma
RedBoot> fis create -r 0x80041000 -e 0x80041000 -l 0xe0000 vmlinux.bin.l7
RedBoot> load -r -v -b 0x80041000 -m http /backfire/10.03.1/atheros/openwrt-atheros-root.squashfs
RedBoot> fis create rootfs
RedBoot> fis list
RedBoot> fconfig -d boot_script_data
boot_script_data:
Enter script, terminate with empty line
>> fis load -l vmlinux.bin.l7
>> exec
>>
Update RedBoot non-volatile configuration - continue (y/n)? y

_________________
DD-WRT Forum - Atheros Recommended Build
fo02667
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 8

PostPosted: Sat Jan 07, 2012 19:38    Post subject: Reply with quote
thank again.
i can't connect fonera as you explain.
anyway, i use the command you wrote to flash.
this i can Smile
fo02667
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 8

PostPosted: Sun Jan 08, 2012 0:12    Post subject: Reply with quote
following your instruction i had:
RedBoot> fis create rootfs
... Erase from 0xa81d0000-0xa8484000: ..........................................
..
... Program from 0x80041000-0x802f5000 at 0xa81d0000: .V
Can't program region at 0xa81e0000: Unknown error

so looping your technique i used:
RedBoot> fis create -f 0xa81e0000 -l 0x10000 -n bad_0xa81e0000
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .

but unfortunately i have the same problem on a different flash address.
going on in the same way i finished the space available:
....
RedBoot> fis create -f 0xa8520000 -l 0x10000 -n bad_0xa8520000
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> fis create rootfs
Can't locate 2b4000(2834432) bytes free in FLASH
now the situation is:
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0xA8000000 0xA8000000 0x00030000 0x00000000
vmlinux.bin.l7 0xA8030000 0x80041000 0x000C0000 0x80041000
nvram 0xA81B0000 0xA81B0000 0x00010000 0xFFFFFFFF
bad_0xa81c0000 0xA81C0000 0xA81C0000 0x00010000 0xFFFFFFFF
bad_0xa81e0000 0xA81E0000 0xA81E0000 0x00010000 0x80041000
bad_0xa81f0000 0xA81F0000 0xA81F0000 0x00010000 0x80041000
bad_0xa8200000 0xA8200000 0xA8200000 0x00010000 0x80041000
bad_0xa8220000 0xA8220000 0xA8220000 0x00010000 0x80041000
bad_0xa82d0000 0xA82D0000 0xA82D0000 0x00010000 0x80041000
bad_0xa83f0000 0xA83F0000 0xA83F0000 0x00010000 0x80041000
bad_0xa8400000 0xA8400000 0xA8400000 0x00010000 0x80041000
bad_0xa8410000 0xA8410000 0xA8410000 0x00010000 0x80041000
bad_0xa8420000 0xA8420000 0xA8420000 0x00010000 0x80041000
bad_0xa8430000 0xA8430000 0xA8430000 0x00010000 0x80041000
bad_0xa8440000 0xA8440000 0xA8440000 0x00010000 0x80041000
bad_0xa8450000 0xA8450000 0xA8450000 0x00010000 0x80041000
bad_0xa84d0000 0xA84D0000 0xA84D0000 0x00010000 0x80041000
bad_0xa84e0000 0xA84E0000 0xA84E0000 0x00010000 0x80041000
bad_0xa84f0000 0xA84F0000 0xA84F0000 0x00010000 0x80041000
bad_0xa8500000 0xA8500000 0xA8500000 0x00010000 0x80041000
bad_0xa8510000 0xA8510000 0xA8510000 0x00010000 0x80041000
bad_0xa8520000 0xA8520000 0xA8520000 0x00010000 0x80041000
FIS directory 0xA87E0000 0xA87E0000 0x0000F000 0x00000000
RedBoot config 0xA87EF000 0xA87EF000 0x00001000 0x00000000
RedBoot>

and now Embarassed ? what can i do?
have i misunderstood something?
thank you again.
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Sun Jan 08, 2012 12:52    Post subject: Reply with quote
You're definitely in deep trouble because the bad sectors could be more than what you have found. I think the most important thing you have to do is to find out exactly how many bad sectors there are and where they are. It's a bit complicated.
Code:
RedBoot> fis init -f
RedBoot> load -r -v -b 0x80041000 openwrt-atheros-root.squashfs
RedBoot> fis create rootfs

Ignore the error message.

RedBoot> fis create -f 0xa8030000 -l 0x7b0000 -n rootfs
RedBoot> load openwrt-atheros-vmlinux.elf
RedBoot> go

Now you should be able to open 192.168.1.1 in the browser or telent/ssh 192.168.1.1.

I haven't figured out how to test the flash memory within rootfs. Check the download site of OpenWrt for "mtd-utils-*", especially the "mtd-utils-flash-eraseall". I think you should ignore "nandtest" because the flash in Fonera is type serial NOR.
Code:
opkg update
opkg install mtd-utils-flash-eraseall
cat /proc/mtd
./flash_eraseall /dev/mtd1

/dev/mtd1 should be the rootfs. Either download mtd-utils-flash-eraseall to your local host or set up fonera to connect to the internet.

Mtdutils - Texas Instruments Embedded Processors Wiki

_________________
DD-WRT Forum - Atheros Recommended Build
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sun Jan 08, 2012 13:27    Post subject: Reply with quote
If those are really flash chip errors then there is not much to pray for, 1.1MB out of 8MB and spread over a couple of places is not something you can map out.

Make sure that you have a good power supply (7.5V, 1A) so that the errors are not due to too low programming voltage.

_________________
Kernel panic: Aiee, killing interrupt handler!
fo02667
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 8

PostPosted: Mon Jan 09, 2012 10:29    Post subject: Reply with quote
@fyi2000: i got
RedBoot> fis create -f 0xa8030000 -l 0x7b0000 -n rootfs
--> here i have some problems with lenght (x10000 instead of x7b0000)
RedBoot> load openwrt-atheros-vmlinux.elf
--> ok
RedBoot> go
--> lots of errors ( Sad ) and i can't reach web interface nor have telnet acces.

Anyway i do have telnet access via putty: infact i can flash with original fon firmware (0.7.1 r1) via ap51 regularly.
tonight i try to install mtd-utils-flash-eraseall using ipk (not opk) and use it. i'll post the results.

@LOM: i have a good power supply (7.5V, 1A). thank you.
fyi2000
DD-WRT Guru


Joined: 04 Apr 2010
Posts: 642

PostPosted: Mon Jan 09, 2012 14:46    Post subject: Reply with quote
fo02667 wrote:
Anyway i do have telnet access via putty: infact i can flash with original fon firmware (0.7.1 r1) via ap51 regularly.

Really? Good luck. You'll need it.

DD-WRT Forum :: View topic - Openwrt K on la Fonera without serial console...when DD-WRT?
Heini66 wrote:
fon fonera:
Code:
RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xA8000000  0xA8000000  0x00030000  0x00000000
rootfs            0xA8030000  0xA8030000  0x00700000  0x00000000
vmlinux.bin.l7    0xA8730000  0x80041000  0x000B0000  0x80041000
FIS directory     0xA87E0000  0xA87E0000  0x0000F000  0x00000000
RedBoot config    0xA87EF000  0xA87EF000  0x00001000  0x00000000

_________________
DD-WRT Forum - Atheros Recommended Build
fo02667
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 8

PostPosted: Mon Jan 09, 2012 16:26    Post subject: Reply with quote
i don't need luck: i flashed successfully last night with original firmware Very Happy .
i opened port 22 using "onestep.html/twostep.html technique".
i tried access via putty and it was OK.
tonight using HFS i'll get ipk file of texas tool on fonera and i'll try to install and use it Wink
thank you for your support. see you later for result.
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Mon Jan 09, 2012 17:48    Post subject: Reply with quote
It seems to me that the flash erase leaves stuck bits from previous firmware which can explain why you can reload that firmware - the stuck bits in flash will match the stock firmware you reload.
Have you tried to load another version of stock firmware?
Shouldn't work if stuck bits is your problem.

_________________
Kernel panic: Aiee, killing interrupt handler!
fo02667
DD-WRT Novice


Joined: 06 Jan 2012
Posts: 8

PostPosted: Tue Jan 10, 2012 2:16    Post subject: Reply with quote
results:
root@OpenWrt:~# ls *.ipk
mtd-utils-flash-eraseall_20090227-1.1_ar71xx.ipk
mtd_5_mips.ipk
root@OpenWrt:~# ipkg install mtd-utils-flash-eraseall_20090227-1.1_ar71xx.ipk
Clearing state_want and state_flag for pkg=mtd-utils-flash-eraseall (arch_priority=0 flag=16 want=2)
Nothing to be done
An error ocurred, return value: 4.
Collected errors:
Cannot find package mtd-utils-flash-eraseall.
Check the spelling or perhaps run 'ipkg update'
root@OpenWrt:~#

i tried also:
root@OpenWrt:~# ipkg install mtd_5_mips.ipk
Upgrading mtd on root from 4 to 5...
Configuring mtd
Done.

to confirm that ipkg works (then i removed it).
any suggestions?
Display posts from previous:    Page 1 of 1
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