泰晓科技 -- 聚焦 Linux - 追本溯源,见微知著!
网站地址:https://tinylab.org

泰晓Linux实验盘,即刻上手内核与嵌入式开发
请稍侯

Linux 0.11 实验环境


可快速构建,支持 Docker, Qemu, Bochs, Ubuntu, Mac OSX, Windows
Wu Zhangjin 创建于 2022/03/10

注意:由于没有足够的资源进行长期维护,该项目当前仅面向 Linux Lab Disk 智能随身 Linux 系统盘 用户开放,可在淘宝内检索 “泰晓 Linux” 关键字选购。

项目描述

该项目致力于快速构建一个 Linux 0.11 实验环境,可配合《Linux内核完全注释》 一书使用。

相关文章

五分钟教程

注:不再推荐如下方式使用 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 0.11 Calltree

演示图片

Linux 0.11 Lab

视频演示