User Tools

Site Tools


toh:astoria:arv7518pw

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
toh:astoria:arv7518pw [2013/01/31 00:54]
toh:astoria:arv7518pw [2015/12/29 12:23] (current)
tmomas [Photos] removed link to media manager in media:astoria, since all ARV7518 related images are in media:arcadyan.
Line 1: Line 1:
 +====== Astoria networks ARV7518PW ======
  
 +===== Known Supported Versions =====
 +^ Ver. ^ OpenWrt Version Supported ^
 +| r01a   | [[http://​downloads.openwrt.org/​attitude_adjustment/​12.09/​lantiq/​danube/​|Attitude Adjustment 12.09 Final]] ​ |
 +
 +===== Hardware Highlights =====
 +^ CPU                                    ^ Ram    ^ Flash   ^ Network ​  ^ USB   ^ Serial ​  ^ UART   ^
 +| Lantiq Xway Danube @333Mhz Dual Core   | 64MB   | 8MB     | 4 Ports   | Yes   | Yes      | Yes    |
 +
 +==== Openwrt status ====
 +  * ADSL modem is working with both Annex A & Annex B supported.
 +  * WiFi is working out of the box with trunk. (//ath9k//)
 +  * FXS works and can be used with owsip daemon or [[http://​code.google.com/​p/​danube-voip/​|danube-voip]].
 +  * USB works (kmod-usb-dwc-otg or kmod-ltq-hcd-danube)
 +
 +==== Flash Layout ====
 +Please check out the article [[doc:​techref:​Flash.Layout]]. It contains an example and a couple of explanations.
 +
 +^  Modified Flash Layout ​ ^^^^^
 +^ partition ​  ^ start        ^ end          ^ size     ^ description ​         ^
 +| mtd0        | 0x00000000 ​  | 0x00010000 ​  | 64KB     | u-boot ​              |
 +| mtd1        | 0x00010000 ​  | 0x00020000 ​  | 64KB     | u-boot environment ​  |
 +| mtd2        | 0x00020000 ​  | 0x007f0000 ​  | 8000KB ​  | linux                |
 +| mtd3        | 0x007f0000 ​  | 0x00800000 ​  | 64KB     | calibration data     |
 +
 +
 +===== Hardware =====
 +==== Info ====
 +| **[[wp>​Instruction set|Architecture]]:​** ​  | [[wp>​MIPS architecture|MIPS]] ​  |
 +| **Vendor:​** ​                      | [[wp>​Arcadyan]] ​                     |
 +| **[[doc:​techref:​Bootloader]]:​** ​  | [[doc:​techref:​bootloader:​brnboot]] ​  |
 +| **System-On-Chip:​** ​              | [[http://​pdf.datasheetarchive.com/​indexerfiles/​Datasheets-UD3/​DSAUD0055683.pdf|Lantiq Danube PSB 50702 E Rev 1.3 or 1.5 (MIPS 24Kec)]]|
 +| **[[doc:​hardware:​cpu|CPU]]/​Speed:​** ​ | 333 Mhz Dual Core |
 +| **Flash-Chip:​** ​ | [[http://​www.macronix.com/​QuickPlace/​hq/​PageLibrary4825740B00298A3B.nsf/​h_Index/​DBACA1C90564EBB248257639003A563A/​$File/​MX29LV640E%20T-B,​%203V,​%2064Mb,​%20v1.7.pdf|Macronix MX29LV640EBTI-70G]] |
 +| **Flash size:​** ​ | 8 MiB    |
 +| **RAM:​** ​        | 64 MiB   |
 +| **RAM Chip:​** ​   |[[http://​www.zentel-europe.com/​A4S12D40FTP_v1.1_Zentel.pdf|Zentel A4S12D40FTP-G5]]|
 +| **Wireless:​** ​   | Atheros AR9223-AC1A b/g/n 2x2   |
 +| **Ethernet:​** ​   | Atheros AR8216-BH1A ​            |
 +| **Internet:​** ​   | ADSL2+ (annex A and B)          |
 +| **USB:​** ​        | Yes 1 x 2.0                     |
 +| **Phone:​** ​      | 2x FXS (TAE ports which provide POTS via a SIP gateway) ​  |
 +| **Serial:​** ​     | [[#​Serial|Yes]] ​                           |
 +| **JTAG:​** ​       | [[#​JTAG|Yes]] ​                             |
 +| **Power:​** ​      | external PSU, 12V DC, 1A, polarity: -(+)   |
 +
 +__Note: some units are very sensible to overvoltage,​ so take care you are using the right PSU__
 +
 +CPU info:
 +<​code>​
 +system type: Danube rev 1.5
 +processor: 0
 +cpu model: MIPS 24KEc V4.1
 +BogoMIPS: 221.18
 +wait instruction:​ yes
 +microsecond timers: yes
 +tlb_entries:​ 16
 +extra interrupt vector: yes
 +hardware watchpoint: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
 +ASEs implemented:​ mips16 dsp
 +shadow register sets: 1
 +kscratch registers: 0
 +core: 0
 +VCED exceptions: not available
 +VCEI exceptions: not available
 +</​code>​
 +
 +==== Photos ====
 +PCB:\\
 +{{media:​arcadyan:​arv7518:​arv7518pw_4.jpg?​400|ARV7518PW PCB top side}}
 +
 +
 +
 +==== LEDS ====
 +^ Name       ^ Colour ​  ^ Gpio   ^
 +| Power      | red      | 7      |
 +| Power      | green    | 2      |
 +| Wifi       | green    | 6      |
 +| Adsl       | green    | 4      |
 +| Internet ​  | green    | 5      |
 +| Internet ​  | red      | 8      |
 +| Voip       | green    | 100    |
 +| Phone 1    | green    | 101    |
 +| Phone 2    | green    | 102    |
 +| Noname ​    | Orange ​  | 103    |
 +| USB        | green    | 19     |
 +| wps        | Orange ​  | 104    |
 +| wps        | Green    | 105    |
 +| wps        | Red      | 106    |
 +
 +==== Opening the case ====
 +**Note:** This will void your warranty!
 +
 +To get to the board you need:
 +
 +  * unscrew 2 Phillips screws underneath the cover,
 +  * pull the upper cover which is connected by click.
 +
 +===== Serial =====
 +-> [[doc:​hardware:​port.serial]].
 +
 +Board voltage is 3.3V so can use usb to serial adapters.\\
 +Pinout:\\
 +{{media:​astoria:​serial.jpg?​200}}
 +
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | Don't connect Vcc if your serial adapter already has power(which is most of the cases) or it won't work |
 +
 +==== Bootstrap settings ====
 +
 +Bootstrap pin funcion table:
 +
 +|''​ X = boot_sel2
 + Y = boot_sel1
 + Z = boot_sel0
 +
 + X Y Z function
 + ===============================================================
 + 0 0 0  External parallel flash
 + 0 0 1  ROM > external parallel flash (default)
 + 0 1 0  ROM > ethernet, MII0
 + 0 1 1  ROM > PCI
 + 1 0 0  ROM > UART1
 + 1 0 1  ROM > serial SPI
 + 1 1 0  ROM > NAND flash
 + 1 1 1  ROM > Reverse MII0
 +''​|
 +
 +Value 1 = 3.3v is connected to that pin\\
 +Value 0 = Pin is connected to digital GND\\
 +
 +boot_sel2, boot_sel0 pins location:\\
 +{{media:​astoria:​bootsel0.jpg?​200}}\\ ​
 +
 +{{media:​astoria:​bootlsel2.jpg?​200}}\\
 +Note: boot_sel2 and boot_sel1 are by default on 0 and boot_sel0 is on 1.
 +
 +=== UART ===
 +
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | UART mode is not necessary to install u-boot or openwrt, however it is the only way to recover from a bootloader error |
 +
 +To enable uart mode, short pins at boot_sel2 (shortcut R80 pins, picture above) and connect boot_sel0 to 3.3V(Connect left R65 pin to serial port vcc on the motherboard from below), see picture above.
 +
 +UART mode looks like this:
 +
 +<​code>​
 +ROM VER: 1.0.3
 +CFG 04
 +Read EEPROMX
 + X
 +UART
 +</​code>​
 +
 +== Recover u-boot using UART ==
 +
 +In UART mode you can send an u-boot in ascii format(download [[http://​www.cienti.com/​arv4518pw/​u-boot-asc-20120429.zip|here]]) to serial port, which will be automatically loaded in the ram(it will be lost when you poweroff)\\
 +
 +For example if your serial port is ttyUSB0 than do:
 +"cat u-boot.asc > /​dev/​ttyUSB0"​
 +
 +When it finishes run:
 +<​code>#​ minicom -s --device /​dev/​ttyUSB0</​code>​
 +Then select "​Serial port setup" configure it and select "​exit"​ to quit from the configuration panel. Now you should get a command prompt.
 +
 +If you want to install it in flash memory permanently,​ download u-boot in binary format from [[http://​www.cienti.com/​arv4518pw/​u-boot-flash-20120511.zip|here]] however you can install any u-boot you want, see [[#​step.4u-boot | Step 4: u-boot]]. Now lets load it to ram:
 +<​code>​ARV4518 => loady 0x80500000</​code>​
 +Now you have to send the u-boot.bin using ymodem protocol. If you are using minicom press "​ctrl+a"​ and then "​s"​
 +
 +<​code>​ARV4518 => crc32 ${ram_addr} ${filesize}</​code>​
 +Make sure that the checksum matches that of the file that you just transferred from your computer, otherwise it could brick your router. If it matches install it to flash.
 +<​code>​ARV4518 => protect off 0xb0000000 0xb0020000
 +ARV4518 => era 0xb0000000 +${filesize}
 +ARV4518 => cp.b ${ram_addr} 0xb0000000 ${filesize}</​code>​
 +
 +Now reboot, if everything is alright you should boot into the u-boot you installed. If you want to protect u-boot from mistakes run:
 +<​code>​ARV4518 => protect on 0xb0000000 +10000</​code>​
 +
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | Bear in mind that sometimes programs do not check/care if flash memory is set as writeable or not and still can overwrite it. Be careful |
 +
 +===== Installation =====
 +
 +For general information take a look at:
 +  - -> [[doc:​howto:​obtain.firmware]]
 +  - -> [[doc:​howto:​generic.flashing|Install OpenWrt (generic explanation)]] gives you general information but those examples don't apply to this model. It is just for orientation,​ attempting to blindly follow that guide will result in a brick.
 +
 +Please read the following links for ARV4518. They will give you another point of view of the process: \\
 +  * @aiayua post [[https://​forum.openwrt.org/​viewtopic.php?​pid=167584#​p167584 | ARV4518 for Dummies]] (Step 9 works only if you have Pteridium u-boot, because it requires tftp. U-boots compiled by cienti or openwrt.org don't have tftp working)
 +  * @aiayua post [[https://​forum.openwrt.org/​viewtopic.php?​pid=167513#​p167513 | Enable UART mode (Recover bricked/​malfunction router)]]
 +  * [[https://​forum.openwrt.org/​viewtopic.php?​pid=181952#​p181952 | Flashing OpenWrt image using loady]]
 +
 +And buy the usb to ttl conversor suggested by pippolippi or build one yourself: \\
 +  * The cheapest option: [[https://​forum.openwrt.org/​viewtopic.php?​pid=172146#​p172146]]
 +  * Build it yourself: [[https://​forum.openwrt.org/​viewtopic.php?​pid=178898#​p178898]]
 +
 +==== Installation:​ Step by step via serial connector ====
 +
 +=== Step 1: Get serial connection ===
 +
 +Connect your serial adapter to the router as indicated above, [[:​toh:​astoria:​arv7518pw#​serial | link]]. There is no need to make any soldering for now, just enter to the default serial mode(UART is not needed). You can use any program, these are the settings:
 +     - Speed: 115200 baud
 +     - Data bits: 8
 +     - Stop bits: 1
 +     - Parity: None
 +     - Flow control: None (No hardware and no software flow control)
 +
 +Cutecom: In Cutecom, a gui for serial console, set "No Line End" and the device is /​dev/​ttyUSB0 if you are using a usb serial adapter.
 +
 +Minicom: If you want to use minicom run as root:
 +<​code>#​ minicom -s --device /​dev/​ttyUSB0</​code>​
 +Then select "​Serial port setup" configure it and select "​exit"​ to quit from the configuration panel. ​
 +
 +=== Step 2: Enter command and administrator mode ===
 +
 +Turn on the router and you will see this
 +<​code>​ROM VER: 1.0.3
 +CFG 01
 +Read
 +ROM VER: 1.0.3
 +CFG 01
 +Read EEPROMX
 + X
 +
 +
 +
 +=======================================================================
 +Wireless ADSL Gateway DANUBE Loader 64M-V0.02 build Apr 24 2008 16:12:25
 +                    Arcadyan Technology Corporation
 +=======================================================================
 +MXIC MX29LV320ABTC bottom boot 16-bit mode found
 +
 +Copying boot params.....DONE
 +
 +
 +Press Space Bar 3 times to enter command mode ...</​code>​
 +
 +Press repeatedly the spacebar to enter command mode, be quick. Once in command mode press "​!"​ to access administrator mode.
 +
 +This is the brnboot, the stock bootloader that we want to substitute with u-boot as it can't boot OpenWrt.
 +
 +=== Step 3: Backup ===
 +
 +This step is crucial. Backup your router twice and compare the results to ensure you have a correct backup. Use brntool from [[https://​github.com/​rvalles/​brntool]].
 +
 +Make sure that your router is in administrator mode and close your serial connection program(without powering off your router or unpluging your cable). Check that you have python installed and then run this command(Takes about 2 hours):
 +<​code>​./​brntool.py --serial=/​dev/​ttyUSB0 --read=AR7518PW_whole.dump --addr=0xB0000000 --verbose --size=0x800000</​code>​
 +Once finished do another backup:
 +<​code>​./​brntool.py --serial=/​dev/​ttyUSB0 --read=AR7518PW_whole2.dump --addr=0xB0000000 --verbose --size=0x800000</​code>​
 +Then do a checksum and make sure both hashes match:
 +<​code>​md5sum AR7518PW_whole.dump AR7518PW_whole2.dump</​code>​
 +Save your backup in a safe place
 +
 +Also make a backup of just wifi calibration data partition, which if lost would make your wifi unusable(takes a few minutes only).
 +<​code>​./​brntool.py --serial=/​dev/​ttyUSB0 --read=AR7518PW_calibration.dump --addr=0xB07f0000 --verbose --size=0x00010000</​code>​
 +Once finished do another backup:
 +<​code>​./​brntool.py --serial=/​dev/​ttyUSB0 --read=AR7518PW_calibration2.dump --addr=0xB07f0000 --verbose --size=0x00010000</​code>​
 +Then do a checksum and make sure both hashes match:
 +<​code>​md5sum AR7518PW_calibration.dump AR7518PW_calibration2.dump</​code>​
 +Finally save your backup in a safe place
 +
 +=== Step 4: u-boot ===
 +
 +U-boot images for this router must be 64kb(or 128kb if u-boot environment is included). There are mainly 3 u-boot from which you have to choose one. Here is a brief description of each one.
 +
 +== Cienti u-boot ==
 +
 +Download u-boot compiled by cienti in binary format from [[http://​www.cienti.com/​arv4518pw/​u-boot-flash-20120511.zip | here]]. It works well even though it is for arv4518. The command prompt of this u-boot is "​ARV4518 =>" instead of "​ARV7518 =>"
 +
 +When using this centi u-boot, httpd and tftp don't work but it has loady and loadb and both work which makes possible to upload binaries over a serial connection.
 +
 +== Pteridium u-boot ==
 +
 +[[http://​www.mediafire.com/?​4mvdn90l302nssn | Pteridium uboot]](the one in the folder uboot-lantiq-arv7518PW_flash)(also see [[http://​foro.seguridadwireless.net/​openwrt/​openwrt-para-roters-astoria-de-ya-com/​msg256236/#​msg256236 | this post]]) for this router, arv7518, has both httpd and tftp working which makes uploading a OpenWrt image very easy, but it doesn'​t have loady or loadb. However if you wanted to upload binaries over serial it should still be possible using [[https://​forum.openwrt.org/​viewtopic.php?​pid=183315#​p183315 | ubootwrite.py]](not tested by me).
 +
 +== u-boot compiled by openwrt.org ==
 +
 +Whatever your choice is, [[http://​downloads.openwrt.org/​attitude_adjustment/​12.09-rc1/​lantiq/​danube/​ | u-boots compiled by openwrt.org]] are the worst because they don't have loady/loadb and most of the features like httpd and tfpt don't work. It is not recommended that you install them, if you have done so already and want to install another one see [[#​recover.u-boot.using.uart | Recover u-boot using UART]]
 +
 +== Flashing u-boot ==
 +
 +Continuing from Step 3, reopen the serial connection. You should be in command mode, press "​!"​ to access administrator mode and press "​u"​ followed by "​0"​ to upload the new bootloader. Confirm by pressing "​Y",​ then you should see someting like this:
 +
 +<​code>​Starting XModem download...(press Enter to abort)
 +CCCCC</​code>​
 +
 +Now upload the u-boot binary using the XModem protocol. In minicom press "​ctrl+a"​ and then "​s"​ to upload a file.
 +
 +Once uploaded, reboot your router. You should see this:
 +<​code>​ROM VER: 1.0.3
 +CFG 01
 +Readü
 +ROM VER: 1.0.3
 +CFG 01
 +Read EEPROMX
 +
 +
 +U-Boot 2010.03 (May 16 2012 - 05:51:08)
 +Board: ARV4518PW
 +SoC: Danube/​Twinpass/​Vinax-VE V1.5, DDR Speed 166 MHz, CPU Speed 333 MHz
 +DRAM: 64 MB
 +Flash: 8 MB
 +*** Warning - bad CRC, using default environment ​
 +
 +Net: searching for rtl8306 switch ...
 +no known switch found ...
 +lq_cpe_eth
 +
 +Hit any key to stop autoboot: 0
 +Wrong Image Format for bootm command
 +ERROR: can't get kernel image!
 +ARV4518 =></​code>​
 +
 +When prompted "Hit any key to stop autoboot"​ hit any key to enter command mode in u-boot.
 +
 +=== Step 5: Precautions ===
 +
 +If you want to protect u-boot partition from mistakes run in u-boot command prompt:
 +<​code>​ARV4518 => protect on 0xb0000000 +10000</​code>​
 +
 +Also if you want to protect calibration partition from mistakes run:
 +<​code>​ARV4518 => protect on 0xb07f0000 +10000</​code>​
 +
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | Bear in mind that sometimes programs do not check/care if flash memory is set as writeable or not and still can overwrite it. Be careful |
 +
 +Addresses are in hex format even when they are not prefixed with "​0x"​. Check that your address variables are set correctly
 +<​code>​ARV7518PW => printenv kernel_addr ram_addr ​                                     ​
 +kernel_addr=0xb0020000 ​                                                         ​
 +ram_addr=0x80500000</​code>​
 +
 +You can run just "​printenv"​ to list all variables and their values. Some variables like "​filesize"​ should be automatically set when you upload a file, while others are already set.
 +
 +=== Step 6: Install OpenWrt ===
 +
 +Download an OpenWrt image. For example [[http://​downloads.openwrt.org/​attitude_adjustment/​12.09/​lantiq/​danube/​openwrt-lantiq-danube-ARV7518PW-squashfs.image | this one]]. See [[doc:​howto:​obtain.firmware]].
 +
 +You have to unprotect the linux partition if it wasn't already. When finished installing, leave it also unprotected. Run in u-boot command prompt:
 +<​code>​ARV4518 => protect off 0xb0020000 +7D0000</​code>​
 +
 +There are several methods of installation depending on which u-boot you have flashed.
 +
 +== Method A: loady (Cienti u-boot) ==
 +
 +Enter command mode in u-boot and request to upload a openwrt image via YModem to the router'​s ram:
 +<​code>​ARV4518 => loady 0x80500000</​code>​
 +In cutecom choose "​YModem",​ press "Send file..."​ and choose the file you've downloaded. In minicom press "​ctrl+a"​ and then "​s"​ and select "​YModem"​.
 +
 +It takes about 10 mins to upload the image. ​
 +
 +Do a checksum and make sure it matches the checksum of the image in your computer.
 +<​code>​ARV4518 => crc32 ${ram_addr} ${filesize}</​code>​
 +
 +Now install the image in the flash memory, you have to erase the flash portion before you copy the image to flash:
 +<​code>​ARV4518 => era ${kernel_addr} +${filesize}
 +
 +............................................. done
 +Erased 45 sectors
 +ARV4518 => cp.b ${ram_addr} ${kernel_addr} ${filesize}
 +Copy to Flash... 9....8....7....6....5....4....3....2....1....done</​code>​
 +
 +Finally restart
 +<​code>​ARV4518 => run flash_flash</​code>​
 +
 +You have a log of the full loading process in [[https://​forum.openwrt.org/​viewtopic.php?​pid=181952#​p181952]]
 +
 +OpenWRT is installed and running. Time to configure it. 
 +
 +== Method B: httpd (Pteridium u-boot) ==
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | This hasn't be fully tested by me and may have things to complete |
 +
 +Restart your router and u-boot will automatically detect that you don't have any working images and will automatically run httpd for you. But if you suspect it doesn'​t,​ enter u-boot command mode and run:
 +<​code>​ARV7518 => httpd</​code>​
 +
 +Connect your computer directly to the router by ethernet and change your network settings in your computer to this:
 +  - Gateway: 192.168.1.1
 +  - Netmask: 255.255.255.0
 +  - IP address: 192.168.1.2
 +
 +Now go to [[http://​192.168.1.1]] and upload OpenWrt image
 +
 +== Method C: tftp (Pteridium u-boot) ==
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | This hasn't been fully tested by me and may have things to complete |
 +
 +You should have a tftp server running in your computer and correctly configured. Put the image you want to flash in the tftp folder.
 +
 +Connect your computer directly to the router by ethernet and change your network settings in your computer to this:
 +  - Gateway: 192.168.1.1
 +  - Netmask: 255.255.255.0
 +  - IP address: 192.168.1.2
 +
 +On the router configure u-boot for tftp:
 +<​code>​ARV7518 => setenv ipaddr 192.168.1.1
 +ARV7518 => setenv serverip 192.168.1.2
 +ARV7518 => setenv bootfile name_of_openwrt_image</​code>​
 +
 +Then from the router download the image from the tftp server to ram
 +<​code>​ARV7518 => tftpboot 0x80500000 name_of_openwrt_image</​code>​
 +
 +It takes about 10 mins to upload the image.
 +
 +Now open a serial connection to the router and do a checksum to check that the image transferred matches the image in your computer.
 +<​code>​ARV7518 => crc32 ${ram_addr} ${filesize}</​code>​
 +
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | It could be the case that the variable filesize wasn't set. Then you should get and error, run "​printenv filesize"​ to check it. Solution: TODO |
 +
 +Now install the image in the flash memory, you have to erase the flash portion before you copy the image to flash:
 +<​code>​ARV7518 => era ${kernel_addr} +${filesize}
 +
 +............................................. done
 +Erased 45 sectors
 +ARV7518 => cp.b ${ram_addr} ${kernel_addr} ${filesize}
 +Copy to Flash... 9....8....7....6....5....4....3....2....1....done</​code>​
 +
 +Finally restart
 +<​code>​ARV7518 => run flash_flash</​code>​
 +
 +== Method D: ubootwrite.py (All u-boot) ==
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | TODO. Not tested |
 +
 +Download [[https://​forum.openwrt.org/​viewtopic.php?​pid=183315#​p183315 | ubootwrite.py]] and enter command mode in u-boot. Close the serial connection program and run:
 +<​code>​ubootwrite.py --serial=/​dev/​ttyUSB0 --write=name_of_OpenWrt_image --addr=0x80500000</​code>​
 +
 +It takes about 10 mins to upload the image.
 +
 +Now open a serial connection to the router and do a checksum to check that the image transferred matches the image in your computer.
 +<​code>​ARV7518 => crc32 ${ram_addr} ${filesize}</​code>​
 +
 +| {{:​meta:​icons:​tango:​48px-emblem-important.svg.png?​nolink}} | It could be the case that the variable filesize wasn't set. Then you should get and error, run "​printenv filesize"​ to check it. Solution: TODO |
 +
 +Now install the image in the flash memory, you have to erase the flash portion before you copy the image to flash:
 +<​code>​ARV7518 => era ${kernel_addr} +${filesize}
 +
 +............................................. done
 +Erased 45 sectors
 +ARV7518 => cp.b ${ram_addr} ${kernel_addr} ${filesize}
 +Copy to Flash... 9....8....7....6....5....4....3....2....1....done</​code>​
 +
 +Finally restart
 +<​code>​ARV7518 => run flash_flash</​code>​
 +
 +You have a log of the full loading process in [[https://​forum.openwrt.org/​viewtopic.php?​pid=181952#​p181952]]
 +
 +OpenWRT is installed and running. Time to configure it. 
 +
 +=== Old guide ===
 +
 +Steps:
 +  - (about 2h) Backup your router twice and compare the results to ensure you have a correct backup. Use brntool from [[https://​github.com/​rvalles/​brntool]]. Command: "​./​brntool.py --serial=/​dev/​ttyUSB0 --read=AR4518PW_whole2.dump --addr=0xB0000000 --verbose --size=0x800000"​
 +  - download uboot for arv4518 (the one for 7518 has bug in its last versions, does not work for http/tftp and has no loady support) from [[http://​www.cienti.com/​arv4518pw/​u-boot-flash-20120511.zip]]. (If you need to enable UART for recovery purposes, not now, the asc file is in [[http://​www.cienti.com/​arv4518pw/​u-boot-asc-20120429.zip]] )
 +  - I use cutecom, a gui for serial console. First step is to tell it that the device is /​dev/​ttyUSB0 and set "No Line End" ​
 +     - Speed: 115200 baud
 +     - Data bits: 8
 +     - Stop bits: 1
 +     - Parity: None
 +     - Flow control: None
 +  - Next step is very well explained in step 8 in [[https://​forum.openwrt.org/​viewtopic.php?​pid=167584#​p167584]]. Follow it step by step using file "​u-boot-flash-20120511.zip"​ you downloaded before.
 +  - Step 9 in [[https://​forum.openwrt.org/​viewtopic.php?​pid=167584#​p167584]] is not completely valid because tftp/http does not work, so you cannot use "run update_openwrt"​. The correct steps instead of that one are shown in [[https://​forum.openwrt.org/​viewtopic.php?​pid=181952#​p181952]],​ but first you have to download an image. In [[http://​downloads.openwrt.org/​attitude_adjustment/​12.09-beta2/​lantiq/​danube/​]] there is no image for arv7518 today(31/​10/​2012) but there is one in [[http://​downloads.openwrt.org/​attitude_adjustment/​12.09-beta/​lantiq/​danube/​]],​ [[http://​downloads.openwrt.org/​attitude_adjustment/​12.09-beta/​lantiq/​danube/​openwrt-lantiq-danube-ARV7518PW-squashfs.image]]. Download it. Now do:
 +     - request to upload via YModem: "​ARV4518 => loady 0x80500000"​
 +     - choose in cutecom "​YModem",​ press "Send file..."​ and choose the file you've download. It takes about 10 mins. The steps after uploading are:
 +<​code>​ARV4518 => era ${kernel_addr} +${filesize}
 +
 +............................................. done
 +Erased 45 sectors
 +ARV4518 => cp.b ${ram_addr} ${kernel_addr} ${filesize}
 +Copy to Flash... 9....8....7....6....5....4....3....2....1....done</​code>​
 +
 +Now reboot
 +<​code>​ARV4518 => run flash_flash</​code>​
 +
 +You have a log of the full loading process in [[https://​forum.openwrt.org/​viewtopic.php?​pid=181952#​p181952]].
 +
 +OpenWRT is installed and running. Time to configure it.
 +
 +===== Tags =====
 +[[meta:​tags|How to add tags]]
 +{{tag>​FastEthernet 4Port USB ath9k 64RAM 4Flash MIPS MIPS32 24K ADSL2+ lantiq danube fxo}}