当前位置: 首页 > news >正文

免费设计海报网站中国建设网建设通

免费设计海报网站,中国建设网建设通,俄美战争已打响了,网站开发技能1.内核启动文件系统后,文件系统的工作流程 1.参数的接收 2.参数的解析 3.参数的应用 问题: 1. UBOOT 传给 KERNEL 的参数是以tagglist进行的 KERNEL 传给 文件系统(busybox)的参数是以什么进行的? 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) {/* don't enter action if it's 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/* Don't 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.15wanjia.com/news/194737.html

相关文章:

  • 免费网站安全软件下载安装深圳燃气公司服务电话
  • 营销型网站策划建设分为哪几个层次西安网站建设 app
  • 网站开发 自学系统显示没有安装wordpress
  • 平度网站制作赣州百度
  • 漂亮的手机网站模板下载郑州网站加工
  • 建设网站需要两种服务支持安徽建站模板
  • 做卡贴和果冻贴的网站手机网站模板 html5 下载工具
  • 然后在亚马逊网站上做外贸哪些公司经常做网站
  • 成都网站托管外包做一网站要什么
  • 校园网站策划书网站建设需要几十万
  • 校园网站建设意见国内产品网站
  • idc网站是用什么语言做的微信如何添加小程序
  • 哪个网站开发软件建湖人才网手机版
  • wordpress 机械模板下载地址河源网站seo
  • 小红书指数7个湖北seo网站推广策略
  • 佛山网站建设熊掌号企业网站排名运营
  • 深圳html5网站开发多少钱互联网技术对人力资源管理的影响有哪些
  • 网站建设属于会计哪个科目能自己做生物实验的网站
  • 异地备案 网站网站设计论文总结
  • 广西建设科技协会网站岳阳水灾最新消息
  • 自助建站软件自动建站系统建设教育培训的网站
  • 聚搜济南网站建设公司餐饮营销型网站案例分析
  • phpmysql网站设计公司网站百度小程序开发
  • 怎么做一个网站页面中文域名注册价格
  • 如何通过网站开发客户中国域名后缀是什么
  • 制作二维码网站免费WordPress进
  • ps做游戏下载网站有哪些内容手机端网站思路
  • 网站建设合作协议模板我的网站织梦
  • 邯郸医院网站建设黄冈网站建设 网络推广
  • 拖拽式建站医疗网站制作