mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-30 12:43:41 +01:00
Update qemu launch scripts.
This commit is contained in:
parent
59552d4e63
commit
4b0ddf4dee
@ -39,9 +39,9 @@ set -x
|
|||||||
|
|
||||||
if [ "$OSTYPE" = "Darwin" ]
|
if [ "$OSTYPE" = "Darwin" ]
|
||||||
then
|
then
|
||||||
if ! [ -f /usr/local/bin/qemu-system-x86_64 ]
|
if ! [ -f ./Qemu/qemu_portable/qemu-system-x86_64 ]
|
||||||
then
|
then
|
||||||
echo "You must install Qemu with \"brew install qemu\""
|
echo "You must restore the folder \'qemu_portable\'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! [ -f "$SCRIPT_DIR"/disk_image_gpt.img ]
|
if ! [ -f "$SCRIPT_DIR"/disk_image_gpt.img ]
|
||||||
@ -79,19 +79,19 @@ then
|
|||||||
|
|
||||||
set -m
|
set -m
|
||||||
|
|
||||||
/usr/local/bin/qemu-system-x86_64 \
|
cd "$SCRIPT_DIR"
|
||||||
-L "$SCRIPT_DIR" \
|
./qemu_portable/qemu-system-x86_64 \
|
||||||
|
-L qemu_portable \
|
||||||
-m 2048 \
|
-m 2048 \
|
||||||
-cpu core2duo \
|
-cpu Penryn \
|
||||||
-bios "$SCRIPT_DIR"/bios.bin-1.13.0 \
|
-bios ./bios.bin-1.13.0 \
|
||||||
-machine q35 \
|
-machine q35 \
|
||||||
-device VGA,vgamem_mb=64,edid=on,xres=1024,yres=768 \
|
|
||||||
-device ahci,id=ahi \
|
-device ahci,id=ahi \
|
||||||
-drive format=raw,id=hda,file="$SCRIPT_DIR"/disk_image_gpt.img \
|
-drive format=raw,id=hda,file=./disk_image_gpt.img \
|
||||||
-usb \
|
-usb \
|
||||||
-device usb-mouse,bus=usb-bus.0,port=2 \
|
-device usb-mouse,bus=usb-bus.0,port=2 \
|
||||||
-device usb-kbd,bus=usb-bus.0,port=1 \
|
-device usb-kbd,bus=usb-bus.0,port=1 \
|
||||||
-serial file:"$SCRIPT_DIR"/serial0_qemu_out.log \
|
-serial file:./serial0_qemu_out.log \
|
||||||
-gdb tcp::9000 &
|
-gdb tcp::9000 &
|
||||||
[[ $? == 0 ]] || exit 1
|
[[ $? == 0 ]] || exit 1
|
||||||
|
|
||||||
@ -99,9 +99,9 @@ then
|
|||||||
|
|
||||||
count=1
|
count=1
|
||||||
timeout=60
|
timeout=60
|
||||||
image_base_str="Clover : Image base = "
|
image_base_str="CloverX64 : Image base = "
|
||||||
|
|
||||||
getImageBase() {
|
getImageBase() {
|
||||||
[ -f "$SCRIPT_DIR"/serial0_qemu_out.log ] || return 1
|
[ -f "$SCRIPT_DIR"/serial0_qemu_out.log ] || return 1
|
||||||
grep "$image_base_str" "$SCRIPT_DIR"/serial0_qemu_out.log
|
grep "$image_base_str" "$SCRIPT_DIR"/serial0_qemu_out.log
|
||||||
return $?
|
return $?
|
||||||
@ -120,10 +120,16 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
adr="$(grep "$image_base_str" "$SCRIPT_DIR"/serial0_qemu_out.log | awk '{printf "0x%x",$8/NR}')"
|
adr="$(grep "$image_base_str" ./serial0_qemu_out.log | awk '{printf "0x%x",$6}')"
|
||||||
echo adr="$adr"
|
echo adr="$adr"
|
||||||
|
|
||||||
gdb --eval-command="file "$clover_debug_file" -o $adr" \
|
GDB=gdb
|
||||||
|
if [ -f ../../../toolchain.gdb/gdb ]
|
||||||
|
then
|
||||||
|
GDB=../../../toolchain.gdb/gdb
|
||||||
|
fi
|
||||||
|
|
||||||
|
"$GDB" --eval-command="file "$clover_debug_file" -o $adr" \
|
||||||
--eval-command="target remote localhost:9000" \
|
--eval-command="target remote localhost:9000" \
|
||||||
--eval-command="rwatch *0" \
|
--eval-command="rwatch *0" \
|
||||||
--eval-command="br panic_" \
|
--eval-command="br panic_" \
|
||||||
|
@ -23,12 +23,7 @@ if [ "$OSTYPE" = "Darwin" ]
|
|||||||
then
|
then
|
||||||
if ! [ -f ./Qemu/qemu_portable/qemu-system-x86_64 ]
|
if ! [ -f ./Qemu/qemu_portable/qemu-system-x86_64 ]
|
||||||
then
|
then
|
||||||
if ! [ -f /usr/local/bin/qemu-system-x86_64 ]
|
echo "You must restore the folder \'qemu_portable\'"
|
||||||
then
|
|
||||||
echo "You must install Qemu with \"brew install qemu\"", or restore the folder \'qemu_portable\'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "You must install Qemu with \"brew install qemu\""
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! [ -f "$SCRIPT_DIR"/disk_image_gpt.img ]
|
if ! [ -f "$SCRIPT_DIR"/disk_image_gpt.img ]
|
||||||
|
Loading…
Reference in New Issue
Block a user