The Vodafone Easybox 803A has nice router hardware. I found one on the trash recently and decided to put OpenWRT on it. Here's how. This is based on the instructions found in the OpenWRT wiki, the OpenWRT forum and random bits on the net.
UPDATE2: I have updated the post to make it clearer what to do, but please read this WHOLE POST to understand what's going on technically! If you are not sure, read it again...
UPDATE: I updated the router to OpenWRT 15.05 "Chaos Calmer" and it works just fine. You can get the binaries here. If you have already installed 14.07 you can just update via the router firmware upgrade page in the web interface.
I used Ubuntu 14.04 and did most image uploads using ubootwrite.py, because everything else didn't work reliably for me, especially with older U-Boot versions. Also note that the U-Boot version contained in OpenWRT 12.09 (~2010.03) does not work with any of the LAN functions (BOOTM, ARP, TFTP). You have to use a newer version of U-Boot for this to work or use ubootwrite.py to upload via the serial port. Note that depending on your configuration you might need to prepend commands using the serial port with "sudo". I made a package with the binaries I've used. This is OpenWRT 14.07 Barrier Breaker release for the ARV752DPW22 and includes the bootloader, a backup booloader in ASCII format for restoring via UART and the actual OpenWRT image.
Please refer to the original OpenWRT page for additional instructions and images.
Please note:
[bl] = Original/stock ARV752DPW22 bootloader
[ub] = U-Boot
[lo] = Local PC
IMAGE_FILE_NAME = The image file you want to upload. I used the bootloader from "openwrt-lantiq-arv752dpw22_brn-u-boot.img" (2nd stage bootloader for brnboot).
IMAGE_SIZE = The size of the image / file you've uploaded as a hexadecimal number, e.g. 0x........ You will get this e.g. from the sx command line program or ubootwrite.py after uploading.
IMAGE_FILE_NAME = The image file you want to upload. I used the OpenWRT image "openwrt-lantiq-xway-ARV752DPW22-squashfs.image".
IMAGE_SIZE = The size of the image / file you've uploaded as a hexadecimal number, e.g. 0x........ You will get this e.g. from the sx command line program or ubootwrite.py after uploading.
Now if you power-cycle the router and don't interrupt the boot process, OpenWRT should start. Let it start completely one time until no more new messages appear on the terminal and see something along the lines "init complete". OpenWRT will have extracted the squashed image to flash (you see messages like "erasing all blocks after the end marker... done."). This will possibly overwrite the WiFi configuration area that you must rewrite to the device for WiFI to work. This only muste be done if you flash OpenWRT via uboot and not when you upgrade OpenWRT via the web interface:
UPDATE2: I have updated the post to make it clearer what to do, but please read this WHOLE POST to understand what's going on technically! If you are not sure, read it again...
UPDATE: I updated the router to OpenWRT 15.05 "Chaos Calmer" and it works just fine. You can get the binaries here. If you have already installed 14.07 you can just update via the router firmware upgrade page in the web interface.
I used Ubuntu 14.04 and did most image uploads using ubootwrite.py, because everything else didn't work reliably for me, especially with older U-Boot versions. Also note that the U-Boot version contained in OpenWRT 12.09 (~2010.03) does not work with any of the LAN functions (BOOTM, ARP, TFTP). You have to use a newer version of U-Boot for this to work or use ubootwrite.py to upload via the serial port. Note that depending on your configuration you might need to prepend commands using the serial port with "sudo". I made a package with the binaries I've used. This is OpenWRT 14.07 Barrier Breaker release for the ARV752DPW22 and includes the bootloader, a backup booloader in ASCII format for restoring via UART and the actual OpenWRT image.
Please refer to the original OpenWRT page for additional instructions and images.
First part: Preparing a stock Easybox 803A for OpenWRT
Please note:
[bl] = Original/stock ARV752DPW22 bootloader
[ub] = U-Boot
[lo] = Local PC
Dumping your original firmware
This is really the first thing you should do. You do need parts of it later (the board configuration area) and it might come in handy to have a backup! The stock firmware has a BRN bootloader.- [lo] Download brntool using git: 'git clone http://github.com/rvalles/brntool'.
- [lo] Change to directory: 'cd brntool'
- Connect your USB to serial adapter to the router.
- [lo] Start CuteCOM serial terminal: 'cutecom &'
- Open the port (115200 Baud, 8 data bits, 1 stop bit).
- Power-cycle / power up the router.
- [bl] Be quick to press SPACE three times to stop the router from booting. Then press '!' to get into administration mode.
- Close CuteCOM or disconnect it from the port so that brntool has access to it.
- [lo] Dump the firmware: 'sudo python brntool.py --read=ARV752DPW22_orig.dump --addr=0xB0000000 --verbose --size=0x800000'
- This will take some time (~1 hour). When finished, power-cycle the router
- [bl] Be quick to press SPACE three times to stop the router from booting. Then press '!' to get into administration mode.
- [lo] Dump the firmware again: 'sudo python brntool.py --read=ARV752DPW22_orig2.dump --addr=0xB0000000 --verbose --size=0x800000'
- [lo] Compare the two firmwares (should give NO output): 'diff ARV752DPW22_orig.dump ARV752DPW22_orig2.dump'
- [lo] If both files are the same, remove one of the files: 'rm ARV752DPW22_orig2.dump'
- [lo] Extract the WiFi configuration from the original firmware: 'dd if=ARV752DPW22_orig.dump bs=1 skip=$((0x7f0000)) count=$((0x10000)) of=ARV752DPW22_orig_boardconfig.dump'
Load U-Boot into RAM and execute it
- Power-cycle / power up the router and open the serial port.
- [bl] Be quick to press SPACE three times to stop the router from booting. Then press '!' to get into administration mode.
- [bl] Choose '[M] Upload to memory' and the default adress 0x80002000.
- Close serial terminal or disconnect it from the port so that sx has access to it.
- [lo] Send U-Boot image via XMODEM: 'sx IMAGE_FILE_NAME <USB_DEVICE >USB_DEVICE'
IMAGE_FILE_NAME = The image file you want to upload. I used the bootloader from "openwrt-lantiq-arv752dpw22_brn-u-boot.img" (2nd stage bootloader for brnboot).
- When finished sx will tell you the amount of bytes uploaded. Convert this to hexadecimal to use it for copying to flash in later steps.
- [bl] When done, open the port again in CuteCOM and press ENTER.
- [bl] Choose '[Y] Go to memory' and the default adress 0x80002000.
- [ub] U-Boot will now start. Press ENTER quickly to prevent it from trying to load the kernel.
Copy U-Boot image into flash
- [ub] Turn off flash protection: 'protect off all'
- [ub] Erase flash before writing: 'erase 0xb0000000 +IMAGE_SIZE'
- [ub] Write image into flash: 'cp.b 0x80040000 0xb0000000 IMAGE_SIZE'
IMAGE_SIZE = The size of the image / file you've uploaded as a hexadecimal number, e.g. 0x........ You will get this e.g. from the sx command line program or ubootwrite.py after uploading.
- Now if you power-cycle the router the new U-Boot version should start automatically.
Second part: Installing OpenWRT on the Easybox 803A
A: Upload new U-Boot or kernel image using U-Boot with ubootwrite.py
- Connect to terminal and boot into U-Boot bootloader (press ENTER after booting).
- Close serial terminal or disconnect it from the port so that ubootwrite has access to it.
- [lo] Get ubootwrite.py script
- [lo] Write the data to the device RAM: 'sudo python ubootwrite.py --serial=USB_DEVICE --write=IMAGE_FILE_NAME --addr=0x80040000'
IMAGE_FILE_NAME = The image file you want to upload. I used the OpenWRT image "openwrt-lantiq-xway-ARV752DPW22-squashfs.image".
- When finished ubootwrite will spit out a CRC32 value you should check, and a hexadecimal image size you can use to copy the image into flash.
B: Upload new U-Boot or kernel image using XMODEM
- Connect to terminal and boot into U-Boot bootloader (press ENTER after booting).
- [ub] Load data to RAM using XMODEM: 'loadx 0x80040000'
- Close serial terminal or disconnect it from the port so that sx has access to it.
- [lo] Send data using XMODEM: 'sx IMAGE_FILE_NAME <USB_DEVICE >USB_DEVICE'
- When finished sx will tell you the amount of bytes uploaded. Convert this to hex to use it for copying to flash.
Copy uploaded image into flash
- [ub] Turn off flash protection: 'protect off all'
- [ub] Erase flash before writing: 'erase 0xb0000000 +IMAGE_SIZE'
- [ub] Write image into flash: 'cp.b 0x80040000 FLASH_ADRESS IMAGE_SIZE'
IMAGE_SIZE = The size of the image / file you've uploaded as a hexadecimal number, e.g. 0x........ You will get this e.g. from the sx command line program or ubootwrite.py after uploading.
Now if you power-cycle the router and don't interrupt the boot process, OpenWRT should start. Let it start completely one time until no more new messages appear on the terminal and see something along the lines "init complete". OpenWRT will have extracted the squashed image to flash (you see messages like "erasing all blocks after the end marker... done."). This will possibly overwrite the WiFi configuration area that you must rewrite to the device for WiFI to work. This only muste be done if you flash OpenWRT via uboot and not when you upgrade OpenWRT via the web interface:
Rewrite WiFi configuration area to device
- Connect to terminal and boot into U-Boot bootloader (press ENTER after booting).
- Close serial terminal or disconnect it from the port so that ubootwrite has access to it.
- [lo] Write configuration area to RAM: 'sudo python ubootwrite.py --serial=USB_DEVICE --write=ARV752DPW22_orig_boardconfig.dump --addr=0x807f0000'
- Connect to terminal again.
- [ub] Turn off flash protection: 'protect off all'
- [ub] Erase flash before writing: 'erase 0xB07f0000 +0x00010000'
- [ub] Write image into flash: 'cp.b 0x807f0000 0xB07f0000 0x00010000'
- Power-cycle the router.
Comments
ps. Witch image did you install for 15.05 because i cant manage to start the wifi
https://downloads.openwrt.org/chaos_calmer/15.05/lantiq/xway/openwrt-15.05-lantiq-xway-ARV752DPW22-squashfs.image ?
U-boot erase?????
cp.b 0x80040000 0xb0000000 0x00480004
used your openwrt-lantiq-arv752dpw22_brn-u-boot.img
ROM VER: 1.0.3␍␊
[15:31:37:159] CFG 05␍␊
[15:31:37:159] Read EEPROMX␍␊
[15:31:37:159] X␍␊
[15:31:37:159] SFLASH␍␊
[15:31:37:159] X␍␊
[15:31:37:159] SFLASH␍␊
[15:31:37:159] X␍␊
[15:31:37:159] SFLASH␍␊
[15:31:37:159] X␍␊
When finished sx will tell you the amount of bytes uploaded. Convert this to hex to use it for copying to flash.
fail does'nt work for me
can you please elaborate on how to flash the uboot to nand, how to calculate the right adress? Would be real nice to get an actual example like:
ok Uploaded uboot with xmodem sx command...
linux command line says: xyz bytes transfered..
thats in hex: 0xBLUBLUB
then use this comman with the adress:
flash uboot to memmory adress=0xBLUBLUB
On topic: Afair, when you already have uboot in RAM, you have to upload "openwrt-lantiq-arv752dpw22_nor-u-boot.img" (NOR, as-in: "can write it to flash") using the upload method A or B and then follow the section "Copy U-Boot image into flash".
Post a Comment