Introduction
When working with a Yocto-based root filesystem generated from an NXP BSP release, such as BSP43, several system services are configured to start automatically during system boot. These default services provide essential platform functionality and ensure that the Linux system is operational immediately after startup.
In many real-world applications, however, customers often need to launch their own applications, scripts, or background services automatically. Typical use cases include initializing peripheral devices, starting communication stacks, launching monitoring applications, collecting diagnostic information, or executing periodic maintenance tasks after the system has booted.
This document provides a step-by-step example demonstrating how to configure and manage custom auto-start services in a Yocto-based Linux system. The examples included in this guide are intended as a reference implementation and can be further customized to meet specific project requirements.
By default, BSP43 is based on Yocto 4.0.21 and includes the systemd service manager. Therefore, the examples presented in this document are implemented using standard systemd service and timer mechanisms.
The following sample scenarios are covered:
• Auto-start a one-time script during system boot.
• Run a periodic script every 10 seconds, with the first execution delayed until 20 seconds after system startup.
By understanding these examples, customers can easily adapt the demonstrated techniques to implement their own startup procedures and background tasks within a Yocto-integrated production environment.