Replacing Adam2 booloader with PSP bootloader

All about firmwares for routers. Support for RouterTech firmwares is here too.
Post Reply
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by thechief » Mon Apr 26, 2010 12:28 pm

mysticalos wrote:and final question, which PSP firmware would i throw on 604T aftewards, i'm assuming routertech-ar7wrd-pspboot-firmware-4ports-20100408.zip
Yes.
mysticalos wrote:So i could not find a single telnet app worth a drats with a GUI for mac, i tried command line but for life of me could not figure out the unit upload command. "put" doesn't work. i tried any other one word actions i could think of, upload, send. dir and other common commands worked but what's the upload command for command line telnet?
You can't use telnet. You have to use wget (from inside the router) or scp.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
mysticalos
Experienced
Experienced
Posts: 237
Joined: Sun Feb 25, 2007 11:46 pm
Location: Georgia, USA
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by mysticalos » Tue Apr 27, 2010 3:11 am

ok, so i think i uploaded firmware wrong. does it still go to mtd4? cause it was smooth as candy until i tried to flash via ftp. i hope i didn't nuke boot loader cause the psp boot loader was working.

when i did get env from psp bootloader i got this

BUILD_OPS 0x201
bootloaderVersion 1.4.0.8
ProductID AR7WRD
HWRevision Unknown
SerialNumber none
IPA 192.168.1.1
BOOTCFG m:f:"mtd1"
HWA_0 00:50:F1:12:27:06
mtd2 0x90000000,0x90010000
mtd3 0x90010000,0x90020000
mtd0 0x900a9000,0x90400000
mtd1 0x90020090,0x900a9000
mtd4 0x90020000,0x90400000
MAC_PORT 1
MEMSZ 0x01000000
FLASHSZ 0x00400000
MODETTY0 38400,n,8,1,hw
MODETTY1 38400,n,8,1,hw
CPUFREQ 150000000
MIPSFREQ 150000000
SYSFREQ 125000000
PROMPT psbl>

i was logged into ftp using adam2/adam2 and everything was fine until i uploaded firmware to mtd4. where was i supposed to upload it?

edit: ok i can still get to bootloader through ftp, environment sitll looks same. just can't get firmware to go up, reconfirming that with a G604T now running a psp bootloader i use firmware RouterTech_3.6.0D_20100408_2.93_AR7WRD_psbl_firmware.upgrade.img ?

Basically what i did was this
ftp> quote MEDIA FLSH
Media set to FLSH.
ftp> bin
Type set to I.
ftp> put RouterTech_3.6.0D_20100408_2.93_AR7WRD_psbl_firmware.upgrade.img "fs mtd4"

then once upload completed rebooted, no working firmware. I miss something or is it just a bad mtd? I looked the mtd doc in 2.93 downloads and it says

setenv mtd0 0x9009e000,0x90400000
setenv mtd1 0x90020090,0x9009e000
setenv mtd2 0x90000000,0x90010000
setenv mtd3 0x90010000,0x90020000
setenv mtd4 0x90020000,0x90400000

for this firmware image, but i thought the correct values were already set by the boot loader image for 604t and the values i have do not match this? In case the issue is simply trying to go straight to 2.93 i'm gonna try mtd4 again using 2.91.1 in case my issue is simply failure to follow instruction and use that version first since your script set mtu values for 2.91.1 and i suspect 2.93 flashing from ftp doesn't change them like it would updating from webui ;)
Last edited by mysticalos on Tue Apr 27, 2010 4:13 am, edited 1 time in total.
User avatar
mysticalos
Experienced
Experienced
Posts: 237
Joined: Sun Feb 25, 2007 11:46 pm
Location: Georgia, USA
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by mysticalos » Tue Apr 27, 2010 4:01 am

ok yep that was the problem, with your g604t file i need to flash ti with 2.91.1 or it screws up. i'm now on 2.93 with what appears to be a psp bootloader.

Code: Select all

BUILD_OPS	0x201
bootloaderVersion	1.4.0.8
ProductID	AR7WRD
HWRevision	Unknown
SerialNumber	none
IPA	192.168.1.1
BOOTCFG	m:f:"mtd1"
HWA_0	00:50:F1:12:27:06
mtd2	0x90000000,0x90010000
mtd3	0x90010000,0x90020000
mtd4	0x90020000,0x90400000
MAC_PORT	1
MEMSZ	0x01000000
FLASHSZ	0x00400000
MODETTY0	38400,n,8,1,hw
MODETTY1	38400,n,8,1,hw
CPUFREQ	150000000
MIPSFREQ	150000000
SYSFREQ	125000000
PROMPT	psbl>
vcc_encaps0	0.0
vcc_encaps1	0.0
vcc_encaps2	0.0
vcc_encaps3	0.0
vcc_encaps4	0.0
vcc_encaps5	0.0
vcc_encaps6	0.0
vcc_encaps7	0.0
mtd1	0x90020090,0x9009e000
mtd0	0x9009e000,0x90400000
memchk.sh	1
checksync.sh	1 20
cron_la.sh	1
led_conf	led.g604t
dsp_ver	dsp75A
cron_enable	1
modulation	0x10

