Topic: Netgear DG834GT flashing?

The DG834GT is now listed as working... But I can't make it. Trying to flash in recovery mode using the most excellent nftp utility but whenever I flash an image (e.g. http://downloads.openwrt.org/backfire/1 … s-cfe.bin) it reboots straight back into recovery mode - I've tried padding the file out to a filesize multiple of 1024 (I noticed stock Netgear firmwares have a lot of 0s at the end of the file), modding nftp so it doesn't require the file to be a multiple of 1024, nothing works - it verifies sucessfully, then just boots straight back into recovery mode 'til I flash a 'valid' file, like the latest DGTeam firmware.

Opening a Netgear/DGTeam firmware and OpenWRT concurrently in a hex editor confirms that the header information is very different at the start of the file - perhaps there's something I need to append to the file to flash like this, as per older Netgear routers, even in recovery mode?

Any advice would be much appreciated. I don't really want to build a serial interface to do this as it's not really worth the effort, these routers are practically a throwaway now and I'd just like one to run a decent firmware 'til I get hold of something else with integrated DSL (and preferably more RAM, 5GHz Wireless-N  and a USB port.)

Re: Netgear DG834GT flashing?

Flashing the image provided in this thread for the DG834PN works fine from recovery on my GTs. Now I just need to work out how to create a valid, flashable file of 10.03... :-/

Re: Netgear DG834GT flashing?

Read this.
Netgear DG834GT - OpenWrt Wiki

4 (edited by Azurael 2010-08-29 12:36:14)

Re: Netgear DG834GT flashing?

I've read that several times from top to bottom... I must have missed the bit where it explains where to sign/checksum the files to flash WITHOUT a serial interface if it's there???

Clearly it's possible as I now have a signed, older version of OpenWRT which works fine on the DG834GT (PN is the same hardware...)

Re: Netgear DG834GT flashing?

If you'd like to flash with Netgear's WebGUI, I think you'll need to create a 256-byte header.

SkayaWiki:FirmwareFormat
SkayaWiki:BroadCom96345

Re: Netgear DG834GT flashing?

I'm not flashing from the WebGUI, I'm flashing using recovery mode, but I think the same restrictions apply, so I'll give it a go. Cheers, that was the information I was looking for smile

Re: Netgear DG834GT flashing?

Azurael wrote:

Flashing the image provided in this thread for the DG834PN works fine from recovery on my GTs. Now I just need to work out how to create a valid, flashable file of 10.03... :-/

Please compare the two img from that thread to see if there's only a 256-byte header difference.

8 (edited by fyi 2010-09-05 22:10:25)

Re: Netgear DG834GT flashing?

Comtrend CT-5621 - OpenWrt Wiki - Tools
BCM63xx Firmware Image Information - OpenWrt Wiki

Re: Netgear DG834GT flashing?

I've a DG834GT with Open WRT (French version, because it seems that there are several versions), and I flashed it with serial cable and using TFTP to transfer image by CFE. I compile the firmware myself, I can send it to you this weekend (few revisions after backfire)

10

Re: Netgear DG834GT flashing?

For anyone looking this up on Google, this is how you do it:

nftp updates the whole entire flash, whereas the downloadable images are just the filesystem and kernel. The filesystem and kernel start at 0x10000 , which is where the router expects to find the 256 byte header. 0x00000 - 0x0FFFF appear to be some kind of second-stage boot loader. If you're able to flash a filesystem image over it and still get to recovery mode, then I don't expect it is the first-stage bootloader.

What you need to do is download an official firmware (or dump your existing one), and extract the first 65536 bytes, and prepend them to the downloaded image. Then you'll need to pad it to a multiple of 1024 bytes. I had to patch out the magic value check in nftp to flash openwrt to the router.

The full nftp image is <2bl><downloaded openwrt image><null padding to multiple of 1024 bytes>.

head -c 65536 netgear_firmware.bin > 2bl.bin
dd if=/dev/zero of=padding.bin bs=1020 count=1
cat 2bl.bin openwrt.bin padding.bin > flash_with_tftp.bin



