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 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38952 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -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 @@ panic(const char *format, ...)
|
||||
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();
|
||||
|
||||
@@ -493,7 +493,7 @@ sNumSectors:
|
||||
// 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
|
||||
|
||||
@@ -117,13 +117,10 @@ platform_exit(void)
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user