& Nbsp; after the startup, the user's application or command for starting the system service is automatically run and saved in the/usr/etc/rc. local file of the Development Board root file system. Some development boards automatically run the graphic interface program after startup. press ctrl + c to open the Development Board to the SHELL prompt interface in linux. In fact, you can comment out rc. local
After the system is started, the user's application or command to start the system service is automatically run and saved in the/usr/etc/rc. local file of the Development Board root file system. Some development boards automatically run the graphic interface program after startup. press ctrl + c to open the Development Board to the SHELL prompt interface in linux. In fact, you can comment out the graphic interface commands in the rc. local file and add commands to run your application to automatically run your application at startup.
The following uses my experiment as an example to describe the specific implementation steps. This method originated from the network. I verified it and made some modifications. This article is equivalent to reprinting.
1. go to the Linux operating system of the PC, and run the mkdir lz command under/nfs/usr/to create a folder named lz and enter the lz folder, create a new hello folder using mkdir hello to store the hello folder we will write. c files and executable files generated by compilation.
2. run the "vi hello. c" command under "/nfs/usr/lz/hello" to create the "hello. c" file and edit the following test program:
# Include
Int main (){
Printf ("Hello, test arm-linux! ");
Return 0;
}
After editing, save and exit with: wq.
3. the host uses the following command to cross-compile the environment to compile hello. c:
# Arm-linux-gcc? O hello. c
4. through the ls command, we can see that the hello executable file has been generated under/nfs/usr/lz/hello/. we can go through it on the development board. /hello to test your prepared hello. c execution
5. modify the rc. local file and use '#' at the end of the file to release the command for starting the graphic interface and add the command for executing the hello user application. the specific implementation is as follows:
# Export PATH = $ QPEDIR/bin: $ PATH
# Qtopia
#/Usr/qtopia/bin/qtopia
/Usr/lz/hello/./hello
Note: the first three lines comment out the startup GUI, and the last line is the added hello testing program.
6. restart the development board and use the vivi parameter configuration to mount the file system on the host through nfs on the development board. then we can see that the development board has run the hello program we have compiled through the super terminal.