In my experience 10.03 doesn't work (flashes, boots, sits there doing nothing), but 10.03.1-rc5 does (though I can't get ADSL to work, and believe it to be unsupported at present).

Also flashing between OpenWRT and official firmwares might turn your DG834PN into a DG834PNB: the only difference is the software.

11 (edited by bulanula 2012-04-14 21:25:49)

Re: Netgear DG834GT flashing?

ef wrote:

head -c 65536 netgear_firmware.bin > 2bl.bin
dd if=/dev/zero of=padding.bin bs=1020 count=1
cat 2bl.bin openwrt.bin padding.bin > flash_with_tftp.bin

I think this needs to be mentioned. In Linux to see the filesize in bytes you need to do "ls -l". Then you need to do some calculations :

65536 = 2bl.bin
2359300 = openwrt-DG834GT_DG834PN-squashfs-cfe.bin
Total = 65 536 + 2 359 300 = 2 424 836; so if we divide this number by 1024 we get a multiple of 2368.00391 but this needs to be 2369 so for a total number our image needs to be is 2369*1024=2425856 so the padding will be 2425856-2424836=1020 ( in this example )

So now you can use 1020 as the padding size in the above commands. I did this with a trunk image for the SKY DG834GT and it accepted the image using the NFTP flasher.

If you use this program http://www.skyuser.co.uk/forum/technica … post235918 then I bet you can use the instructions for this tool to flash a standard OpenWRT / DGTeam / Netgear firmware to a SKY branded DG834GT using the web interface !

Basically you need to get a usable .img file for these SKY DG834GT routers before you can do ANYTHING to them. Then ( after you have the .img that is valid and divisible by 1024 bytes ) you can either use the modified NFTP ( that skips checking for a valid image file ) and flash them using the recovery mode tool OR you can use that "Broadcom Firmware Tool" program to apply a custom SKY header to the .img file that makes it possible to then flash OpenWRT straight from the original SKY web interface !

I am in the process of contacting the author of this tool ( mrmt32 at gmail.com ) so he can give us a Linux version of this valuable tool for those that don't run Windows ( like me ) because the program is a port of a Linux tool etc.

Hope this helps anyone ! Pity the ADSL driver needs more work ...

12 (edited by bulanula 2012-06-12 23:31:50)

Re: Netgear DG834GT flashing?

Just some more findings I uncovered.

With the SKY version of this router you must trick the device to be able to upload firmware via web interface.

The Netgear original version does not need any tricks as the bootloader is unlocked and does not check the firmware like the SKY UK ISP version does.

The tool above ( Broadcom Firmware Tool ) works a treat using mono-complete package on Debian and puts out good images that can be flashed even on the SKY DG834GT.

However, it is impossible to get OpenWRT flashed from the web interface on these routers ( AFAIK ) because the firmware format is very different compared to original Netgear firmwares.

Someone please update if you know a way without the NFTP recovery mode procedure ( or serial ). I tried lots of ways and it just would not flash OpenWRT images from the web interface even if they got accepted, the router would be unresponsive while flashing the same OpenWRT image through the NFTP tool would work perfectly.

No problems flashing Netgear based firmwares like DGTeam on SKY or original Netgear device if you use the Broadcom Firmware Tool.

EDIT : Quote from wiki - "For an easier upload method than messing around with nftp (constant fail for me, probably user error), once you have made the "openwrt-DG834GT-2.6.27.11.img" file, it can be uploaded thru the original web interface / flash upgrade router procedure. Wish I had known THAT 2 hours ago!" so it looks like somebody did make it work !?

I tried all sorts of methods but for firmware update through web interface to work I needed to have OpenWRT installed already. I could not flash the router from Netgear FW -> OpenWRT FW directly by web interface the first time. Can somebody confirm this is the case ? I think the firmware sections or something are not compatible so the way the web flasher works makes the device unresponsive compared to NFTP that writes directly to flash as layout in FW indicates.