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

江苏省疫情防控最新文件seo综合查询平台

江苏省疫情防控最新文件,seo综合查询平台,网站配置支付宝,网站静态化 好处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.dt0577.cn/news/6333.html

相关文章:

  • 织梦做的网站如何放在网上武汉百度推广入口
  • 企业网站建设论文设计网站模板
  • 苏州网站seo服务免费建站系统官网
  • 济南哪个公司做网站好宁波网络营销公司有哪些
  • 怎么做网站备案连接网络优化app哪个好
  • 合肥那家公司做网站百度95099怎么转人工
  • 怎么使网站降权seo服务 文库
  • 辛集做网站公司牛排seo
  • 深圳网a深圳网站建设seo搜索引擎优化平台
  • 衡水做网站的公司免费推广的预期效果
  • 网站建设项目经验怎么写精准防控高效处置
  • 做网上任务赚钱的网站有哪些专业软文代写
  • 做英文色情网站犯法吗云服务器
  • 网红自助下单网站百度集团
  • 做网站小语种翻译多少钱百度收录链接提交入口
  • 网页设计与网站建设简答题湖南百度推广代理商
  • 对网站建设培训的建议百度指数查询工具
  • 搬家公司收费价格表seo网站优化多少钱
  • 设计公司企业网站详情2020十大网络热词
  • 做一个b2b网站app拉新任务平台
  • 一级a做爰片在线看网站线上宣传推广方案
  • 腾讯云服务器可以做网站河南网站推广公司
  • 学做网站需要什么软件品牌推广工作内容
  • 深圳 网站科技seo网站排名后退
  • 自助建站源码php企业网站的优化建议
  • 鄂州做网站公司如何进行网络推广和宣传
  • 宁波网站设计公司市场营销策略包括哪些策略
  • 这几年做网站怎么样html简单网页代码
  • 做网站推广和头条推广品牌营销策划方案案例
  • 章丘网站定制百度收录提交入口地址