Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble booting OSX 10.2 on x86_64 #10

Open
stuaxo opened this issue Jul 6, 2015 · 28 comments
Open

Trouble booting OSX 10.2 on x86_64 #10

stuaxo opened this issue Jul 6, 2015 · 28 comments

Comments

@stuaxo
Copy link

stuaxo commented Jul 6, 2015

When I try and run this, booting stops with the apple displayed, but with before the spinner appears.

I've got a version of ppc4, which can boot this, in wine using ppc ppc4.config - this might not be helpful, as I think the ppc4 version is 32 bit and my build should be 64 bit

ppc - git getting stuck during boot ...

ppc ppc4.config 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA

&gMemory: 0x7fcc111c1000
GenuineIntel
translation cache: 40153000
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 32768
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
start: 134250496
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
start: 2147450880
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
Loading XCOFF...
[CPU/CPU] execution started at 01c00cb0
*** &gCPU: ba8150, &gJITC: ba8c00
sizeof cpu: 2720

ppc4 in wine, completing boot ...

wine ppc4.exe ppc4.config 
fixme:service:scmdatabase_autostart_services Auto-start service L"F06DEFF2-5B9C-490D-910F-35D3A9119622" failed to start: 3
wine: Unhandled page fault on read access to 0xfffff78000000320 at address 0x44a03c (thread 0027), starting debugger...
fixme:service:scmdatabase_autostart_services Auto-start service L"SmdmFService" failed to start: 2
fixme:service:scmdatabase_autostart_services Auto-start service L"UMWdf" failed to start: 2
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA

GenuineIntel
 CMOV MMX SSE SSE2 SSE3
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 32768
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
start: 134250496
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
start: 2147450880
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
[CPU/CPU] execution started at 01c00cb0
[CPU/MMU] new pagetable: sdr1 = 0x0080000f
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^17 pagetable_start: 0x00800000 size: 2^20

@iDevPro
Copy link

iDevPro commented Feb 14, 2016

me too,

pci_ide0_master_installed = 1
pci_ide0_master_image = "osx.img"
#pci_ide0_master_type = "hd"

pci_ide0_slave_installed = 1
#pci_ide0_slave_image = "e:\"
#pci_ide0_slave_image = "2,0,0"
pci_ide0_slave_image = "darwinppc-801.cdr"
pci_ide0_slave_type = "cdrom"

return:

&gMemory: 0x10d81b000
GenuineIntel
translation cache: 11581e000
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 32768
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
start: 681566208
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
Loading XCOFF...
[CPU/CPU] execution started at 05600da4
*** &gCPU: 7ff3b900a400, &gJITC: 7ff3b900ec00
sizeof cpu: 2720

@claunia
Copy link

claunia commented Feb 16, 2016

@stuaxo, @iDevPro have you tried without JIT?

@iDevPro
Copy link

iDevPro commented Feb 21, 2016

./configure --enable-cpu generic

configure: WARNING: you should use --build, --host, --target
checking build system type... Invalid configuration generic: machine 'generic' not recognized
configure: error: /bin/sh ./config.sub generic failed

default config show this:

cpu emulation method:                cpu_jitc_x86_64
compiled for architecture:           x86_64
compiled for OS-API:                 posix
compiled for UI system:              cocoa
enable debug:                        yes
enable profiling:                    no
make release build:                  yes
omit frame pointer:                  yes
final C compiler flags:               -Wundef -Wall -fsigned-char -O3 -fomit-frame-pointer -g -fno-inline -mdynamic-no-pic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe
final C++ compiler flags:             -Wundef -Wall -Woverloaded-virtual -std=c++11 -fsigned-char -O3 -fomit-frame-pointer -g -fno-inline -mdynamic-no-pic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe
final linker flags:                  -framework Cocoa
final linker add:      

@stuaxo
Copy link
Author

stuaxo commented Feb 22, 2016

It actually seems to be booting for me using

./configure --enable-cpu=generic

(Note the = - the instructions above seemed to miss it)

I'm currently booting it on generic, it's slow but seems to work, I'll retest the behaviour under jit to see if it's the same when it finished).

@stuaxo
Copy link
Author

stuaxo commented Feb 23, 2016

Update: booting on generic succeeded. Under a JIT build it seemed to fail (was stuck on apple logo forever).

@iDevPro
Copy link

iDevPro commented Feb 23, 2016

boot

@stuaxo
Copy link
Author

stuaxo commented Feb 24, 2016

Looks about the same, even though we are on different host OS's - You OSX and I Ubuntu 15.10 64 bit, hopefully, this is useful info.

screenshot from 2016-02-24 15-21-17

@iDevPro
Copy link

iDevPro commented Feb 24, 2016

But after 10 minutes it can't load :(

@stuaxo
Copy link
Author

stuaxo commented Feb 24, 2016

Try

bash ./configure --enable-cpu=generic
^ notice the = sign.

make

Then running

@iDevPro
Copy link

iDevPro commented Feb 24, 2016

