z0x010 / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
0 stars 0 forks source link

crc check failed ubnt #68

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use the FMK to extract and recompile the firmware.bin
2. Upload firmware to router and run the update command "fwupdate.real -m 
new-firmware.bin -d"
3.

What is the expected output? 

BZ.v2.2.3# fwupdate.real -m firmware.bin -d
Found mtd block: /dev/mtd0(u-boot)
Found mtd block: /dev/mtd1(u-boot-env)
Found mtd block: /dev/mtd2(kernel)
Found mtd block: /dev/mtd3(rootfs)
Found mtd block: /dev/mtd4(cfg)
Found mtd block: /dev/mtd5(EEPROM)
Got U-Boot variable: mtdparts = 
mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(r
ootfs),256k(cfg),64k(EEPROM)
Adding U-Boot partition: u-boot 9F000000 00040000
Adding U-Boot partition: u-boot-env 9F040000 00010000
Adding U-Boot partition: kernel 9F050000 00100000
Adding U-Boot partition: rootfs 9F150000 00660000
Adding U-Boot partition: cfg 9F7B0000 00040000
Adding U-Boot partition: EEPROM 9F7F0000 00010000
Calculating flash size:
Adding block: /dev/mtd0("u-boot") - size: 00040000
Adding block: /dev/mtd1("u-boot-env") - size: 00010000
Adding block: /dev/mtd2("kernel") - size: 00100000
Adding block: /dev/mtd3("rootfs") - size: 00660000
Adding block: /dev/mtd4("cfg") - size: 00040000
Adding block: /dev/mtd5("EEPROM") - size: 00010000
Total flash size: 00800000
Flash start: 9F000000
Flash end: 9F800000
Header MAGIC 'UBNT'
Current: BZ.ar7240.v2.2.3.1055.120112.0726

New ver: BZ.ar7240.v2.2.3.1055.120112.0726
FW Part: "kernel"(1), MAGIC: 'PART', Base: 0x9F050000, DLen: 0x000B2453, PLen: 
0x00100000
FW Part: "rootfs"(2), MAGIC: 'PART', Base: 0x9F150000, DLen: 0x00420000, PLen: 
0x00660000
Adding adjusted FW partition:

What do you see instead?

BZ.v2.2.3# fwupdate.real -m new-firmware.bin -d
Found mtd block: /dev/mtd0(u-boot)
Found mtd block: /dev/mtd1(u-boot-env)
Found mtd block: /dev/mtd2(kernel)
Found mtd block: /dev/mtd3(rootfs)
Found mtd block: /dev/mtd4(cfg)
Found mtd block: /dev/mtd5(EEPROM)
Got U-Boot variable: mtdparts = 
mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(r
ootfs),256k(cfg),64k(EEPROM)
Adding U-Boot partition: u-boot 9F000000 00040000
Adding U-Boot partition: u-boot-env 9F040000 00010000
Adding U-Boot partition: kernel 9F050000 00100000
Adding U-Boot partition: rootfs 9F150000 00660000
Adding U-Boot partition: cfg 9F7B0000 00040000
Adding U-Boot partition: EEPROM 9F7F0000 00010000
Calculating flash size:
Adding block: /dev/mtd0("u-boot") - size: 00040000
Adding block: /dev/mtd1("u-boot-env") - size: 00010000
Adding block: /dev/mtd2("kernel") - size: 00100000
Adding block: /dev/mtd3("rootfs") - size: 00660000
Adding block: /dev/mtd4("cfg") - size: 00040000
Adding block: /dev/mtd5("EEPROM") - size: 00010000
Total flash size: 00800000
Flash start: 9F000000
Flash end: 9F800000
Header MAGIC 'UBNT'
Current: BZ.ar7240.v2.2.3.1055.120112.0726

New ver: BZ.ar7240.v2.2.3.1055.120112.0726
FW Part: "kernel"(1), MAGIC: 'PART', Base: 0x9F050000, DLen: 0x000B2453, PLen: 0
FW Part: "rootfs"(2), MAGIC: 'PART', Base: 0x9F150000, DLen: 0x00420000, PLen: 0
FW Image partition "rootfs"(2) crc check failed.

What version of the product are you using? On what operating system?
0.76 beta

Please provide any additional information below.

I'm trying to put 2 lines of code in a startup script for a ubiquiti router and 
all the extraction and recompile say successful but I get a rootfs crc check 
failed on update.
Looking at the install differences between the modded firmware and the original 
firmware I can see a Plen: 0 on the modded and a Plen: 0x00660000 on the 
original. Anyone with any ideas how to fix this? 

Original issue reported on code.google.com by webtront...@gmail.com on 15 Jun 2012 at 2:39

GoogleCodeExporter commented 8 years ago
Currently, build-ng only supports updating U-Image and TRX header checksums. 
I'm guessing your firmware uses a different header format, so you should have 
gotten a warning message during the re-build to that effect. If you have any 
documentation on the firmware header format used by your ubiquiti router we 
might be able to add support for it.

Original comment by heffne...@gmail.com on 8 Jul 2012 at 11:47

GoogleCodeExporter commented 8 years ago

Original comment by jeremy.collake@gmail.com on 11 Jun 2013 at 8:20

GoogleCodeExporter commented 8 years ago
Still happening with ubiquiti's version XM-v5.5.8.build20991.bin. Any news on 
that? 

Original comment by xavier.m...@gmail.com on 31 May 2014 at 8:09

GoogleCodeExporter commented 8 years ago
its possible to unpack XM-v5.5.8.build20991.bin with the source code fwsplit.c 
included with the old SDK for the ubnt, you just need to add a NULL check 
around checking the header.  It will still dump but it gives you the partitions 
you need.  I have even been able to replace some gfx/text and reconstruct the 
image using the source code of ubnt-mkfwimage.c and the image is accepted on 
the device and runs.  However, something is not correct because I can log into 
the device and see the main status page but none of the others work, they 
return a error saying no permission.

Original comment by james.ta...@gmail.com on 16 Jul 2014 at 9:03

GoogleCodeExporter commented 8 years ago
I'm in the same situation! Can you let me know how you modified fwsplit.c for 
it to work?

Original comment by casinmi...@gmail.com on 9 Aug 2014 at 10:46

GoogleCodeExporter commented 8 years ago
Same here.

Original comment by elci...@gmail.com on 12 Aug 2014 at 8:48

GoogleCodeExporter commented 8 years ago
James, would you share the modified code? =)

Original comment by elci...@gmail.com on 15 Aug 2014 at 7:35

GoogleCodeExporter commented 8 years ago
thanks 

http://www.chat-iraqnaa.net
http://www.chat-sabaya-iraq.com
http://www.rix4web.net

Original comment by bestro...@gmail.com on 19 Jan 2015 at 8:06