Closed mrtc0 closed 9 years ago
手元のgcc 5.1.0ではコンパイルでこけた.
Makefile編集して起動するも cpu0: panic: remap
とエラーが出て起動しなかった.
最終的にUbuntu 12.04 にて gcc 4.6.3を使用.
qemuが入っていなかったので
$ sudo apt-get install qemu
$ git clone git://pdos.csail.mit.edu/xv6/xv6.git
$ which qemu-system-i386
/usr/bin/qemu-system-i386
Makefileの以下の部分を編集
#QEMU =
↓
QEMU = /usr/bin/qemu-system-i386
$ make qemu-nox
dd if=/dev/zero of=xv6.img count=10000
10000+0 records in
10000+0 records out
5120000 bytes (5.1 MB) copied, 0.0603213 s, 84.9 MB/s
dd if=bootblock of=xv6.img conv=notrunc
1+0 records in
1+0 records out
512 bytes (512 B) copied, 5.5578e-05 s, 9.2 MB/s
dd if=kernel of=xv6.img seek=1 conv=notrunc
296+1 records in
296+1 records out
151871 bytes (152 kB) copied, 0.00101092 s, 150 MB/s
qemu-system-i386 -nographic -hdb fs.img xv6.img -smp 2 -m 512
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
Back to tcg accelerator.
xv6...
cpu1: starting
cpu0: starting
sb: size 1000 nblocks 941 ninodes 200 nlog 30 logstart 2 inodestart 32 bmap start 58
init: starting sh
$ ls
. 1 1 512
.. 1 1 512
README 2 2 1972
cat 2 3 11475
echo 2 4 10880
forktest 2 5 6921
grep 2 6 12975
init 2 7 11269
kill 2 8 10876
ln 2 9 10834
ls 2 10 12673
mkdir 2 11 10941
rm 2 12 10922
sh 2 13 20505
stressfs 2 14 11440
usertests 2 15 46495
wc 2 16 11985
zombie 2 17 10626
console 3 18 0
$ echo 'Hello, xv6'
'Hello, xv6'