2019-12-03 06:55 PM
how do i remove service at the build time,such like avahi-daemon,systemd-timesyncd
I don't need them,I hope the system can start as soon as possible by removing unnecessary startup items
2019-12-03 11:11 PM
Hello,
this could help you: https://wiki.st.com/stm32mpu/wiki/How_to_optimize_the_boot_time
2019-12-04 12:00 AM
I have read that page.
I mean how to disable a service at build time so that it does not load automatically at system startup.
For example, how to edit the .bb file so that systemd-timesyncd is not loaded at system startup, but is started by my app when needed.
2019-12-04 12:01 AM
The default configuration loads many services, some of which can be disabled or started when needed, such as Bluetooth, wifi
2019-12-04 08:02 AM
Hello,
Difficult to answer your question as there are many ways to do it and it is really depending on your background + target.
1/ you could use another build system as Yocto: buildroot is very convenient is you want to build a small and manageable system (in term of component count)
2/ you can build your own distribution with yocto: see: poky/meta-poky/conf/distro/poky-tiny.conf for example
3/ you can choose from ST distribution minimal core image: in envsetup.sh, no distro then build core-image-minimal
4/ you can remove features from ST distribution: From your image.bb, remove the features you don't need (also in the sub packages) so that you keep only what you need. If the feature is removed, Yocto will also remove the services associated to this feature from systemd launch.