Jos-Lab1 (上)

记录bochs下如何加载和调试jos内核的过程:

I.Bochs下编译和运行Jos内核

http://pdos.lcs.mit.edu/6.828/2007/labs/lab1/lab1.tar.gz 下载Lab1所需内核

tar 解压

1. 设置编译环境,安装GCC

1.1 Set>$ make
$>$ make
$>$ make;make check
$>$ cd ../gcc-4.5.0/
$ ./configure --prefix=/usr/local/gcc-4.5.0 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-0.8.1
$>a known problem that puts the files in a non standard location on Ubuntu12.04.
Solution:

(1) Add>export LIBRARY_PATH=/usr/lib/$(gcc -print-multiarch)export C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)export CPLUS_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch)

#>4.5.0
Copyright (C) 2010 Free Software Foundation, Inc.
This>00000000000i[     ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[     ] BXSHARE>Event type: PANIC
Device: [     ]
Message:>                       Bochs x86 Emulator 2.4.6
             Build>00000000000i[     ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[     ] BXSHARE>Event type: PANIC
Device: [MEM0 ]
Message: ROM: System BIOS>

to

romimage:>2.1.3 Issue 3

========================================================================
                       Bochs x86 Emulator 2.4.6
             Build>00000000000i[     ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[     ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[     ] reading configuration from .bochsrc
bochs-bin: symbol lookup error: /usr/lib/bochs/plugins/libbx_x.so: undefined symbol: XpmCreatePixmapFromData

Solution:

$ sudo apt-get install bochs-sdl
Add this line "display_library: sdl" in .bochsrc


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值