Code: Select all

Product Information
Model Number	 	RouterTech AR7WRD
HW Revision	 	Unknown
Serial Number	 	none
Ethernet MAC	 	00:50:F1:12:27:06
DSL MAC	 	
AP MAC	 	

Software Versions
Gateway	 	3.6.0D
ATM Driver	 	7.05.01.00
DSL HAL	 	7.05.01.00
DSL Datapump	 	7.05.01.00 Annex A
SAR HAL	 	01.07.2c
PDSP Firmware	 	0.54
Wireless Firmware	 	N/A
Wireless APDK	 	N/A
Boot Loader	 	1.4.0.8
I suspect this looks good? :)I noticed it's all out of order but when i ran a defrag check it returned 0 for fragmentation and seten defrag defrag didn't re order it like it normally would under adam2, is this cause psp doesn't need to defrag?
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by thechief » Tue Apr 27, 2010 9:04 am

Your problem with the mtd sizes arose because you flashed with ftp. Of course ftp knows nothing about firmwares or mtd partition sizes, so it just does a file transfer. The pctool will correct the partition sizes, as will the webgui. And, by the way, all you needed to do after the ftp flash of 2.93 was to correct the mtd partition sizes manually.

Moral: when flashing a firmware with raw ftp, better make sure that you get the mtd partition sizes correct.

As far as sorting the environment after defragmentation goes, that is not part of the defragmentation process (either with Adam2 or pspboot). If it happens with Adam2 (and that would only happen if you do it from within the firmware), it is because of extra coding.

Now you need to restore your maca/macc/mac_ap settings from your backup environment, so that your MAC addresses can be displayed in status information (I don't believe they are used for any other useful purpose).

With regard to keeping things defragmented, run this

Code: Select all

setenv autodefrag 1
and the bootloader will defragment the environment on every bootup.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
mysticalos
Experienced
Experienced
Posts: 237
Joined: Sun Feb 25, 2007 11:46 pm
Location: Georgia, USA
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by mysticalos » Tue Apr 27, 2010 9:29 am

should i even bother putting the usb junk back? this router doesn't even have usb so that was useless junk anyways. I put these 2 back. When I did setenv maca 00:0f:3d:b0:c9:b3 it translated to HWA_0 in environment though.

HWA_0 00:0f:3d:b0:c9:b3
mac_ap 00:0f:3d:b0:c9:b4

this is my original environment. anything else i should throw back in?

Code: Select all

System environment (/proc/sys/dev/adam2/environment)
HWRevision   Unknown
ProductID   AR7WRD
SerialNumber   none
StaticBuffer   128
autoload   1
autoload_timeout   5
bootloaderVersion   0.22.02
bootserport   tty0
checksync.sh   2
connection0   0xb19
connection1   0
cpufrequency   150000000
cron_enable   1
cron_la.sh   1
dsp_ver   dsp75A
firstfreeaddress   0x9401d328
flashsize   0x00400000
led_conf   led.g604t
mac_ap   00:0f:3d:b0:c9:b4
maca   00:0f:3d:b0:c9:b3
memchk.sh   1 30
memsize   0x01000000
modetty0   38400,n,8,1,hw
modetty1   38400,n,8,1,hw
modulation   0x1
mtd0   0x90099000,0x903f0000
mtd1   0x90010090,0x90099000
mtd2   0x90000000,0x90010000
mtd3   0x903f0000,0x90400000
mtd4   0x90010000,0x903f0000
my_ipaddress   192.168.1.1
prompt   Adam2_AR7RD
req_fullrate_freq   125000000
sysfrequency   125000000
usb_board_mac   00.0d.88.22.03.02
usb_man   N/A
usb_pid   0x0
usb_prod   N/A
usb_rndis_mac   00.0d.88.11.03.02
usb_serial   1234567890
usb_vid   0x0
vcc_encaps0   0.0
vcc_encaps1   0.0
vcc_encaps2   0.0
vcc_encaps3   0.0
vcc_encaps4   0.0
vcc_encaps5   0.0
vcc_encaps6   0.0
vcc_encaps7   0.0
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by thechief » Tue Apr 27, 2010 11:04 am

There's nothing there that needs to be added to the env.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
User avatar
mysticalos
Experienced
Experienced
Posts: 237
Joined: Sun Feb 25, 2007 11:46 pm
Location: Georgia, USA
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by mysticalos » Wed Apr 28, 2010 12:45 am

thechief wrote:There's nothing there that needs to be added to the env.
so the autoload stuff is adam2 only? i actually noticed under psp boot up seems to take a little longer, that normal?
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by thechief » Wed Apr 28, 2010 12:52 am

mysticalos wrote:so the autoload stuff is adam2 only?
Yes.
mysticalos wrote:i actually noticed under psp boot up seems to take a little longer, that normal?
Not normally - but in this pspboot mod, yes - the default timeout is longer - to give more room for pctool and other tools to connect to the bootloader (can be changed with "autoload_timeout").
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
felixmarra
Regular
Regular
Posts: 52
Joined: Mon Dec 24, 2007 12:25 pm

Re: Replacing Adam2 booloader with PSP bootloader

Post by felixmarra » Thu Jun 10, 2010 9:40 am

Can it be "safe" to change the bootloader using Ciclamab? What do u think?
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by thechief » Thu Jun 10, 2010 11:37 am

Using JTAG, it should be fine. It can be less fiddly than command-line jtag utilities.

But note that, when changing a bootloader, nothing is absolutely safe - which is why you shouldn't try it unless you have a functional JTAG cable.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
felixmarra
Regular
Regular
Posts: 52
Joined: Mon Dec 24, 2007 12:25 pm

Re: Replacing Adam2 booloader with PSP bootloader

Post by felixmarra » Thu Jun 10, 2010 11:49 am

thechief wrote:Using JTAG, it should be fine. It can be less fiddly than command-line jtag utilities.
That is why i asked ;)
But note that, when changing a bootloader, nothing is absolutely safe - which is why you shouldn't try it unless you have a functional JTAG cable.
That is obviously, but thanks the same to remind it ;)
bovirus
Regular
Regular
Posts: 95
Joined: Sun Jun 04, 2006 8:07 pm

