Set the embedded system boot Automatic startup program
We hope that the more simple and easier it is to use the embedded system, the more simple it will be. The first step I will talk about is to simplify the process. The following is a record of my operation steps: to set a self-starting program, two problems need to be solved: 1. Automatic System logon; 2. Automatic script execution; 1) Automatic System Logon (1) Modifying/etc/inittab in inittab, configuration 1: 2345: respawn:/sbin/agetty tty1 9600 2: 2345: respawn:/sbin/agetty tty2 9600 3: 2345: respawn: /sbin/agetty tty3 9600 4: 2345: respawn:/sbin/agetty tty4 9600 5: 2345: respawn:/sbin/agetty tty5 9600 6: 2345: respawn: /sbin/agetty tty6 9600 indicates that the system can have six consoles, and ALT + (F1 ~ F6. While/sbin/agetty is a login verification program. When it is executed, the user is prompted to enter the user name and password, and then start a specified shell (specified in the passwd file ). Therefore, we only need to modify it to not execute agettty, but to execute a script compiled by ourselves, we can skip the user name and password input. Modify as follows: 1: 2345: respawn:/root/logintest tty1 9600 here I have assigned a test script in/root/, so that the script will be executed when the system starts. The script content: #! The/bin/sh/bin/login-f root script actually executes the login of a root user. 2) There are two methods for automatic program execution. One is to put the code to be executed after/root/logintest in 1; the other is to put the code to be executed after the/etc/profile file.