[LEDE-DEV] [openwrt/openwrt] ar71xx: Ubiquiti Airmax M: add relocate-kernel to invalidate cache

Etienne Champetier champetier.etienne at gmail.com
Thu Apr 26 13:48:04 PDT 2018


2018-04-26 13:10 GMT-07:00 Matthias Schiffer <mschiffer at universe-factory.net>:
> On 04/26/2018 09:22 PM, Etienne Champetier wrote:
>> Hi Matthias,
>>
>> 2018-04-26 11:43 GMT-07:00 LEDE Commits <lede-commits at lists.infradead.org>:
>>> neoraider pushed a commit to openwrt/openwrt.git, branch lede-17.01:
>>> https://git.lede-project.org/eed9d40133fe6468cc253d0345c7d7332d2aaa7c
>>>
>>> commit eed9d40133fe6468cc253d0345c7d7332d2aaa7c
>>> Author: Matthias Schiffer <mschiffer at universe-factory.net>
>>> AuthorDate: Thu Apr 26 20:04:48 2018 +0200
>>>
>>>     ar71xx: Ubiquiti Airmax M: add relocate-kernel to invalidate cache
>>>
>>>     Some Ubiquiti U-boot versions, in particular the "U-Boot 1.1.4.2-s956
>>>     (Jun 10 2015 - 10:54:50)" found with AirOS 5.6, do not correctly flush the
>>>     caches for the whole kernel address range after decompressing the kernel
>>>     image, leading to hard to debug boot failures, depending on kernel version
>>>     and configuration.
>>>
>>>     As a workaround, prepend the relocate-kernels loader, which will invalidate
>>>     the caches after moving the kernel to the correct load address.
>>
>> So if I understand correctly,
>> with this commit I don't need to downgrade my bullet M to v.5.5.10
>> (U-Boot 1.1.4.2-s594 (Dec  5 2012 - 15:23:07))
>> and I can just downgrade to v.5.6.x (U-Boot 1.1.4.2-s956 (Jun 10 2015
>> - 10:54:50)) and maybe even the firsts 6.0.X (without the signed
>> image)
>>
>> mtdparts differences between the 2 uboot version:
>> https://community.ubnt.com/t5/airOS-SDK-Custom-Development/5-6-2-TFTP-ERROR/m-p/1310208/highlight/true#M2354
>
> AFAIK, both AirOS 5.5 and 5.6 use the same flash layout. The mtdparts with
> the EEPROM at 0x00730000 (also described in
> https://wiki.openwrt.org/toh/ubiquiti/airmaxm ) is bogus and was not
> directly caused by the newer Uboot or AirOS, but by installing "broken"
> OpenWrt images (everything before [1]) from AirOS 5.6; the commit message
> of [1] contains further details. Certain Uboot versions coming with 5.6
> also did not unlock the flash chip, leading to unwritable flash on OpenWrt
> (fixed in [2]).
>
> The cache invalidation issue recently appeared after the update to kernel
> 4.4.120 in lede-17.01, but I'm not sure if the OpenWrt/LEDE default kernel
> configuration is affected.
>
> With these 3 fixes, installing OpenWrt from AirOS 5.6 should work fine; I
> don't know about 6.0. It seems that I never backported [2] to lede-17.01
> because it requires 2 other patches on kernel 4.4, but we have a downstream
> patch for that in Gluon [3].

Ok, so as of today, if I want to install 17.01, because [2] is not
backported I need to flash 5.5.10 first (old uboot)
If I install master 5.6.X should be fine

I just bought a bullet M for testing / to play with,
if you have any commands in mind that you want me to run on different
AirOS versions, just tell me

Thanks for the explanation
Etienne

>
> Regards,
> Matthias
>
>
> [1]
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=076d58d3440f382c536ea8874f58b0df23c263bc
> [2]
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=1abb5c6db11bd8a3c79b9e24ac4511985fe39ea4
> [3]
> https://raw.githubusercontent.com/freifunk-gluon/gluon/563f351b78924bb12c2db49f63baa4db86c2c16b/patches/lede/0027-generic-mtd-backport-unlock-support-and-asserted-fixes-for-certain-Winbond-Spansion-flash-chips.patch
>
>
>
>
>>
>> Thanks
>> Etienne
>>
>



More information about the Lede-dev mailing list