NetBSD Problem Report #52237

From www@NetBSD.org  Wed May 17 03:06:43 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7FB507A219
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 17 May 2017 03:06:43 +0000 (UTC)
Message-Id: <20170517030642.606E37A26F@mollari.NetBSD.org>
Date: Wed, 17 May 2017 03:06:42 +0000 (UTC)
From: uanand009@gmail.com
Reply-To: uanand009@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Trying to install NetBSD/mac68k on Basilisk II crashes it.
X-Send-Pr-Version: www-1.0

>Number:         52237
>Category:       port-mac68k
>Synopsis:       Trying to install NetBSD/mac68k on Basilisk II crashes it.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-mac68k-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 17 03:10:00 +0000 2017
>Closed-Date:    Tue Oct 24 11:44:52 +0000 2017
>Last-Modified:  Tue Oct 24 11:44:52 +0000 2017
>Originator:     Utkarsh Anand
>Release:        7.99.71
>Organization:
>Environment:
>Description:
I built the mac68k NetBSD port from source (version 7.99.71) using the git repository: https://github.com/jsonn/src.git
When I tried to boot from the BSD/mac68k booter, it crashed. Here's a screenshot of the emulator, moments before it crashed: https://drive.google.com/open?id=0B1M0oDUwRDEidkZKVkRod2ZxUFE

Here's the terminal output (from which I launched Basilisk II):

Caught SIGSEGV at address 0x60f01c00 [IP=0x780921c4]
D0: 00000001 D1: 00000000 D2: 00000001 D3: 00007a50 
D4: 80040f19 D5: 0bf10000 D6: 00000000 D7: 00000000 
A0: 00000000 A1: 00233220 A2: 00000000 A3: 00000040 
A4: 01800200 A5: 0bd887e8 A6: 002322be A7: 002322ba 
USP=00000000 ISP=002322ba MSP=00000000 VBR=00000000
T=00 S=1 M=0 X=0 N=0 Z=0 V=0 C=0 IMASK=7
FP0: nan FP1: nan FP2: nan FP3: nan 
FP4: nan FP5: nan FP6: nan FP7: nan 
N=0 Z=0 I=0 NAN=0
0001d43c: 13fc 007f 50f0 1c00 13fc MOVE.B #$7f,$50f01c00
next PC: 0001d444
>How-To-Repeat:
To repeat it, please install Basillisk II. Here's a link to the official site: https://basilisk.cebix.net/
Here are the instructions:

$ git clone https://github.com/cebix/macemu.git
After downloading and setting up the repository you can, for example, try to compile the Unix version of Basilisk II:

$ cd macemu/BasiliskII/src/Unix
$ ./autogen.sh
$ make

After that, for emulating Mac II si, you can use the system 7.0 disk image from here: http://www.emaculation.com/System70_boot.zip
Or, You can use system 7.5.3, whichever you like. 
If, you're using Basilisk GUI on linux, Mac OS X or Windows (I use CLI), you can find the relevant instructions here: http://www.emaculation.com/doku.php/basiliskii_linux_setup
http://www.emaculation.com/doku.php/basiliskii_osx_setup
http://www.emaculation.com/doku.php/basilisk_ii_setup

I downloaded the ROMs from: https://ia802503.us.archive.org/14/items/mac_rom_archive_-_as_of_8-19-2011/mac_rom_archive_-_as_of_8-19-2011.zip

After you're done setting it up, you can launch it using CLI (replace the PATHs relative to your own system):

BasiliskII --disk /extra/System70_boot.dsk --rom /extra/macrom/36B7FB6C\ -\ Mac\ IIsi.ROM --ramsize 200000000 --disk /extra/mac68k.img --cdrom /extra/mac68k/releasedir/images/NetBSD-7.99.71-mac68k.iso --cpu 3

