i.mx6 Linux Qt Boot process tracking

Source: Internet
Author: User

/************************************************************************** * i.mx6 Linux Qt Boot process tracking * Disclaimer: * 1. source code source my-i.mx6; * 2. This article is only an analysis of the startup process, and does not explain why the startup process is such a problem. * 2015-6-13 Shenzhen Ching Nanshan Ping Shan village Zengjianfeng *********************************************************** **************/                \\\\\\\\\\\\\-*-Directory-*-////////////| First, cat/etc/Inittab| Second, cat/etc/rc.d/RcS| Third, cat/etc/rc.d/rc.local| Iv. cat/etc/rc.d/Rc_gpu. S| Wu, cat/etc/Profile \\\\\\\\\\\\\\\\\\\//////////////////One, Cat/etc/Inittab # See BusyBox-1.00rc2/examples/inittab forMore Examples:: sysinit:/etc/rc.d/RcS # program called at system startup 1 #::respawn:/etc/rc.d/RC_MXC. S ttymxc0::once:/bin/Login Root # Core information printed serial port:: Sysinit:/etc/rc.d/Rc_gpu. S # program invoked at system startup 2:: Ctrlaltdel:/sbin/reboot:: Shutdown :/etc/rc.d/The program that is called by the RcS Stop # Shutdown:: Restart:/sbin/Init # program called when the system restarts two, cat/etc/rc.d/RcS #!/bin/SH # Minimal startup script, would work with MSH ( This  isBest availableinch# mmuless format). # load the config information load the configuration information and make it effective. /etc/rc.d/rc.conf # If you do not pass in the first argument, assign the start string to mode # to view the contents of the Inittab file, you can understand this part: #:: Sysinit:/etc/rc.d/RcS # program called at system startup 1 #:: Sysinit:/etc/rc.d/Rc_gpu. S # program called at system startup 2 #:: Shutdown:/etc/rc.d/RcS Stop # is called at shutdown # as indicated above, the machine does not pass the parameter to indicate start, shutdown incoming stop means shutdown mode=${1:-Start}if[$mode ="Start"] Then services=$cfg _services # If mode is start,services equals cfg_services valueElseServices=$cfg _services_r # If mode is start,services equals Cfg_services_r value fi cfg_services=${2:-$services} # If you do not pass in the second argument, cfg_services equals services # Run the configured sequence forIinch$cfg _services # iteration Cfg_services Do        if[-x/etc/rc.d/init.d/$i] # Check if the file can be executed then /etc/rc.d/init.d/$i $mode # If executable, then execute, and pass in the corresponding mode parameter, start or stop fi Doneif[$#-ge2] # If the number of arguments is greater than 2, the execution is complete here, and then exit0fi # Show All kernel log messages # Set the kernel information output level #echo8>/proc/sys/kernel/PRINTK # Run rc.localifpresent and executableif[-x/etc/rc.d/Rc.local] # Check if rc.local can perform then/etc/rc.d/rc.local $mode # Run the script and track the script Fi III, CAT/etc/rc.d/rc.local #!/bin/SH # # This script would be executed*after*All of the other init scripts. # You can put your own initialization stuffinchhere # I've seen/usr/bin/rpm file, does not exist, so if the content in the judgment can be ignored # of course, after the system has been running, and did not find the following echo out of the debug informationif[-X"/usr/bin/rpm"-a-e"/tmp/ltib"] then echo"Rebuilding RPM Database"RM-rf/tmp/Ltib rpm--rebuilddb fi # Fix up permissions # Modify/home/User's permissionsif[-d/home/user] then Chown-R user.user/home/User fi # Creates some device nodes, after which the code does not find content that is too valuable for the program to run # ADD nodes when running under the hypervisor andStaticDevicesif[-r/sys/class/misc/fsl-hv/dev-a! -r/dev/fsl-HV] then echo"Creating hypervisor nodes"DEVID= ' cat/sys/class/misc/fsl-hv/Dev 'if[-N"$DEVID"] then MAJOR="${devid%:*}"MINOR="${devid##*:}"               if[ \("$MAJOR"-gt0\)-A \ ("$MINOR"-gt0 \) ] Then RM-f/dev/fsl-HV Mknod/dev/fsl-HV c $MAJOR $MINOR fi fi forIinch 0 1 2 3 4 5 6 7        DoMknod/dev/hvc$i C229$i Done FI # Add the FM device nodesif[-N"$ (cat/proc/devices | grep fm | SED ' s/\ ([0-9]*\). */\1/')"-A! -r/dev/FM0] then echo"Creating Fman Device Nodes"CD/usr/share/doc/fmd-uspace-01.01/test/sh fm_dev_create cd-fi forIinch 0 1 2; Do        if[-e/sys/class/graphics/fb$i]; Then chmod0666/sys/class/graphics/fb$i/Pan fi done four, cat/etc/rc.d/Rc_gpu. S #!/bin/Bash # Get some information about the CPU Cpurev=$ (cat/proc/cpuinfo | grep Revision | awk'{print $}'| Awk'{print substr ($0,1,2)}'# Set Some variables, from the value of the variable, the main problem is to solve some of the different CPU environment of the # dependent libraries, the later content is to deal with this matter FILEVG=/usr/lib/libopenvg.so filevg3d=/usr/lib/libopenvg_3d.so FILEVG355=/usr/lib/libopenvg_355.so Echo4>/sys/module/galcore/parameters/Gpu3dminclockif[-e $FILEVG 3D] && [-e $FILEVG 355] Thenif[$CPUREV = =" A"] || [$CPUREV = =" the"] || [$CPUREV = =" -"] && [-e $FILEVG] then RM-F $FILEVG fiif[$CPUREV = =" A"] Then ln-s $FILEVG 3D $FILEVG fiif[$CPUREV = =" the"] Then ln-s $FILEVG 355 $FILEVG fiif[$CPUREV = =" -"] Then ln-s $FILEVG 355 $FILEVG fi fi V, Cat/etc/Profile # Set PATH environment variable path=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin PS1='[\[email protected]\h \w]\$'# The message format displayed in the shell export path # Exports path bit environment variable alias ll='ls-l'# Set command aliases alias La='ll-a'Export PS1='\[email protected]\h \w$'# Exporting some environment variables export PS2='>'Export PS3='? 'Export PS4='[$LINENO]+'# Set up information about Tslib, QT libraries export Gst_plugin_path=/usr/lib/fsl_mm_linux/lib/gstreamer-0.10Export Tslib_root=/usr/local/tslib-Install export Tslib_tsdevice=/dev/input/event1 Export Tslib_calibfile=/etc/pointercal Export Tslib_conffile= $TSLIB _root/etc/ts.conf Export Tslib_plugindir= $TSLIB _root/lib/TS Export Tslib_fbdevice=/dev/fb0 Export PATH=/usr/local/tslib-Install: $PATH export Ld_library_path=/usr/local/trolltech/qtembedded-4.8.5-arm/Lib Export qt_qws_fontdir=/usr/local/trolltech/qtembedded-4.8.5-arm/lib/Fonts Export Qws_mouse_proto=tslib:/dev/input/event1 # View/etc/pointercal file exists and is a regular file # through this file to determine whether it is necessary to call the touch screen correction programif[-f/etc/pointercal];then Echo"MXS touchscreen have calibrate!"    Else/usr/local/tslib-install/bin/ts_calibrate Fi # runs the QT program, passes in the Qws parameter, and runs in the background/qt_app/myzr-qws &

i.mx6 Linux Qt Boot process tracking

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.