Already, this is generic :(

@iDevPro
Copy link

iDevPro commented Feb 24, 2016

bash ./configure --enable-cpu=generic

================================================================================
                             Configuration summary
================================================================================

cpu emulation method:                cpu_generic
compiled for architecture:           x86_64
compiled for OS-API:                 posix
compiled for UI system:              cocoa
enable debug:                        yes
enable profiling:                    no
make release build:                  yes
omit frame pointer:                  yes
final C compiler flags:               -Wundef -Wall -fsigned-char -O3 -fomit-frame-pointer -g -fno-inline -mdynamic-no-pic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe
final C++ compiler flags:             -Wundef -Wall -Woverloaded-virtual -std=c++11 -fsigned-char -O3 -fomit-frame-pointer -g -fno-inline -mdynamic-no-pic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe
final linker flags:                  -framework Cocoa
final linker add:                    

================================================================================

@iDevPro
Copy link

iDevPro commented Feb 24, 2016

What record want delete ?

@stuaxo
Copy link
Author

stuaxo commented Feb 24, 2016

I've got know idea what that is. - After configure, can you run make and try and run it again ?

@iDevPro
Copy link

iDevPro commented Feb 24, 2016

Yeah, sorry but app want delete some record, and stall here :(

@iDevPro
Copy link

iDevPro commented Feb 24, 2016

2016-02-24 21 57 55

@stuaxo
Copy link
Author

stuaxo commented Feb 24, 2016

I'll see if I can get access to a Mac and work out what that means.

@iDevPro
Copy link

iDevPro commented Feb 24, 2016

2016-02-24 23 54 44

2016-02-24 23 58 22

LDFLAGS=-L/usr/local/opt/bison/lib ./configure --with-x --enable-ui=x11 --enable-cpu=generic

Only GENERIC, Only X11 @ MacOSX 10.11

@sebastianbiallas
Copy link
Owner

Sorry, on MacOSX you currently cannot use the cocoa interface (I wanted to implement this but did not had time). --enable-ui=x11 uses x11 and works.

Similarly, there are still issues with the JIT there.

@stuaxo
Copy link
Author

stuaxo commented Feb 26, 2016

I'm curious if the JIT works anywhere, and where ?

Maybe we can work out if it's a 32 vs 64 bit thing, or maybe it only works under MSVC, that sort of thing ?

@mominul
Copy link

mominul commented Feb 27, 2016

JIT works in Windows and Linux

@iDevPro
Copy link

iDevPro commented Feb 27, 2016

How build for jit on OS X ?)

@iDevPro
Copy link

iDevPro commented Feb 27, 2016

What is this ?)

void openDisplay()
{
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
    [NSApplication sharedApplication];


    NSRect frame = NSMakeRect(100, 100, 300, 500);
    NSWindow* window  = 
    [
        [
            [NSWindow alloc] initWithContentRect:frame
            styleMask:NSResizableWindowMask
            // NSBorderlessWindowMask
            backing:NSBackingStoreBuffered
            defer:NO
        ]
        autorelease
    ];
    [window setBackgroundColor:[NSColor blueColor]];
    [window makeKeyAndOrderFront:NSApp];

    NSAlert *alert = [[NSAlert alloc] init];

    [alert addButtonWithTitle:@"OK"];
    [alert addButtonWithTitle:@"Cancel"];
    [alert setMessageText:@"Delete the record?"];
    [alert setInformativeText:@"Deleted records cannot be restored."];
    [alert setAlertStyle:NSWarningAlertStyle];
    if ([alert runModal] == NSAlertFirstButtonReturn) {
    }
    [alert release];
    [pool release];
    //return 0;
}

@stuaxo
Copy link
Author

stuaxo commented Feb 29, 2016

I tried searching all the code in the masterbranch and can't find openDisplay() - or the rest of the code ?

Which file did you find that code inside ?

It looks like some of the example code from here:

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Sheets/Tasks/UsingAlertSheets.html

@iDevPro
Copy link

iDevPro commented Mar 2, 2016

look here ;)
/src/system/ui/cocoa/display.m

@stuaxo
Copy link
Author

stuaxo commented Mar 2, 2016

Ahhh - I get it now; this is on the cocoa branch, not master :)

My guess is that @sebastianbiallas left that dialog in as some debug code by accident. I'm not sure how far along the cocoa gui is, it might be worth running the X11 version instead ?

@jacobmischka
Copy link

JIT did not work for me on Linux, it failed in the same place as @stuaxo

@stuaxo
Copy link
Author

stuaxo commented Nov 9, 2016

I had another go today.

In wine it works if I'm in 32 bit, otherwise seems to get stuck on the boot screen.

I wasn't able to make a build with or without JIT that got past that screen.

Here is the output.

ppc ppc4.config 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA

[CPU/CPU] <Warning> You are using the generic CPU!
[CPU/CPU] <Warning> This is much slower than the just-in-time compiler and
[CPU/CPU] <Warning> should only be used for debugging purposes or if there's
[CPU/CPU] <Warning> no just-in-time compiler for your platform.
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 32768
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
start: 134250496
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
start: 2147450880
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
Loading XCOFF...
[CPU/CPU] execution started at 01c00cb0
[CPU/OPC] <Warning> read from spr 25:31 (L2CR) not supported! (from 00083290)
[CPU/MMU] new pagetable: sdr1 = 0x0080000fr: 00086ac4
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^17 pagetable_start: 0x00800000 size: 2^20
[CPU/OPC] <Warning> read from spr 25:31 (L2CR) not supported! (from 0ab0d4cc)
^C033ab84 (1914699776 ops) pdec: 0000d5d8 lr: 0033a710

@stuaxo
Copy link
Author

stuaxo commented Nov 9, 2016

Oops, obviously hadn't left it running long enough - generic seems fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants