Вы находитесь на странице: 1из 16

Howto Upgrading firmware on SAR715 using Linux

Machasm.......... The method I used to upgrade my Sar715 ADSL modem router from solwise was to setup a DHCP server running on my PC to issue an address to the router when booting from the Ethernet interface, in combination with a tftp program to push the firmware to the router.

I thought I'd better write this for all us non-conformists out there :-) Well, depending on your experience with Linux this might be very daunting or easy for you.... It's based on Machasm guide and using RedHat 9. Let us begin. Things to have: 1. 2. 3. 4. 5. 6. http://www.solwiseforum.co.uk/downloads/files/sar7x5sr2_1.21.zip http://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/minicom-2.00.0-12.i386.rpm http://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/dhcp-3.0pl1-23.i386.rpm http://ftp.redhat.com/pub/redhat/linux/9/en/os/i386/RedHat/RPMS/tftp-server-0.32-4.i386.rpm Serial cable. Hardware ethernet address of router. Something like: 00:30:EB:C6:49:EE

[Note 1: Install above rpms by typing, as root: rpm -Uvh *.rpm (if they are all in the same directory). For firmware, type: unzip sar7x5sr2_1.21.zip then type: mv ea715-3d3121-bootcode.bin boot.bin and mv ea715-3d3121-030521a-tbc.bin flash.bin Then type: mkdir /var/boot and finally, mv *.bin /var/boot change directory to /var/boot and check they are there.]

Things to configure: 1. 2. 3. 4. 5. Minicom with serial cable connection Changing IP address DHCP Server TFTP Server Flashing

1. Minicom with serial cable connection: Hook up the serial cable that came with the router Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry 1

Open a console. As root, (su then type your root password) Invoke minicom by: [root@blackhat root]$ minicom You should have a black screen. Press ctrl-a then z. The terminal should be:

1.1 Select o and then port settings. Set them up as follows:

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

1.2

Then select modem and dialing settings. Set them as follows:

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

1.3

Then save and exit.

Invoke it again as minicom -s and check that what you entered is still there. Then save as 'default'.

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

1.4

Envoke as minicom default, then press enter.

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

Success (overleaf)

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

If there is something wrong, try doing it all again but invoking as $ minicom -s

2. Changing IP address Keeping the console open with the admin prompt showing, open another console and su - to root. type :
/sbin/ifconfig eth0 up 192.168.7.2 netmask 255.255.255.0 (or leave out the /sbin/ bit if you typed su -)

check it worked by typing ifconfig again, which should show your new IP address.

3. DHCP Server Now you should have already placed flash.bin and boot.bin in /var/boot, if not follow 'Note 1' on the first page to do so. Make sure just the PC you are working on is connected to the router at this stage, through a network cable and a serial cable. Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry 7

Open up a console again (use pico or vi), and type: pico -w /etc/dhcpd.confand make it look like:
# Custom dhcpd configuration for 2 hosts ddns-update-style ad-hoc; default-lease-time max-lease-time option broadcast-address 600; 7200; 192.168.7.255;

subnet 192.168.7.0 netmask 255.255.255.0 { } host router { hardware ethernet 00:30:EB:C6:49:EE; fixed-address 192.168.7.1; filename "flash.bin"; server-name "laptop"; next-server 192.168.7.2;

} save by hitting ctrl-x and selecting Y (server-name can be anything) [Note 2: you must make sure the hardware ethernet address is your one and not the one above. It should be on the bottom of the router] Now type: touch /var/lib/dhcp/dhcp.leasesand service dhcpd restart (You should get one failed and one ok). To verify that the service is listening run:
netstat -an | grep 67

You should see a response that looks like:


udp 0 0 0.0.0.0:67 0.0.0.0:*

4. TFTP Server If using INETD put the following line in your /etc/inetd.conf file:
tftp dgram udp wait root /usr/sbin/tcpd in.tftpd -c -u tftpd -s /var/boot

If using XINETD, /etc/xinetd.d/tftp should look like: Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry 8

# default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -c -u tftpd -s /var/boot disable = no

Now type: useradd -d /dev/null -s /bin/nologin tftpd and: chown -R tftpd /var/boot now: service xinetd restart To verify that the service is listening run:
netstat -an | grep 69

You should see a response that looks like:


udp 0 0 0.0.0.0:69 0.0.0.0:*

If you do not see this, double check your inetd.conf or xinetd tftp file and then restart the service using above command.

5. Flashing Let's run a check on what should have been done and what should be running: 1. You should have a serial cable connected to the router and minicom still running with the admin prompt still showing, and the router should still be switched off. 2. You should have a lan connection to the router, with no other pc connected (same pc used for serial cable and network cable) 3. You should have boot.bin and flash.bin in /var/boot 4. You should have the dhcp server running 5. You should have the tftp server running 6. If not, go back to the other steps.

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

Turn on the router and immediately hit * (Shift 8) in minicom console window to halt the boot process. You should be presented with this window (taken form Machasm's guide0.

Type E to boot from Ethernet. You should see this (Note: you should see boot.bin)

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

10

At this point the boot file is in the router but you must then save it! In the minicom console type
Flashfs rewrite boot.bin

You should see this

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

11

Next type flashfs update you should see this

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

12

If you type restart the router should reboot and then return to this prompt if all has gone well. Now that we have accomplished the first part we can now proceed to flashing the firmware code. In order to do this we simply change the boot file being sent by the DHCP server. Change the file in the options of the DHCP server (/etc/dhcpd.conf) to flash.bin. Dont forget to save it. Then type: service dhcpd restart

In your minicom console type restart and immediately hit * (shift 8) and boot from Ethernet again by choosing option E. This time the firmware code should load as follows.

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

13

Now, when I did this, the router booted completely, and didn't wipe any of my settings. I don't if it did for Machasm or not. The only thing now is to save the new code. First you must log in as admin Password admin or whatever your is Then type console enable

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

14

12). Next type flashfs update You should see this

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

15

Thats it! If you now restart the router with restart you should now have the new firmware loaded. As I said, none of my settings were reset. I still had the same gateway IP and they same firewall rules, NAT rules etc, so I was very happy, but you may not. The web interface looks good, but I haven't used any new features yet, as I just wanted to do an upgrade. Disclaimer: I accept no responsibility if your router breaks as a result of following this guide or if your firmware gets corrupt. This is a howto guide only, and you use it at your own risk. There, I'm safe :-) Oh...Linux rules.....

Howto Upgrading firmware on SAR715 using Linux 0.1 Gavin Henry

16

Вам также может понравиться