mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 10:06:31 +00:00
new: xhci get descriptor
This commit is contained in:
22
run.sh
22
run.sh
@ -7,6 +7,16 @@ fi
|
||||
GENERATE_ISO=0
|
||||
IN_DOCKER=0
|
||||
|
||||
IA32_USE_QEMU=1
|
||||
bochsrc="./bochsrc"
|
||||
ARCH="x86_64"
|
||||
|
||||
if [ ${IA32_USE_QEMU} == "1" ];then
|
||||
export EMULATOR=__QEMU_EMULATION__
|
||||
else
|
||||
export EMULATOR=__NO_EMULATION__
|
||||
fi
|
||||
|
||||
# 第一个参数如果是--notbuild 那就不构建,直接运行
|
||||
if [ ! "$1" == "--nobuild" ]; then
|
||||
echo "开始构建..."
|
||||
@ -28,9 +38,6 @@ if [ ! "$1" == "--nobuild" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
IA32_USE_QEMU=1
|
||||
bochsrc="./bochsrc"
|
||||
ARCH="x86_64"
|
||||
|
||||
# 内核映像
|
||||
root_folder="$(pwd)"
|
||||
@ -128,8 +135,13 @@ flag_can_run=1
|
||||
|
||||
allflags=$(qemu-system-x86_64 -cpu help | awk '/flags/ {y=1; getline}; y {print}' | tr ' ' '\n' | grep -Ev "^$" | sed -r 's|^|+|' | tr '\n' ',' | sed -r "s|,$||")
|
||||
|
||||
# 请根据自己的需要,在-d 后方加入所需的trace事件
|
||||
|
||||
# 标准的trace events
|
||||
qemu_trace_std=cpu_reset,guest_errors,trace:check_exception,exec,cpu
|
||||
# 调试usb的trace
|
||||
qemu_trace_usb=trace:usb_xhci_reset,trace:usb_xhci_run,trace:usb_xhci_stop,trace:usb_xhci_irq_msi,trace:usb_xhci_irq_msix,trace:usb_xhci_port_reset
|
||||
qemu_trace_usb=trace:usb_xhci_reset,trace:usb_xhci_run,trace:usb_xhci_stop,trace:usb_xhci_irq_msi,trace:usb_xhci_irq_msix,trace:usb_xhci_port_reset,trace:msix_write_config,trace:usb_xhci_irq_msix,trace:usb_xhci_irq_msix_use,trace:usb_xhci_irq_msix_unuse,trace:usb_xhci_irq_msi,trace:usb_xhci_*
|
||||
|
||||
|
||||
qemu_accel=kvm
|
||||
if [ "${OS}" == "Darwin" ]; then
|
||||
@ -142,7 +154,7 @@ if [ $flag_can_run -eq 1 ]; then
|
||||
else
|
||||
qemu-system-x86_64 -d bin/disk.img -m 512M -smp 2,cores=2,threads=1,sockets=1 \
|
||||
-boot order=d \
|
||||
-monitor stdio -d cpu_reset,guest_errors,trace:check_exception,exec,cpu,out_asm,in_asm,${qemu_trace_usb} \
|
||||
-monitor stdio -d ${qemu_trace_std} \
|
||||
-s -S -cpu IvyBridge,apic,x2apic,+fpu,check,${allflags} -rtc clock=host,base=localtime -serial file:serial_opt.txt \
|
||||
-drive id=disk,file=bin/disk.img,if=none \
|
||||
-device ahci,id=ahci \
|
||||
|
Reference in New Issue
Block a user