Hi Neil,

> Am 03.05.2016 um 13:12 schrieb Neil Jerram <[email protected]>:
> 
> On 23/04/16 10:04, Neil Jerram wrote:
>> Ah great, thanks.  So, to be clear, you are recommending 4.5?  [1] 
>> (Understanding that this is for experiments like mine and possibly not for 
>> full phone operation.)
>> 
>> [1] 
>> http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/letux-4.5
> 
> I've built letux-4.5 now; haven't yet tried to boot it.
> 
> I notice, though, that it appears to require lots more disk space when 
> installed on the GTA04, compared to 3.7 or 3.17.  Specifically, the 
> /lib/modules/`uname -r` tree is now about 200Mb, whereas for 3.7 or 3.17 it 
> was about 16Mb.

Well, it is the result of a compromise between goals.

* one is that the Letux kernel shall support many different device (GTA04, 
BeagleBoard, BeagleBone, PandaBoard, OpenPandora, Pyra and more).
* another one is that there are a lot of peripheral drivers (e.g. for external 
USB devices) that can be loaded on demand - and therefore we configure for a 
driver module.
* and finally, the 3.7 kernel did configure many things into the uImage instead 
of a module. This makes the kernel boot faster, but is less flexible.

So the result is a big set of modules - where many are not loaded and just 
sitting around on the root file system in case you connect a compatible device 
through OTG for the first time in 2 years...

> 
> Is there something I can do to reduce that?  Perhaps some global stripping 
> option?  Or alternatively some big trimming of the CONFIG_* settings?

You can either reduce many CONFIG options. But it is difficult to maintain 
(because every second Linux -rc introduces/removes/changes some configs).

An alternative is to take the approach of the flash-nand script which tries to 
identify by lsmod / modprobe which module files have really been loaded and 
strips (well, does not copy) all others:

<http://git.goldelico.com/?p=gta04-rootfs.git;a=blob;f=config/root/flash-nand;h=be52b64a22f01237f62c4d874cd32245f48269c5;hb=6ea2ef256dcb0b98482022ce87d2b18e0498dab2#l23>

Another idea could be to define some rm /lib/modules/kernel/pattern*

Generally I think the best approach is that the letux_defconfig compiles as 
many modules as possible. And distributions copy only what they need. Lukas is 
following this approach for the latest Replicant experiments.

If you find a good solution for a general "strip-modules" script that can be 
run on the GTA04, please share!

Thanks,
Nikolaus

_______________________________________________
Gta04-owner mailing list
[email protected]
http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner

Reply via email to