Author: mmu_man Date: 2010-10-12 02:20:53 +0200 (Tue, 12 Oct 2010) New Revision: 38952 Changeset: http://dev.haiku-os.org/changeset/38952 Modified: haiku/trunk/src/system/boot/platform/amiga_m68k/debug.cpp haiku/trunk/src/system/boot/platform/amiga_m68k/shell.S haiku/trunk/src/system/boot/platform/amiga_m68k/start.cpp Log: Actually it seems using HD ADF image is what is causing this issue with 6 sectors. Using DD images seems to work fine. Fix panic(). Now panic() in _start. To try it, do : TARGET_BOOT_PLATFORM=amiga_m68k jam -j1 -q haiku_loader dd if=/dev/zero of=haiku.adf count=1760 dd if=generated/objects/haiku/m68k/release/system/boot/haiku_loader of=haiku.adf conv=notrunc uae -s floppy0=haiku.adf -s cpu_type=68020/68881 -s chipmem_size=8 -i Modified: haiku/trunk/src/system/boot/platform/amiga_m68k/debug.cpp =================================================================== --- haiku/trunk/src/system/boot/platform/amiga_m68k/debug.cpp 2010-10-11 23:33:01 UTC (rev 38951) +++ haiku/trunk/src/system/boot/platform/amiga_m68k/debug.cpp 2010-10-12 00:20:53 UTC (rev 38952) @@ -19,16 +19,26 @@ void panic(const char *format, ...) { - struct AlertMessage { - uint16 column; - uint8 line; - char messages[14+512]; - } alert = { + static struct AlertMessage { + uint16 column1; + uint8 line1; + char message[14]; + uint8 cont; + uint16 column2; + uint8 line2; + char buffer[512]; + uint8 end; + + } _PACKED alert = { 10, 12, - "*** PANIC ***" + "*** PANIC ***", + 1, + 10, 22, + "", + 0 }; - char *buffer = &alert.messages[14]; + char *buffer = alert.buffer; va_list list; //platform_switch_to_text_mode(); @@ -36,10 +46,10 @@ memset(buffer, 0, 512); va_start(list, format); - vsnprintf(buffer, 512-1, format, list); + vsnprintf(buffer, 512, format, list); va_end(list); - DisplayAlert(DEADEND_ALERT, &alert, 30); + DisplayAlert(DEADEND_ALERT, &alert, 40); clear_key_buffer(); wait_for_key(); Modified: haiku/trunk/src/system/boot/platform/amiga_m68k/shell.S =================================================================== --- haiku/trunk/src/system/boot/platform/amiga_m68k/shell.S 2010-10-11 23:33:01 UTC (rev 38951) +++ haiku/trunk/src/system/boot/platform/amiga_m68k/shell.S 2010-10-12 00:20:53 UTC (rev 38952) @@ -493,7 +493,7 @@ // 0x180 is the allowed maximum, as the zipped TAR with the // kernel and the boot module might start at offset 192 kB //.word 0x0300 //0x0180 - .word 6//BOOT_ARCHIVE_IMAGE_OFFSET*2 + .word BOOT_ARCHIVE_IMAGE_OFFSET*2 sBootIOReq: .long 0 Modified: haiku/trunk/src/system/boot/platform/amiga_m68k/start.cpp =================================================================== --- haiku/trunk/src/system/boot/platform/amiga_m68k/start.cpp 2010-10-11 23:33:01 UTC (rev 38951) +++ haiku/trunk/src/system/boot/platform/amiga_m68k/start.cpp 2010-10-12 00:20:53 UTC (rev 38952) @@ -117,13 +117,10 @@ while (true) {} } -extern "C" void _floppy_err_alert(); - extern "C" void _start(void) { -_floppy_err_alert(); - panic("plop"); + panic("plop %d", 1234); stage2_args args; //asm("cld"); // Ain't nothing but a GCC thang.