Chinaunix

标题: 初始化过程中的疑问 [打印本页]

作者: hnzpzg    时间: 2015-10-16 14:53
标题: 初始化过程中的疑问
在init/main.c文件中初始化过程void __init kernel_init_freeable(void)函数中,有如下操作
882         /* Open the /dev/console on the rootfs, this should never fail */
883         if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
884                 pr_err("Warning: unable to open an initial console.\n");
从注释上看/dev/console一定能打开成功,我疑惑的是
此时用户空间的udev程序并没有运行,如何创建dev下面的设备节点呢?
此处的设备节点在哪里创建呢?
作者: nswcfd    时间: 2015-10-19 12:11
版内提过这个问题,是Kbuild打包的时候在initramfs里生成的。
具体是哪个帖子暂时还没有找到,在版内搜一下吧,半年之内的。
作者: nswcfd    时间: 2015-10-19 12:40
http://bbs.chinaunix.net/thread-4175779-1-1.html
#8楼 arm-linux-gcc大神的答复。
作者: hnzpzg    时间: 2015-10-19 16:33
非常感
作者: hnzpzg    时间: 2015-10-19 16:33
非常感谢




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2