6.828: Operating System Engineering (2)

make してみる。

$ make
+ as kern/entry.S
+ cc kern/init.c
+ cc kern/console.c
+ cc kern/monitor.c
+ cc kern/printf.c
+ cc kern/kdebug.c
+ cc lib/printfmt.c
+ cc lib/readline.c
+ cc lib/string.c
+ ld obj/kern/kernel
+ as boot/boot.S
+ cc -Os boot/main.c
+ ld boot/boot
boot block is 411 bytes (max 510)
+ mk obj/kern/kernel.img
$

わを。しかも make qemu で動くらしい。

$ make qemu
qemu -hda obj/kern/kernel.img -serial mon:stdio
pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
KVM internal error. Suberror: 1
rax 00000000f00b8000 rbx 0000000000010094 rcx 0000000000000000 rdx 0000000000000000
rsi 0000000000010094 rdi 0000000000000000 rsp 00000000f010ffb0 rbp 00000000f010ffd8
r8  0000000000000000 r9  000000000000ffff r10 0000000000000000 r11 000000000000ffff
r12 0000000060000010 r13 0000000000000000 r14 00002b3841d2ce90 r15 00002b3841921970
rip 00000000f01004b8 rflags 00010082
cs 0008 (10000000/ffffffff p 1 dpl 0 db 1 s 1 type b l 0 g 1 avl 0)
ds 0010 (10000000/ffffffff p 1 dpl 0 db 1 s 1 type 3 l 0 g 1 avl 0)
es 0010 (10000000/ffffffff p 1 dpl 0 db 1 s 1 type 3 l 0 g 1 avl 0)
ss 0010 (10000000/ffffffff p 1 dpl 0 db 1 s 1 type 3 l 0 g 1 avl 0)
fs 0010 (00000000/ffffffff p 1 dpl 0 db 1 s 1 type 3 l 0 g 1 avl 0)
gs 0010 (00000000/ffffffff p 1 dpl 0 db 1 s 1 type 3 l 0 g 1 avl 0)
tr 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
gdt 110000/17
idt 0/3ff
cr0 11 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
emulation failure, check dmesg for details

あらら。駄目か。なんとなく qemu のオプションが微妙な気がしてますが日中対応な余裕は無いはず。