Linux Kernel notes (3) boot from __linux

Source: Internet
Author: User

Bo Chuang s3c2410 Board use example:

Linux Process startup is based on the instructions in the startup script , there are two main categories:

init and bash. Init is the topmost of all scripts, executed first,

Bash is usually invoked when it lands on the shell.

Different file system specific startup script file names are not the same. Take the file system (yaffs) I used as an example,/etc/init.d/rcs as a script for init, if you want to open a machine to enter your application, you can write in RcS.

For example, I want to start/usr/qtopia/chip to write /usr/qtopia/chip–qws inside.

/etc/init.d/profile as a bash script, the instructions in this script will not be executed when it is turned on, but you will be invoked when you enter the shell state, and generally bash scripts are used to store environment variables,

Remember, every time you enter the Shell , a bash script is invoked.

Come and see me analyze a routine, there is a QT program in the/usr/qtopia, not the way to start, but the use of terminal input (enter the terminal means to enter the shell) open, this time no problem, the program is normally open, which shows that my QT library LIB environment variable settings are OK.

But when I use the/etc/init/rcs, that is, when I join/USR/QTOPIA/CHIP–QWS in the loading, it prompts the error while the share Qtlib.so.4 "".

The reason is this:

My environment variables are placed in the/etc/profile and the program execution instructions are placed in the/ETC/INIT.D/RCS, there will be a problem, RcS was first executed and profile has not been executed, so obviously can not find Lib, look back at the terminal input start, Why did you find Lib? Very simply, when you open the terminal, Bash has been invoked. In this way, the order of execution becomes the first to execute/etc/profile before executing your instructions.

Note: The bash script for the Ubuntu system is ~/.BASHRC or/ETC/BASHRC

Although the above instructions, but I rewrite the RCS can not upload to the target machine in the specified directory .... Would you please help me?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.