![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
rootfs
longshan_2009
这个作者很懒,什么都没留下…
展开
-
rootfs中第一个程序init进程分析
busybox:Busybox-1.7.0首先列出代码:int init_main(int argc, char **argv){ struct init_action *a; pid_t wpid; die_sleep = 30 * 24*60*60; /* if xmalloc will ever die... */ if (argc > 1 && !str原创 2013-03-19 22:25:39 · 914 阅读 · 0 评论 -
内核启动第一个应用程序
先列出代码:static int noinline init_post(void){ free_initmem(); unlock_kernel(); mark_rodata_ro(); system_state = SYSTEM_RUNNING; numa_default_policy(); if (sys_open((const char __user *)原创 2013-03-19 21:32:12 · 1483 阅读 · 0 评论 -
配置busybox
linuxrc -> busybox,linuxrc就是busybox程序,也就是内核启动的第一个程序编译busybox:1.Makefile里加入交叉编译器前缀:CROSS_COMPILE ?= arm-linux-2.(可以参考韦东山开发手册)3.make4. 创建根文件系统目录:mkdir -p /work/nfs_root/first_fs5.将编译好的busybo原创 2013-03-20 22:33:01 · 1012 阅读 · 0 评论 -
建立根文件系统
步骤:一、建立/dev/console /dev/null节点方法:首先查看pc机上这两个节点的主设备号和次设备号。book@book-desktop:/work/nfs_root/first_fs/dev$ ls -l /dev/null /dev/console crw------- 1 root root 5, 1 2013-03-20 19:54 /dev/consol原创 2013-03-20 22:46:29 · 909 阅读 · 0 评论