• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

run/linux0.11: Linux archaeology

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

run/linux0.11

开源软件地址(OpenSource Url):

https://github.com/run/linux0.11

开源编程语言(OpenSource Language):

C 79.0%

开源软件介绍(OpenSource Introduction):

Decompress the img file

$ tar -xvf ./hdc-0.11-new.img.tar.gz

========= Original README =======

linux-0.11 development environment(linux-based)

falcon <[email protected]>
update: 2008-10-15

NOTE: you can download the whole dev environment from http://mirror.lzu.edu.cn/software/linux-0.11/linux-0.11-for-gcc4.3.2.tar.gz Here is just the source code of linux-0.11 for gcc 4.3.2.

  1. preparation
  • a linux distribution: debian and ubuntu are recommended
  • a virtual machine: qemu(recommend) or bochs
  • some tools: cscope, ctags, gcc-4.3(or 4.1,4.2,3.4), vim, bash, gdb, dd, qemu, xorg-dev, xserver-xorg-dev... $ apt-get install qemu cscope exuberant-ctags gcc-4.3 vim-full bash gdb build-essential hex graphviz xorg-dev xserver-xorg-dev vgabios libxpm-dev bochs bochs-x bochsbios bximage
  • a linux-0.11 hardware image file: hdc-0.11-new.img, please download it from http://www.oldlinux.org, or http://mirror.lzu.edu.cn/os/oldlinux.org/, after downloading it, you'd put it in linux-0.11/fs/ directory.

and you'd better install tools/calltree, tools/tree2dotx yourself: just copy them to /usr/bin, of course, you'd compile calltree at first.

  1. hack linux-0.11

get help from the main Makefile of linux-0.11 and star to hack it.

$ cd linux-0.11 $ make help // get help $ make // compile $ make start // boot it on qemu $ make debug // debug it via qemu & gdb, you'd start gdb to connect it. $ make tags // create the tag file from the source code $ make cscope // create the cscope index database from the source code

NOTE!

there is a calltree in tools/, which can help you to analyze the source code via printing the calling tree of some indicated functions.

compile $ cd tools/calltree-2.3 install $ sudo cp ./calltree/OBJ/i686-linux-cc/calltree /usr/bin use $ calltree // just type calltree and get the help

  1. debug

start the kernel with qemu, which will listening on port 1234

$ cd linux-0.11 $ make debug

open a new terminal, start gdb and connect the gdbstub in qemu

$ gdb linux-0.11/tools/system (gdb) break main (gdb) target remote localhost:1234 (gdb) s // si:assembly instruction, s|n: c statement(s will enter into subfunc) (gdb) ...

References & Links

[1] http://oss.lzu.edu.cn/blog/article.php?tid_1693.html [2] http://oss.lzu.edu.cn/modules/newbb/viewtopic.php?topic_id=1403&forum=35




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap