mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Add more wscript options for qemu/vbox debugging
This commit is contained in:
25
wscript
25
wscript
@@ -80,6 +80,7 @@ def configure(ctx):
|
|||||||
'-ffreestanding',
|
'-ffreestanding',
|
||||||
'-nodefaultlibs',
|
'-nodefaultlibs',
|
||||||
'-fno-builtin',
|
'-fno-builtin',
|
||||||
|
'-mno-sse',
|
||||||
'-fno-omit-frame-pointer',
|
'-fno-omit-frame-pointer',
|
||||||
'-mno-red-zone',
|
'-mno-red-zone',
|
||||||
]
|
]
|
||||||
@@ -285,15 +286,37 @@ def qemu(ctx):
|
|||||||
'-nographic',
|
'-nographic',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
def debug(ctx):
|
||||||
|
import subprocess
|
||||||
|
subprocess.call("rm popcorn.log", shell=True)
|
||||||
|
subprocess.call([
|
||||||
|
'qemu-system-x86_64',
|
||||||
|
'-drive', 'if=pflash,format=raw,file={}/flash.img'.format(out),
|
||||||
|
'-drive', 'format=raw,file={}/popcorn.img'.format(out),
|
||||||
|
'-smp', '1',
|
||||||
|
'-m', '512',
|
||||||
|
'-d', 'mmu,int,guest_errors',
|
||||||
|
'-D', 'popcorn.log',
|
||||||
|
'-cpu', 'Broadwell',
|
||||||
|
'-M', 'q35',
|
||||||
|
'-no-reboot',
|
||||||
|
'-nographic',
|
||||||
|
'-s',
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
def vbox(ctx):
|
def vbox(ctx):
|
||||||
import os
|
import os
|
||||||
|
from os.path import join
|
||||||
from shutil import copy
|
from shutil import copy
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
|
|
||||||
|
vbox_dest = os.getenv("VBOX_DEST")
|
||||||
|
|
||||||
ext = 'qed'
|
ext = 'qed'
|
||||||
dest = os.path.join(os.getenv("VBOX_DEST"), "popcorn.{}".format(ext))
|
dest = join(vbox_dest, "popcorn.{}".format(ext))
|
||||||
call("qemu-img convert -f raw -O {} build/popcorn.img {}".format(ext, dest), shell=True)
|
call("qemu-img convert -f raw -O {} build/popcorn.img {}".format(ext, dest), shell=True)
|
||||||
|
copy(join("build", "src", "kernel", "popcorn.elf"), vbox_dest);
|
||||||
|
|
||||||
def listen(ctx):
|
def listen(ctx):
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
|
|||||||
Reference in New Issue
Block a user