Uncompressing Kernel Image ... Error: Bad gzipped data

Im upgrading my 4/32 tp-link router, I updated

like so

			uboot: partition@0 {
				reg = <0x0 0x20000>;
				label = "u-boot";

			partition@20000 {
				compatible = "tplink,firmware";
				reg = <0x20000 0xfd0000>;
				label = "firmware";

			partition@3f0000 {
				reg = <0xff0000 0x10000>;
				label = "art";


like so

define Device/tplink_tl-mr3220-v1

but Im getting an error on boot


U-Boot 1.1.4 (Jan 25 2011 - 12:09:11)

AP99 (ar7241 - Virian) U-boot
ar7240_ddr_initial_config(133): virian ddr1 init
#### TAP VALUE 1 = 0xf, 2 = 0x10 [0x0: 0x1f]
32 MB
id read 0x100000ff
sector count = 64
Flash:  4 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7240_enet_initialize...
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
Virian MDC CFG Value ==> 4
: cfg1 0xf cfg2 0x7014
eth0: 00:03:7f:09:0b:ad
eth0 up
Virian MDC CFG Value ==> 4
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
ATHRS26: resetting s26
ATHRS26: s26 reset done
eth1 up
eth0, eth1
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... Error: Bad gzipped data
GUNZIP ERROR - must RESET board to recover


and here is how I did it

cat u-boot.bin openwrt-ath79-tiny-tplink_tl-mr3220-v1-squashfs-sysupgrade.bin > flash.bin
dd if=art.bin of=flash.bin seek=255 bs=65536

What I'm missing

(I don't see a change.)

Before I go in depth...why did you [think to] make these changes?

Perhaps it would be good to know your use case.

Im updating from 4MB to 16 MB my spi flash so I need to make changes in configs to represent that change in updated flash
I updated my changes on second config on my first post from 4mb to 16mb


You never pointed this out.

  • Did you also move the data on the old chip to the correct areas on the new chip?
  • Did you make this change in the bootloader?

(Also, I'll move this to the For Developers section.)

First question: Yes I placed bootloader at begging of flash than I placed openwrt-ath79-tiny-tplink_tl-mr3220-v1-squashfs-sysupgrade.bin after boot loaded and placed art partition at end
Second question: I did not make any changes on bootloader

So how would the bootloader know to start decompressing at the new (and correct) location?

(You probably need to look at the U-Boot env.)


Yes thats an issue that I have I paced image right after bootloader and you can see that bootloader cant find it. Bootloader looking for image at 9f020000

Can you help me to place image at correct place ?

Im not home atm I will look in to it tnx :slight_smile:

Really gzipped data?
It's possible that you need to change $(Device/tplink-16m) to $(Device/tplink-16mlzma)

Ok tnx I will try that