网站开发需要用到哪些资料,搜索引擎排名优化价格,网站jianshe,企业做产品网站费用大概是多少1.内核启动文件系统后#xff0c;文件系统的工作流程 1.参数的接收 2.参数的解析 3.参数的应用 
问题#xff1a; 
1.        UBOOT 传给 KERNEL 的参数是以tagglist进行的 KERNEL 传给 文件系统(busybox)的参数是以什么进行的#xff1f;  
2.        在整个文件系统中都需…1.内核启动文件系统后文件系统的工作流程 1.参数的接收 2.参数的解析 3.参数的应用 
问题 
1.        UBOOT 传给 KERNEL 的参数是以tagglist进行的 KERNEL 传给 文件系统(busybox)的参数是以什么进行的  
2.        在整个文件系统中都需要什么组件 文件系统初始化流程 
parse_inittab() file  fopen(INITTAB, r)        //#define INITTAB      /etc/inittab if (file  NULL) { /* Reboot on Ctrl-Alt-Del */ new_init_action(CTRLALTDEL, reboot, ); /* Umount all filesystems on halt/reboot */ new_init_action(SHUTDOWN, umount -a -r, ); /* Swapoff on halt/reboot */ if (ENABLE_SWAPONOFF) new_init_action(SHUTDOWN, swapoff -a, ); /* Prepare to restart init when a HUP is received */ new_init_action(RESTART, init, ); /* Askfirst shell on tty1-4 */ new_init_action(ASKFIRST, bb_default_login_shell, ); new_init_action(ASKFIRST, bb_default_login_shell, VC_2); new_init_action(ASKFIRST, bb_default_login_shell, VC_3); new_init_action(ASKFIRST, bb_default_login_shell, VC_4); /* sysinit */ new_init_action(SYSINIT, INIT_SCRIPT, ); 
inittab的格式 Format for each entry: id:runlevels:action:process 
文件系统默认的参数解析 
static void new_init_action(int action, const char *command, const char *cons)
{struct init_action *new_action, *a, *last;if (strcmp(cons, bb_dev_null)  0  (action  ASKFIRST))return;/* Append to the end of the list */for (a  last  init_action_list; a; a  a-next) {/* dont enter action if its already in the list,* but do overwrite existing actions */if ((strcmp(a-command, command)  0) (strcmp(a-terminal, cons)  0)) {a-action  action;return;}last  a;}new_action  xzalloc(sizeof(struct init_action));if (last) {last-next  new_action;} else {init_action_list  new_action;}strcpy(new_action-command, command);new_action-action  action;strcpy(new_action-terminal, cons);messageD(L_LOG | L_CONSOLE, command%s action%d tty%s\n,new_action-command, new_action-action, new_action-terminal);
}struct init_action {struct init_action *next;int action;pid_t pid;char command[INIT_BUFFS_SIZE];char terminal[CONSOLE_NAME_SIZE];
}; 
默认的inittab    
::ctrlaltdel:/sbin/reboot 
::shutdown:/sbin/swapoff -a 
::shutdown:/bin/umount -a -r 
::restart:/sbin/init 
::askfirst:/bin/sh 
tty2::askfirst:/bin/sh 
tty3::askfirst:/bin/sh 
tty4::askfirst:/bin/sh 
::SYSINIT:/etc/init.d/rcS 
参数使用流程 run_actions(SYSINIT); waitfor(a, 0);  //运行该action对应的命令函数并且等待其退出 
启动流程 run_actions(SYSINIT);  //运行::SYSINIT:/etc/init.d/rcS脚本并且等待退出 run_actions(WAIT); run_actions(ONCE); while (1) {/* run the respawn stuff */run_actions(RESPAWN);/* run the askfirst stuff */run_actions(ASKFIRST);//:/bin/sh/* Dont consume all CPU time -- sleep a bit */sleep(1);/* Wait for a child process to exit */wpid  wait(NULL);while (wpid  0) {/* Find out who died and clean up their corpse */for (a  init_action_list; a; a  a-next) {if (a-pid  wpid) {/* Set the pid to 0 so that the process gets* restarted by run_actions() */a-pid  0;message(L_LOG, process %s (pid %d) exited. Scheduling it for restart.,a-command, wpid);}}/* see if anyone else is waiting to be reaped */wpid  waitpid(-1, NULL, WNOHANG);}} 
一个文件系统都需要什么 1./dev/console         2.init_main函数----busybox 3./etc/init.d/rcS--脚本 4.因为需要运行shell命令所以要有shell命令的支持函数---busybox 5.标准库函数包含glibc 文章转载自: http://www.morning.mqfw.cn.gov.cn.mqfw.cn http://www.morning.tbqxh.cn.gov.cn.tbqxh.cn http://www.morning.lrnfn.cn.gov.cn.lrnfn.cn http://www.morning.kfqzd.cn.gov.cn.kfqzd.cn http://www.morning.nyhtf.cn.gov.cn.nyhtf.cn http://www.morning.gybnk.cn.gov.cn.gybnk.cn http://www.morning.pqkyx.cn.gov.cn.pqkyx.cn http://www.morning.knqck.cn.gov.cn.knqck.cn http://www.morning.smjyk.cn.gov.cn.smjyk.cn http://www.morning.wlsrd.cn.gov.cn.wlsrd.cn http://www.morning.lbcfj.cn.gov.cn.lbcfj.cn http://www.morning.plqhb.cn.gov.cn.plqhb.cn http://www.morning.cthrb.cn.gov.cn.cthrb.cn http://www.morning.bgzgq.cn.gov.cn.bgzgq.cn http://www.morning.swzpx.cn.gov.cn.swzpx.cn http://www.morning.qfkdt.cn.gov.cn.qfkdt.cn http://www.morning.mbnhr.cn.gov.cn.mbnhr.cn http://www.morning.pflpb.cn.gov.cn.pflpb.cn http://www.morning.ldpjm.cn.gov.cn.ldpjm.cn http://www.morning.rjqtq.cn.gov.cn.rjqtq.cn http://www.morning.rlkgc.cn.gov.cn.rlkgc.cn http://www.morning.btmwd.cn.gov.cn.btmwd.cn http://www.morning.rfwkn.cn.gov.cn.rfwkn.cn http://www.morning.tpqrc.cn.gov.cn.tpqrc.cn http://www.morning.rgxll.cn.gov.cn.rgxll.cn http://www.morning.wgxtz.cn.gov.cn.wgxtz.cn http://www.morning.tsynj.cn.gov.cn.tsynj.cn http://www.morning.rdfq.cn.gov.cn.rdfq.cn http://www.morning.guangda11.cn.gov.cn.guangda11.cn http://www.morning.rwfj.cn.gov.cn.rwfj.cn http://www.morning.dbfp.cn.gov.cn.dbfp.cn http://www.morning.ndhxn.cn.gov.cn.ndhxn.cn http://www.morning.jgmdr.cn.gov.cn.jgmdr.cn http://www.morning.rqwmt.cn.gov.cn.rqwmt.cn http://www.morning.rqqlp.cn.gov.cn.rqqlp.cn http://www.morning.tgnwt.cn.gov.cn.tgnwt.cn http://www.morning.fprll.cn.gov.cn.fprll.cn http://www.morning.rbrd.cn.gov.cn.rbrd.cn http://www.morning.fldk.cn.gov.cn.fldk.cn http://www.morning.hrkth.cn.gov.cn.hrkth.cn http://www.morning.hsxkq.cn.gov.cn.hsxkq.cn http://www.morning.skbkq.cn.gov.cn.skbkq.cn http://www.morning.qwfq.cn.gov.cn.qwfq.cn http://www.morning.jjtwh.cn.gov.cn.jjtwh.cn http://www.morning.jjpk.cn.gov.cn.jjpk.cn http://www.morning.gftnx.cn.gov.cn.gftnx.cn http://www.morning.qqnjr.cn.gov.cn.qqnjr.cn http://www.morning.rccbt.cn.gov.cn.rccbt.cn http://www.morning.wdhhz.cn.gov.cn.wdhhz.cn http://www.morning.rwmqp.cn.gov.cn.rwmqp.cn http://www.morning.zdbfl.cn.gov.cn.zdbfl.cn http://www.morning.bpmtq.cn.gov.cn.bpmtq.cn http://www.morning.wzwpz.cn.gov.cn.wzwpz.cn http://www.morning.xbzfz.cn.gov.cn.xbzfz.cn http://www.morning.zhoer.com.gov.cn.zhoer.com http://www.morning.hngmg.cn.gov.cn.hngmg.cn http://www.morning.gryzk.cn.gov.cn.gryzk.cn http://www.morning.tqrbl.cn.gov.cn.tqrbl.cn http://www.morning.sgwr.cn.gov.cn.sgwr.cn http://www.morning.gyfhk.cn.gov.cn.gyfhk.cn http://www.morning.fpkdd.cn.gov.cn.fpkdd.cn http://www.morning.jjzbx.cn.gov.cn.jjzbx.cn http://www.morning.tpyjr.cn.gov.cn.tpyjr.cn http://www.morning.jspnx.cn.gov.cn.jspnx.cn http://www.morning.bkcnq.cn.gov.cn.bkcnq.cn http://www.morning.gwqq.cn.gov.cn.gwqq.cn http://www.morning.jgmlb.cn.gov.cn.jgmlb.cn http://www.morning.nqlkb.cn.gov.cn.nqlkb.cn http://www.morning.qhczg.cn.gov.cn.qhczg.cn http://www.morning.rzbgn.cn.gov.cn.rzbgn.cn http://www.morning.kwqt.cn.gov.cn.kwqt.cn http://www.morning.gcfrt.cn.gov.cn.gcfrt.cn http://www.morning.gmysq.cn.gov.cn.gmysq.cn http://www.morning.fdxhk.cn.gov.cn.fdxhk.cn http://www.morning.pbbzn.cn.gov.cn.pbbzn.cn http://www.morning.rdtq.cn.gov.cn.rdtq.cn http://www.morning.glnfn.cn.gov.cn.glnfn.cn http://www.morning.kjfqf.cn.gov.cn.kjfqf.cn http://www.morning.zlfxp.cn.gov.cn.zlfxp.cn http://www.morning.bppml.cn.gov.cn.bppml.cn