[OpenWrt-Devel] Cannot flash UBNT Loco M2
Matthias Schiffer
mschiffer at universe-factory.net
Sat Mar 12 11:38:34 EST 2016
On 03/12/2016 03:43 PM, Outback Dingo wrote:
> On Fri, Mar 11, 2016 at 3:28 PM, Matthias Schiffer <
> mschiffer at universe-factory.net> wrote:
>
>> On 03/11/2016 02:46 PM, Joseph Marlin wrote:
>>> We certainly haven't. I've tried applying these patches -
>> http://thread.gmane.org/gmane.comp.embedded.openwrt.devel/39001
>>>
>>> to no avail. I still get hit by a "Error code 2 - Firmware Check Failed".
>>>
>>> I'm really suspecting this comes down to an intentional check by
>> Ubiquiti to prevent us from flashing, as described on this list and in this
>> comment on the ticket - https://dev.openwrt.org/ticket/20982#comment:16
>>>
>>> I have not yet had a chance to change the image header and CRC to look
>> like a Ubiquiti image, nor do I know how to offhand, but I hope to give it
>> a shot soon.
>>
>> Hi,
>> there is a lot of misinformation about this issue going around, in
>> particular, the wiki is plain wrong (I'll fix that some time soon.)
>>
>> Here's what's going on:
>>
>> * OpenWrt had wrong partition sizes in its UBNT AirMax firmware for a long
>> time
>> * Old AirOS and the corresponding U-boot version had a bug that made U-boot
>> ignore the partition sizes defined in the firmware image. This made OpenWrt
>> work with the old U-boot despite its broken partition sizes
>> * The new AirOS has been fixed in this regard (but contains a new bug).
>> This also means that the broken OpenWrt images don't work anymore and can
>> cause even more breakage
>> * The new U-boot/AirOS did *not* change the flash layout. Both AirOS 5.5.x
>> and 5.6.x use the same flash layout, the changed flash layout reported in
>> the wiki is caused by broken OpenWrt images!
>> * The OpenWrt trunk since r48829 and the CC branch since r48849 are fixed,
>> meaning they define the correct partition sizes
>> * The "Newly-erased block contained word ..." messages are a consequence of
>> a missing patch in CC that has been backported as r48849 (the new U-boot
>> doesn't remove flash protection, so the flash is just read-only from
>> OpenWrt; TFTP recovery is the only way to upgrade in this state)
>>
>
>
>
> Okay sooo... does it work with openwrt after r48849 if we never wish to go
> back to AirOs, and is it sysupgrade flashable after we flash to later then
> this release????
If I remember correctly, this is possible:
* Use a serial console to enter the u-boot command prompt
* Reset the MTD layout (command "mtdparts default" or something like that).
This won't survive a reboot, but when you now start the TFTP rescue (I
think the command is "urescue"), it will accept the image with the correct
partition sizes.
A fixed OpenWrt image flashed this way should just work (and normal
sysupgrades aren't a problem either, as OpenWrt doesn't care about the
mtdlayout known by u-boot.)
Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20160312/422df290/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list