[Samba] how to reduce binary size of SAMBA 4 for embeded device

Guido Lorenzutti guido at lorenzutti.com.ar
Sun Jul 30 16:19:30 UTC 2017


  

On Sun, 30 Jul 2017 12:05:37 -0400, Nico Kadel-Garcia via samba
wrote: 

> On Sun, Jul 30, 2017 at 4:17 AM, Andrew Bartlett via samba
>
wrote:
> 
>> On Sun, 2017-07-30 at 15:18 +0800, yuanjp--- via samba
wrote: 
>> 
>>> Hi Bartlett as far as I know, lots of soho router still
use SAMBA 3 I think the binary size is the main consideration. does
Samba team have a plan for --with-tiny-smbd? We look forward to it.
>>
Not that I'm aware of. I had expected interest when I posted my efforts
with link-time-optimisation, but nothing went anywhere. So from here, I
suggest you either dig into the build system (patches most welcome!), or
contract a Samba development shop[1] to look into this for you. If you
do dig into the build system, look at how the MIT KDC and without-ad-dc
options are implemented, using the enabled flag on each subsystem.
> 
>
There's also the simplest solution: "throw money at it". In other
>
words, be prepared to use a more modern, larger binary and simply pay
>
for the RAM and storage to serve it. You can throw a *lot* of
>
resources at trying to shrink software to a specified maximum size
>
that isn't reasonable with modern, larger flash drives and RAM.

Some
time ago I use this to solve a similar problem: 

"the Ultimate Packer
for eXecutables" 

https://upx.github.io/ 

Hope it helps. 
 


Links:
------
[1] mailto:samba at lists.samba.org


More information about the samba mailing list