mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-02-23 02:11:54 +01:00
Panic message goes in log over serial port.
Qemu launch script.
This commit is contained in:
parent
efb3c44b0f
commit
87bc06495c
@ -24,8 +24,13 @@ set -x
|
|||||||
|
|
||||||
if [ "$OSTYPE" = "Darwin" ]
|
if [ "$OSTYPE" = "Darwin" ]
|
||||||
then
|
then
|
||||||
|
if ! [ -f ./Qemu/qemu_portable/qemu-system-x86_64 ]
|
||||||
|
then
|
||||||
if ! [ -f /usr/local/bin/qemu-system-x86_64 ]
|
if ! [ -f /usr/local/bin/qemu-system-x86_64 ]
|
||||||
then
|
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\""
|
echo "You must install Qemu with \"brew install qemu\""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -65,8 +70,8 @@ then
|
|||||||
set -m
|
set -m
|
||||||
|
|
||||||
cd "$SCRIPT_DIR"
|
cd "$SCRIPT_DIR"
|
||||||
/usr/local/bin/qemu-system-x86_64 \
|
./qemu_portable/qemu-system-x86_64 \
|
||||||
-L . \
|
-L qemu_portable \
|
||||||
-m 2048 \
|
-m 2048 \
|
||||||
-cpu core2duo \
|
-cpu core2duo \
|
||||||
-bios ./bios.bin-1.13.0 \
|
-bios ./bios.bin-1.13.0 \
|
||||||
|
@ -25,12 +25,21 @@ static void panic_(const char* format, VA_LIST va)
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
|
#define FATAL_ERROR_MSG "\nA fatal error happened. System halted.\n"
|
||||||
static void panic_(const char* format, VA_LIST va)
|
static void panic_(const char* format, VA_LIST va)
|
||||||
{
|
{
|
||||||
if ( format ) {
|
if ( format ) {
|
||||||
vprintf(format, va);
|
vprintf(format, va);
|
||||||
|
#ifdef DEBUG_ON_SERIAL_PORT
|
||||||
|
char buf[500];
|
||||||
|
vsnprintf(buf, sizeof(buf)-1, format, va);
|
||||||
|
SerialPortWrite((UINT8*)buf, strlen(buf));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
printf("A fatal error happened. System halted\n");
|
printf(FATAL_ERROR_MSG);
|
||||||
|
#ifdef DEBUG_ON_SERIAL_PORT
|
||||||
|
SerialPortWrite((UINT8*)FATAL_ERROR_MSG, strlen(FATAL_ERROR_MSG));
|
||||||
|
#endif
|
||||||
while (1) { // this will avoid warning : Function declared 'noreturn' should not return
|
while (1) { // this will avoid warning : Function declared 'noreturn' should not return
|
||||||
CpuDeadLoop();
|
CpuDeadLoop();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user