Re: Replacing Adam2 booloader with PSP bootloader

Post by bovirus » Sat Jun 12, 2010 8:37 am

You can use also just DEBRICK-MOD.EXE comamnd line utility inside Ciclamab folder.

To have all DEBRICK-MOD.EXE parameter type it without parameters and you will have the command list

Typing DEBRICK-MOD.EXE > DEBRICK-MOD.TXT you will have in DEBRICK-MOD.TXT all command line parameters.

The most used commands are

DEBRICK-MOD -backup:adam2 (to backup current MTD2 Adam partition)
DEBRICK-MOD -backup:mtd3 (to backup current MTD3 partition)
DEBRICK-MOD -flash:adam2 (to flash current MTD2 Adam partition from ADAM2.BIN file)
DEBRICK-MOD -flash:mtd3 (to flash current MTD2 Adam partition from MTD3.BIN file)

DEBRICK-MOD -erase:wholeflash (to erase wholeflash)
DEBRICK-MOD -backup:wholeflash (to backup wholeflash)
DEBRICK-MOD -erase:wholeflash (to flash wholeflash from WHOLEFLASH.BIN file)

To do that you need to load and run GIVEIO service.

To change the bootloader don't create hardware problem.

If you have some problem you can reflash it.

Also it's beter to save the current bootloader and MTD3 partition for backup.
paaaja
Regular
Regular
Posts: 45
Joined: Fri Jun 04, 2010 5:18 pm

Re: Replacing Adam2 booloader with PSP bootloader

Post by paaaja » Tue Jul 13, 2010 11:09 pm

5. I transferred the new PSP bootloader binary (psbl_4M_16M_AMD_AR7RD.bin) to the router's /var/ directory, with WinSCP
How have you been able to do that, Thechief? I cannot log on to my router otherwise than via HTTP. I even checked the Access Control, everything is in the default state here. When I try WinSCP to log on via FTP, I'm simply refused, and other options don't work at all. Login information are OK, I can log in via Web browser

EDIT: Telnet also works, I logged in with "root" and my password. I just cannot figure out necessary commands (I am logging via telnet in Windows 2000).
Last edited by paaaja on Wed Jul 14, 2010 9:46 am, edited 2 times in total.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Replacing Adam2 booloader with PSP bootloader

Post by thechief » Wed Jul 14, 2010 8:02 am

paaaja wrote:How have you been able to do that, Thechief?
Very easily - RouterTech wireless and 4mb-flash firmwares have the necessary stuff built-in. If you are using another firmware, you're out of luck with scp.
paaaja wrote:I cannot log on to my router otherwise than via HTTP.
You should be able to login via telnet. If you can't, then you have a serious fault with your firmware.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
paaaja
Regular
Regular
Posts: 45
Joined: Fri Jun 04, 2010 5:18 pm

Re: Replacing Adam2 booloader with PSP bootloader

Post by paaaja » Wed Jul 14, 2010 9:50 am

thechief wrote:You should be able to login via telnet. If you can't, then you have a serious fault with your firmware.
I can use telnet, although I am not sure if telnet in Windows 2000 is enough. It just reminds me that 'scp' command hasn't been found. And I have a full 4MB firmware (on D-link DSL-584T), System Log confirms this.
Post Reply