(Warning: using --modelid option for this particular model will result in a non bootable machine, you'll get stuck at the boot screen.)

After that, for installing NetBSD you can follow the instructions from:
http://ftp.netbsd.org/pub/NetBSD/NetBSD-7.1/mac68k/INSTALL.html#Installing the NetBSD System (Sysinst Method)

>Fix:

>Release-Note:

>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-mac68k/52237: Trying to install NetBSD/mac68k on Basilisk II crashes it.
Date: Wed, 17 May 2017 11:52:07 +0000 (UTC)

 uanand009@gmail.com writes:

 >When I tried to boot from the BSD/mac68k booter, it crashed. Here's a screenshot of the emulator, moments before it crashed: https://drive.google.com/open?id=0B1M0oDUwRDEidkZKVkRod2ZxUFE

 Basilisk II doesn't emulate an 68k MMU, so it cannot run NetBSD.

 -- 
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."

From: Utkarsh Anand <uanand009@gmail.com>
To: gnats-bugs@netbsd.org
Cc: port-mac68k-maintainer@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org
Subject: Re: port-mac68k/52237: Trying to install NetBSD/mac68k on Basilisk II
 crashes it.
Date: Wed, 17 May 2017 18:09:48 +0530

 --94eb2c1aedd67c8b9b054fb79563
 Content-Type: text/plain; charset="UTF-8"

 >
 > Basilisk II doesn't emulate an 68k MMU, so it cannot run NetBSD.


 Here's an excerpt from the output of BasiliskII --help:

  --cpu NUMBER
     CPU type (0 = 68000, 1 = 68010 etc.) [default=0]

 Isn't that the 68k MMU?
 Also, you can see the specs for Mac II si right here:
 http://www.everymac.com/systems/apple/mac_ii/specs/mac_iisi.html
 It has the 68030 processor.

 Thanking you,
 Utkarsh Anand

 --94eb2c1aedd67c8b9b054fb79563
 Content-Type: text/html; charset="UTF-8"
 Content-Transfer-Encoding: quoted-printable

 <div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span st=
 yle=3D"font-size:16px">Basilisk II doesn&#39;t emulate an 68k MMU, so it ca=
 nnot run NetBSD.</span></blockquote><div><br></div><div>Here&#39;s an excer=
 pt from the output of BasiliskII --help:</div><div><br></div><blockquote st=
 yle=3D"margin:0px 0px 0px 40px;border:none;padding:0px"><div><font color=3D=
 "#9900ff">=C2=A0--cpu NUMBER</font></div><div><font color=3D"#9900ff">=C2=
 =A0 =C2=A0 CPU type (0 =3D 68000, 1 =3D 68010 etc.) [default=3D0]</font></d=
 iv></blockquote><font color=3D"#000000">Isn&#39;t that the 68k MMU?</font><=
 div><font color=3D"#000000">Also, you can see the specs for Mac II si right=
  here:</font></div><div><font color=3D"#000000"><a href=3D"http://www.every=
 mac.com/systems/apple/mac_ii/specs/mac_iisi.html">http://www.everymac.com/s=
 ystems/apple/mac_ii/specs/mac_iisi.html</a><br></font></div><div><font colo=
 r=3D"#000000">It has the 68030 processor.</font></div><div><font color=3D"#=
 000000"><br></font></div><div><font color=3D"#000000">Thanking you,</font><=
 /div><div><font color=3D"#000000">Utkarsh Anand</font></div></div>

 --94eb2c1aedd67c8b9b054fb79563--

From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: Utkarsh Anand <uanand009@gmail.com>
Cc: gnats-bugs@NetBSD.org, port-mac68k-maintainer@NetBSD.org,
        gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: port-mac68k/52237: Trying to install NetBSD/mac68k on Basilisk
 II crashes it.
Date: Wed, 17 May 2017 21:51:47 +0200

 On Wed, 17 May 2017 18:09:48 +0530, Utkarsh Anand wrote:
 >> Basilisk II doesn't emulate an 68k MMU, so it cannot run NetBSD.
 >=20
 > Here's an excerpt from the output of BasiliskII --help:
 >=20
 >  --cpu NUMBER
 >     CPU type (0 =3D 68000, 1 =3D 68010 etc.) [default=3D0]
 >=20
 > Isn't that the 68k MMU?

 No. Basilisk II emulates the Macintosh 68k platform (some virtual=20
 hardware + ROM, as far as necessary for the Macintosh OS), and not the=20
 actual Macintosh hardware. See e.g.=20
 <https://sourceforge.net/p/basilisk/mailman/message/2164622/>.
 =20
 > Also, you can see the specs for Mac II si right here:
 > http://www.everymac.com/systems/apple/mac_ii/specs/mac_iisi.html
 > It has the 68030 processor.

 Supporting the cpu's command set does not (necessarily) mean mmu=20
 support.

 Again: Basilisk does not provide the raw hardware emulation necessary=20
 to run anything but the Macintosh System. Which is a restriction of=20
 Basilisk, not one (and much less a bug) of NetBSD.

 Cheerio,
 hauke

 --=20
 Hauke Fath                        <hauke@Espresso.Rhein-Neckar.DE>
 Ernst-Ludwig-Stra=DFe 15
 64625 Bensheim
 Germany

From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-mac68k/52237: Trying to install NetBSD/mac68k on Basilisk II crashes it.
Date: Wed, 17 May 2017 20:07:20 +0000 (UTC)

 uanand009@gmail.com (Utkarsh Anand) writes:

 >Here's an excerpt from the output of BasiliskII --help:

 > --cpu NUMBER
 >    CPU type (0 = 68000, 1 = 68010 etc.) [default=0]

 >Isn't that the 68k MMU?

 For the 68020 there is an external MMU chip, the 68030,040,060 have an
 MMU built in. But that's the real hardware.

 Basilisk II only emulates enough to run MacOS.

 On the other hand its CPU emulation is based on some revision of UAE
 and recent (Win)UAE emulates the MMU. With enough effort you could
 teach Basilisk the necessary changes and then run NetBSD/mac68k.

 -- 
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."

State-Changed-From-To: open->closed
State-Changed-By: hauke@NetBSD.org
State-Changed-When: Tue, 24 Oct 2017 11:44:52 +0000
State-Changed-Why:
Not a NetBSD bug.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.