[LEDE-DEV] ar71xx kernel size starts getting oversized

Yousong Zhou yszhou4tech at gmail.com
Sat Jun 4 22:05:03 PDT 2016


On 4 June 2016 at 22:15, Yousong Zhou <yszhou4tech at gmail.com> wrote:
> On 04/06/2016, Daniel Golle <daniel at makrotopia.org> wrote:
>> Hi Yousong,
>>
>> the main issue on ar71xx is the high number of mach-*.c files for all
>> the boards being included in *all* images. Once the target has been
>> migrated to device tree (which is a huge amount of work, lynxis has
>> done major progress there), this should easily free 500 kB of the
>> uncompressed kernel image.
>
> The lzma-compressed size has increased by more than 200KB.  I dont
> think it is caused by those mach files.
>
> It has been quite a while since I tried building ar71xx kernel by
> deleting unneeded mach files first.  I believe the size reduction was
> not so impressive that I do not remember them at all...

Here are some numbers just got by building LEDE master 29b412b8c5

With all mach files compiled in

-rwxr-xr-x 1 yousong yousong  4186524 Jun  5 12:37 vmlinux-hiwifi-hc6361
-rw-r--r-- 1 yousong yousong  1320762 Jun  5 12:38
vmlinux-hiwifi-hc6361.bin.lzma
-rw-r--r-- 1 yousong yousong  1320826 Jun  5 12:38 vmlinux-hiwifi-hc6361.uImage

Excluding non-relevant mach files by editing arch/mips/ath79/Makefile

-rwxr-xr-x 1 yousong yousong  4061516 Jun  5 12:42 vmlinux-hiwifi-hc6361
-rw-r--r-- 1 yousong yousong  1298961 Jun  5 12:42
vmlinux-hiwifi-hc6361.bin.lzma
-rw-r--r-- 1 yousong yousong  1299025 Jun  5 12:42 vmlinux-hiwifi-hc6361.uImage

About 100KB uncompressed size reduction, and 20KB reduction in compressed size.

                yousong

>
> Cheers
>                 yousong
>
>>
>> Cheers
>>
>> Daniel
>>
>> On Sat, Jun 04, 2016 at 12:49:04PM +0800, Yousong Zhou wrote:
>>> Several days ago I tried to build a firmware for HiWiFi-HC6361 with
>>> LEDE master branch.  Yet the firmware was not present in
>>> bin/targets/ar71xx/generic after the build completed.  I checked the
>>> downloads.lede-project.org the firmware was also missing there.
>>>
>>> The problem is that mtdparts layout of HC6361 requires the kernel part
>>> to be not bigger than 1280KB (1310720 bytes).  Yet the lzma-compressed
>>> kernel uImage has exceeded this size limit.
>>>
>>> The current size of lede-ar71xx-generic-uImage-lzma.bin in
>>> downloads.lede-project.org is 1367988
>>>
>>> The corresponding file in OpenWrt downloads site are as follows
>>>
>>>     snapshot         1295637
>>>     15.05.1            1176662
>>>     14.07               1107048
>>>
>>> My device is currently running 4.1.16 with OpenWrt r48975.  So the
>>> bloat probably comes from the 4.4 bump.  Sorry that at the moment I
>>> can just bring the issue up and cannot find time to do further
>>> investigation.
>>>
>>> Regards
>>>
>>>                 yousong
>>>
>>> _______________________________________________
>>> Lede-dev mailing list
>>> Lede-dev at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/lede-dev
>>
>
>
> --
>                 yousong



More information about the Lede-dev mailing list