博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
微视linux 根文件系统之三 内核解压缩
阅读量:4070 次
发布时间:2019-05-25

本文共 1284 字,大约阅读时间需要 4 分钟。

设备树解析,获取initrd基地址和大小

void __init early_init_dt_check_for_initrd(unsigned long node){	unsigned long start, end, len;	__be32 *prop;	pr_debug("Looking for initrd properties... ");	prop = of_get_flat_dt_prop(node, "linux,initrd-start", &len);	if (!prop)		return;	start = of_read_ulong(prop, len/4);	prop = of_get_flat_dt_prop(node, "linux,initrd-end", &len);	if (!prop)		return;	end = of_read_ulong(prop, len/4);	early_init_dt_setup_initrd_arch(start, end);	pr_debug("initrd_start=0x%lx  initrd_end=0x%lx\n", start, end);}

解压缩Initrd到虚拟文件系统

static char * __init unpack_to_rootfs(char *buf, unsigned len){	while (!message && len) {		decompress = decompress_method(buf, len, &compress_name);		res = decompress(buf, len, NULL, flush_buffer, NULL, &my_inptr, error);	}}

Linux内核Ramdisk(initrd)机制

https://blog.csdn.net/leopard21/article/details/42319865

https://www.cnblogs.com/arnoldlu/p/10986583.html

ramdisk配置、解压、创建rootfs、启动简单分析

Linux2.6 内核的 Initrd 机制解析

https://www.ibm.com/developerworks/cn/linux/l-k26initrd/

Linux INITRAMFS 与 INITRD

http://blog.chinaunix.net/uid-25888519-id-3078218.html

rk3188--4.android用initrd文件系统启动流程

http://blog.chinaunix.net/uid-26009923-id-4074053.html

Documentation\filesystems\ramfs-rootfs-initramfs.txt

Documentation\early-userspace\buffer-format

解析Linux中的VFS文件系统

你可能感兴趣的文章
openstack虚拟机创建流程
查看>>
excel 查找一个表的数据在另一个表中是否存在
查看>>
Android中AsyncTask的简单用法
查看>>
概念区别
查看>>
Jenkins 启动命令
查看>>
[LeetCode By Python]121. Best Time to Buy and Sell Stock
查看>>
Android/Linux 内存监视
查看>>
Android2.1消息应用(Messaging)源码学习笔记
查看>>
剑指offer算法题分析与整理(三)
查看>>
JVM并发机制探讨—内存模型、内存可见性和指令重排序
查看>>
nginx+tomcat+memcached (msm)实现 session同步复制
查看>>
WAV文件解析
查看>>
WPF中PATH使用AI导出SVG的方法
查看>>
QT打开项目提示no valid settings file could be found
查看>>
android 代码实现圆角
查看>>
java LinkedList与ArrayList迭代器遍历和for遍历对比
查看>>
drat中构造方法
查看>>
JavaScript的一些基础-数据类型
查看>>
coursesa课程 Python 3 programming 统计文件有多少单词
查看>>
coursesa课程 Python 3 programming course_2_assessment_7 多参数函数练习题
查看>>