[OpenWrt-Devel] [PATCH] toolchain/uClibc: add support of uClibc-ng

Adam Kuklycz adamk at mcservices.com.au
Thu Aug 27 19:34:01 EDT 2015


Fair enough.

MUSL:
-rw-r--r--  1 adamk adamk  6700676 Aug 27 23:15 root.squashfs

UCLIBC:
-rw-r--r--  1 adamk adamk  6601764 Aug 27 14:19 root.squashfs

So about 100KB difference.

Running Ubuntu 14.04.2 LTS x64 here.

I guess what I am looking at is the final product, which is around 300KB 
bigger in size.  Regardless, I'm going to need to reduce features for 
routers with 8MB of flash, as kernel bloat also adds around another 300KB.



On 28/08/15 09:11, Felix Fietkau wrote:
> On 2015-08-28 01:03, Adam Kuklycz wrote:
>> Just following up on the suspected memory leak, and image build sizes.
>>
>> With the memory leak, it's not a memory leak as such rather than
>> conntrackd filling things up with a log file.
>>
>> After 22 hours of running:
>>
>> root at gateway-openwrt:/tmp/log# ls -l
>> -rw-------    1 root     root      30080612 Aug 28 08:44
>> conntrackd-stats.log
>> drwxr-xr-x    2 root     root            60 Aug 27 10:37 ddns
>> -rw-r--r--    1 root     root             0 Aug 25 13:06 lastlog
>> -rw-r--r--    1 root     root             0 Aug 27 10:36 log.nmbd
>> -rw-r--r--    1 root     root             0 Aug 27 10:36 log.smbd
>> -rw-r--r--    1 root     root             0 Aug 25 13:06 wtmp
>>
>> Deleting the log file and then shutting down conntrackd cleared the used
>> space.  I might look at omitting conntrackd from the builds in future.
>>
>> Now for the build sizes.
>>
>> musl does produce a larger image.  Below is the result of a
>> configuration file I have used for trunk builds with releases 457xx and
>> have reused for a build on r46734 the only changes being I selected
>> either uclibc or musl for the toolchain, otherwise the config file used
>> is identical.
>>
>> MUSL:
>>
>> -rw-r--r-- 1 adamk adamk  8126468 Aug 27 23:15
>> openwrt-ar71xx-generic-wndr3800-squashfs-sysupgrade.bin
>>
>> UCLIBC:
>>
>> -rw-r--r-- 1 adamk adamk  7864324 Aug 27 14:19
>> openwrt-ar71xx-generic-wndr3800-squashfs-sysupgrade.bin
>>
>>
>> Now, for stability sakes I'll want to reduce the image size anyway, with
>> the bloat from latest kernels blowing things out by a good 300KB as
>> well, but it looks like using musl adds around 300KB too.
>>
>> Have the devs determined that perhaps the increased performance of using
>> musl outweighs the hit on image sizes?
> Images are padded, often to 256 KB (which is the size increase of your
> image). This means that it might be that musl just slightly increases
> the image size enough to push it to the next 256KB boundary.
>
> Comparing the size of
> build_dir/target-mips_34kc_musl-1.1.10/linux-ar71xx_generic/root.squashfs-raw
> between uclibc and musl should be more accurate.
>
> - Felix
_______________________________________________
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