[置顶] 该课主要介绍 Windows PE 程序装载与运行原理,并手把手介绍如何撰写一个小型程序装载器,理论与实战并重Windows Mini PE Loader 视频课程已剪辑发布,早鸟价报名中
[置顶] 第1期主要介绍Rust 历史、主要特性、适应领域,与嵌入式和 C 的关系等等,本期增补上手实验环节Rust 语言入门第 2 期直播课将于 24 日晚开播,早鸟价报名中
Linux 0.11 实验环境
可快速构建,支持 Docker, Qemu, Bochs, Ubuntu, Mac OSX, Windows
由 Wu Zhangjin 创建于 2015/10/01
项目描述
该项目致力于快速构建一个 Linux 0.11 实验环境,可配合《Linux内核完全注释》 一书使用。
使用文档:README.md
- 考古计划
- 在线演示
- 代码仓库
- 基本特性:
- 包含所有可用的映像文件: ramfs/floppy/hard disk image。
- 轻松支持 qemu 和 bochs,可通过配置 tools/vm.cfg 切换。
- 可以生成任何函数的调用关系,方便代码分析:
make cg f=func d=file|dir
- 通过 Docker Toolbox 或 Docker CE 支持所有系统:Linux、Windows 和 Mac OSX。
- 支持最新的编译器和调试器,可直接用 Qemu/Bochs + gdb 调试
- 在解压之前整个大小只有 30M
- 支持 Docker 一键构建
- 可通过 Web 直接访问
相关文章
五分钟教程
注:不再推荐如下方式使用 Linux 0.11 Lab,请参考 基于 Docker 快速构建 Linux 0.11 实验环境,基于 Docker,可以轻松在 Windows,Linux 和 Mac OSX 下使用 Linux 0.11 Lab。
准备
以 Ubuntu 和 Qemu 为例, 对于 Mac OS X 和 Bochs 的用法,请参考 README.md.
apt-get install vim cscope exuberant-ctags gcc gdb binutils qemu lxterminal
更多可选工具:
apt-get install bochs vgabios bochsbios bochs-doc bochs-x libltdl7 bochs-sdl bochs-term
apt-get install graphviz cflow
下载
git clone https://gitee.com/tinylab/linux-0.11-lab.git
Or
git clone https://gitee.com/tinylab/linux-0.11-lab.git
编译
make
从硬盘启动
make start-hd
调试
打开一个终端并启动进入调试模式:
make debug-hd
获得帮助
make help
> Usage:
make --generate a kernel floppy Image with a fs on hda1
make start -- boot the kernel in qemu
make start-fd -- boot the kernel with fs in floppy
make start-hd -- boot the kernel with fs in hard disk
make debug -- debug the kernel in qemu & gdb at port 1234
make debug-fd -- debug the kernel with fs in floppy
make debug-hd -- debug the kernel with fs in hard disk
make disk -- generate a kernel Image & copy it to floppy
make cscope -- genereate the cscope index databases
make tags -- generate the tag file
make cg -- generate callgraph of the system architecture
make clean -- clean the object files
make distclean -- only keep the source code files
生成 main 函数调用关系
make cg
ls calltree/linux-0.11.jpg
See:
演示图片
视频演示
猜你喜欢:
- 我要投稿:发表原创技术文章,收获福利、挚友与行业影响力
- 知识星球:独家 Linux 实战经验与技巧,订阅「Linux知识星球」
- 泰晓学院:泰晓科技视频频道,发布各类 Linux 视频课
- 淘宝小店:欢迎光临泰晓科技自营店,购物支持泰晓原创
- 技术交流:Linux 用户技术交流微信群,联系微信号:tinylab
支付宝打赏 ¥9.68元 | 微信打赏 ¥9.68元 | |
![]() | ![]() 请作者喝杯咖啡吧 | ![]() |