OpenEmbedded: Trimming down an image


#1

Hi,

I’m currently working on building my own image for the dragonboard410c with OpenEmbedded. The goal essentially is to get a graphical QT application running as quickly as possible (possibly with a splash screen showing beforehand).

Currently I’m using the morty branch with the rpb-eglfs distribution as a base.
By removing unneeded options from “rpb-qt5-image.bb” (which I am building with bitbake) and removing the serial console output in “dragonboard410c.conf” I was able to reduce boot time a bit already. My test application is started as a systemd service and it’s working so far.
According to systemd-analyze the kernel boot time takes about 6s while the entire userspace is already down to 1s (so its probably worth trying to reduce the former). As for the kernel size, it is down to ~150MB, with the largest parts being “firmware-qcom-dragonboard410c”, “mesa-megadriver” and “kernel-image–image-4.4.38+linaro”.

My question is: Is there an easy way to further decrease kernel boot time? For example, is it possible to skip all functionality and drivers related to bluetooth, wifi or sound, if I don’t need any of them (but specifically keep the graphics driver/opengl working)?

Are there any other suggestions or resources I should look into?

Thanks,
Chris


#2

The low hanging fruit might require you to simply to recompile -and reinstall- the kernel disabling those drivers or features that you don’t need (you might be able shave a second or two just by doing that)

After that it will get exponentially harder.

I suggest that you first get a kernel boot graph and use it to decide where you want to invest your efforts. If you could also share the boot-graph associated to the release you are working on for reference that would be cool.

Please do let us know how you do, I am sure there are many others interested.

From Free electrons:

And an overall information page
http://elinux.org/Boot_Time