文章分类 -  Linux

摘要:Uboot:uboot对应的相关浏览器地址:http://git.denx.de/根据上面的网页中的提示,uboot的git地址应该为:git clone git://git.denx.de/u-boot.gitgit uboot 网页:http://git.denx.de/cgi-bin/gitw... 阅读全文
posted @ 2015-07-12 18:52 JustRelax 阅读(988) 评论(0) 推荐(0)
摘要:Makefile 中尽量使用install 命令。1、最重要的一点,如果目标文件存在,cp会先清空文件后往里写入新文件,而install则会先删除掉原先的文件然后写入新文件。这是因为往正在 使用的文件中写入内容可能会导致一些问题,比如说写入正在执行的文件可能会失败,比如说往已经在持续写入的文件句柄中... 阅读全文
posted @ 2015-05-24 22:15 JustRelax 阅读(394) 评论(0) 推荐(0)
摘要:liam@ubuntu:~/practice$ file hellohello: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), for GNU/Linux... 阅读全文
posted @ 2015-04-30 23:24 JustRelax 阅读(580) 评论(0) 推荐(0)
摘要:Code:liam@ubuntu:~/practice$ cat HelloWorld.c #include int main(){ //print hello world printf("hello world!\n"); return 0;}一、预编... 阅读全文
posted @ 2015-04-30 23:01 JustRelax 阅读(1548) 评论(0) 推荐(0)
摘要:uboot结束后,就会去启动内核。如果内核属于压缩内核,那么就会进入:arch/mips/boot/compressed/head.S先上源码:#include #include .set noreorder //默认汇编器处在reorder的模式下 .cprestore... 阅读全文
posted @ 2015-03-24 22:45 JustRelax 阅读(836) 评论(0) 推荐(1)
摘要:rootfs源码调用过程:init/main.c-> start_kernel()->vfs_caches_init(totalram_pages)--> mnt_init()--> /** *sysfs用来记录和展示linux驱动模型,sysfs先于rootfs挂载是为... 阅读全文
posted @ 2015-03-22 22:37 JustRelax 阅读(3875) 评论(0) 推荐(0)
摘要:使用busybox制作的文件系统,内核启动后,就会开始执行busybox init进程,这个和一般的sys v init一样。busybox要完成以下工作:①为init进程设置信号处理进程②对控制台进行初始化③解析inittab文件,即/etc/inittab④在默认情况下会运行系统初始化脚本,/e... 阅读全文
posted @ 2015-03-19 23:55 JustRelax 阅读(547) 评论(0) 推荐(0)
摘要:先看head.S的主要流程:进入start_kernel()后的主要流程:init/main.c进入该函数后,进行了各种的初始化,最后进入:rest_init(); 初始化内核线程(kernel_init)和内核管理线程(kthreadd),然后进入了cpu_idle();kernel_init:最... 阅读全文
posted @ 2015-03-19 23:54 JustRelax 阅读(769) 评论(0) 推荐(0)
摘要:首先进入:apparmor_init初始化。主要就以下几个步骤: ...... if (!apparmor_enabled || !security_module_enable(&apparmor_ops)) { aa_info_message("AppArmor disabled by... 阅读全文
posted @ 2015-03-14 15:11 JustRelax 阅读(933) 评论(0) 推荐(0)
摘要:本文介绍的是linux-3.5.2,官网下载的。一、init目录下main.c function: start_kernelline 614:security_init();int __init security_init(void){ printk(KERN_INFO "Security Fram... 阅读全文
posted @ 2015-03-13 21:24 JustRelax 阅读(1017) 评论(0) 推荐(0)