Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Tue, 2016-08-02 at 12:53 +0200, Gerd Hoffmann wrote: > > I did notice that having Makefiles in the roms directory make > > git submodule barf ... I had to remove them for it to be able > > to clone the submodules. > > I mean roms/Makefile, not roms/$submodule/Makefile I see, ok well, we'll see when I get a chance to look at doing Makefiles for OS X... right now I build this using an IDE so it won't do that much good. Anyway, not terribly urgent. I'm reworking a whole pile of the Mac emulation, trying to bring it to a more decent state, so that's only part of the picture. Cheers, Ben.
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Di, 2016-08-02 at 19:17 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-08-02 at 10:55 +0200, Gerd Hoffmann wrote: > > > CodeWarrior for MacOS X does come with command line versions of the > > > tools, I plan to look into doing a Makefile once I've sorted out the > > > various arguments for these things at least. > > > > Yes, you do that once, put it into roms/Makefile, and the next time you > > just do "make -C roms macosdrivers" instead of sorting out the various > > arguments *again*. > > > > Bonus: Any possible contributers will have an easier start too. > > I did notice that having Makefiles in the roms directory make > git submodule barf ... I had to remove them for it to be able > to clone the submodules. I mean roms/Makefile, not roms/$submodule/Makefile cheers, Gerd
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Tue, 2016-08-02 at 10:55 +0200, Gerd Hoffmann wrote: > > CodeWarrior for MacOS X does come with command line versions of the > > tools, I plan to look into doing a Makefile once I've sorted out the > > various arguments for these things at least. > > Yes, you do that once, put it into roms/Makefile, and the next time you > just do "make -C roms macosdrivers" instead of sorting out the various > arguments *again*. > > Bonus: Any possible contributers will have an easier start too. I did notice that having Makefiles in the roms directory make git submodule barf ... I had to remove them for it to be able to clone the submodules. Cheers, Ben.
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Di, 2016-08-02 at 15:35 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-08-02 at 07:25 +0200, Gerd Hoffmann wrote: > > > That's the part we cannot provide unfortunately. There is sadly no > > > toolchain that can produce a MacOS PEF binary other than hosted in > > > MacOS itself. In fact I don't think Apple XCode can either, which > > > leaves us with CodeWarrior (commercial) or MPW (which I think at some > > > point became free but I didn't find it and it doesn't work on OS X > > > afaik). > > > > Firmware builds often have specific requirements, such as only working > > on $arch due to firmware not being cross-buildable (thats why there are > > the prebuilt binaries in the first place). So if those makefile rules > > work only on macos with CodeWarrior installed that is perfectly fine. > > Right though in that case it's not a Makefile, it's a CodeWarrior > project in .xml form ;-) It is included in the git repo. Good, that simplifies the makesfile rules to something like: macosdrivers: (cd $submodule: cw-build-tool $args $project.xml) cp -v $submodule/$binary ../pc-bios > CodeWarrior for MacOS X does come with command line versions of the > tools, I plan to look into doing a Makefile once I've sorted out the > various arguments for these things at least. Yes, you do that once, put it into roms/Makefile, and the next time you just do "make -C roms macosdrivers" instead of sorting out the various arguments *again*. Bonus: Any possible contributers will have an easier start too. cheers, Gerd
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Tue, 2016-08-02 at 07:25 +0200, Gerd Hoffmann wrote: > > That's the part we cannot provide unfortunately. There is sadly no > > toolchain that can produce a MacOS PEF binary other than hosted in > > MacOS itself. In fact I don't think Apple XCode can either, which > > leaves us with CodeWarrior (commercial) or MPW (which I think at some > > point became free but I didn't find it and it doesn't work on OS X > > afaik). > > Firmware builds often have specific requirements, such as only working > on $arch due to firmware not being cross-buildable (thats why there are > the prebuilt binaries in the first place). So if those makefile rules > work only on macos with CodeWarrior installed that is perfectly fine. Right though in that case it's not a Makefile, it's a CodeWarrior project in .xml form ;-) It is included in the git repo. CodeWarrior for MacOS X does come with command line versions of the tools, I plan to look into doing a Makefile once I've sorted out the various arguments for these things at least. Cheers, Ben.
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Di, 2016-08-02 at 07:24 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2016-08-01 at 21:38 +0200, Gerd Hoffmann wrote: > > Hi, > > > > > So, I believe qemu convention is to include the ROM source via a > > > submodule - even though it won't typically be built from there and > > the > > > prebuilt blob will be used instead. > > > > Correct. Also rules in roms/Makefile to build the thing, to document > > the build process and to simplify the maintainer's job on updates. > > That's the part we cannot provide unfortunately. There is sadly no > toolchain that can produce a MacOS PEF binary other than hosted in > MacOS itself. In fact I don't think Apple XCode can either, which > leaves us with CodeWarrior (commercial) or MPW (which I think at some > point became free but I didn't find it and it doesn't work on OS X > afaik). Firmware builds often have specific requirements, such as only working on $arch due to firmware not being cross-buildable (thats why there are the prebuilt binaries in the first place). So if those makefile rules work only on macos with CodeWarrior installed that is perfectly fine. cheers, Gerd
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Mon, 2016-08-01 at 21:38 +0200, Gerd Hoffmann wrote: > Hi, > > > So, I believe qemu convention is to include the ROM source via a > > submodule - even though it won't typically be built from there and > the > > prebuilt blob will be used instead. > > Correct. Also rules in roms/Makefile to build the thing, to document > the build process and to simplify the maintainer's job on updates. That's the part we cannot provide unfortunately. There is sadly no toolchain that can produce a MacOS PEF binary other than hosted in MacOS itself. In fact I don't think Apple XCode can either, which leaves us with CodeWarrior (commercial) or MPW (which I think at some point became free but I didn't find it and it doesn't work on OS X afaik). So we'll have to stick to the images I build for now at least though the git repo does have the .xml CW project fie. Cheers, Ben.
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
Hi, > So, I believe qemu convention is to include the ROM source via a > submodule - even though it won't typically be built from there and the > prebuilt blob will be used instead. Correct. Also rules in roms/Makefile to build the thing, to document the build process and to simplify the maintainer's job on updates. cheers, Gerd
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Mon, 2016-08-01 at 00:49 -0400, Jeff Cody wrote: > For whenever you are ready: > > The mirror is in place at git://git.qemu- > project.org/QemuMacDrivers.git, and > it should be updating nightly/daily. Thanks Jeff ! Cheers, Ben.
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Thu, Jul 28, 2016 at 10:44:31PM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2016-07-28 at 09:28 +0100, Stefan Hajnoczi wrote: > > > > Jeff, please create a mirror git repo for > > https://github.com/ozbenh/QemuMacDrivers at > > git://git.qemu-project.org/QemuMacDrivers.git with nightly mirroring. > > > > Once Jeff has set up the mirror repo, please send a new revision of > > this > > patch that makes roms/QemuMacDrivers a git-submodule(1) pointing to > > git://git.qemu-project.org/QemuMacDrivers.git. > > > > Please double-check that the binary ROM included in the patch > > corresponds to the QemuMacDrivers commit referenced by the > > git-submodule(1) before sending the patch. > > Ok, we don't yet need to do all of this though as there are still > some open questions about how we expose the ROM to MacOS via > OpenBIOS as a consequence the format of the ROM file. > > You can still mirror the git repo, any change will be done there, > but let's not include the submodule and/or apply the patch before > Mark and I have sorted the OpenBIOS side. > For whenever you are ready: The mirror is in place at git://git.qemu-project.org/QemuMacDrivers.git, and it should be updating nightly/daily. Thanks, Jeff
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Thu, 2016-07-28 at 09:28 +0100, Stefan Hajnoczi wrote: > > Jeff, please create a mirror git repo for > https://github.com/ozbenh/QemuMacDrivers at > git://git.qemu-project.org/QemuMacDrivers.git with nightly mirroring. > > Once Jeff has set up the mirror repo, please send a new revision of > this > patch that makes roms/QemuMacDrivers a git-submodule(1) pointing to > git://git.qemu-project.org/QemuMacDrivers.git. > > Please double-check that the binary ROM included in the patch > corresponds to the QemuMacDrivers commit referenced by the > git-submodule(1) before sending the patch. Ok, we don't yet need to do all of this though as there are still some open questions about how we expose the ROM to MacOS via OpenBIOS as a consequence the format of the ROM file. You can still mirror the git repo, any change will be done there, but let's not include the submodule and/or apply the patch before Mark and I have sorted the OpenBIOS side. Cheers, Ben. signature.asc Description: This is a digitally signed message part
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Thu, 2016-07-28 at 15:51 +1000, David Gibson wrote: > So, I believe qemu convention is to include the ROM source via a > submodule - even though it won't typically be built from there and the > prebuilt blob will be used instead. > > Not sure who the right person to talk to about that would be. Probably Peter, and that git repo will eventually grow more ROMs as I add virtio drivers for MacOS :-) But for now, let's first agree (or not) with Mark how we deal with this on the openbios side. My preference is to rework the PCI stack there and add proper f-code support, so I can package the drivers using f-code. But that will probably take a while, in the meantime, the raw PEF which is what I added here is I think a reasonable compromise. In fact I wouldn't be completely against doing the virtio driers in forth ;-) But he might have other ideas. Cheers ,Ben. signature.asc Description: This is a digitally signed message part
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Thu, Jul 28, 2016 at 09:04:25AM +0200, Alexander Graf wrote: > On 07/28/2016 07:51 AM, David Gibson wrote: > > On Wed, Jul 27, 2016 at 06:27:33PM +1000, Benjamin Herrenschmidt wrote: > > > The project is at https://github.com/ozbenh/QemuMacDrivers > > > > > > This adds a native MacOS driver in ROM (which can be picked up > > > by MacOS once OpenBIOS has been updated if Mark accepts > > > the patches I sent him) which allows MacOS classic > > > (tested 9.2.1) and MacOS X (tested 10.1.4 and 10.4) > > > to properly use QEMU std VGA (10.1.x doesn't work at all > > > without it, the others get the ability to change resolution > > > and color depth). > > > > > > Building the ROM is tricky and requires CodeWarrior for MacOS > > > so I include a pre-built binary. > > So, I believe qemu convention is to include the ROM source via a > > submodule - even though it won't typically be built from there and the > > prebuilt blob will be used instead. > > > > Not sure who the right person to talk to about that would be. > > I think Stefan handles the logistics there now. CC'ed him. > > > The reason for the submodule is so that on tar releases, the source gets > included automatically. That way we can ensure that we always include all > GPL sources that we deliver binaries for. Jeff Cody now admins the qemu-project.org server, including the git repos. Jeff, please create a mirror git repo for https://github.com/ozbenh/QemuMacDrivers at git://git.qemu-project.org/QemuMacDrivers.git with nightly mirroring. Once Jeff has set up the mirror repo, please send a new revision of this patch that makes roms/QemuMacDrivers a git-submodule(1) pointing to git://git.qemu-project.org/QemuMacDrivers.git. Please double-check that the binary ROM included in the patch corresponds to the QemuMacDrivers commit referenced by the git-submodule(1) before sending the patch. Thanks, Stefan signature.asc Description: PGP signature
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On 07/28/2016 07:51 AM, David Gibson wrote: On Wed, Jul 27, 2016 at 06:27:33PM +1000, Benjamin Herrenschmidt wrote: The project is at https://github.com/ozbenh/QemuMacDrivers This adds a native MacOS driver in ROM (which can be picked up by MacOS once OpenBIOS has been updated if Mark accepts the patches I sent him) which allows MacOS classic (tested 9.2.1) and MacOS X (tested 10.1.4 and 10.4) to properly use QEMU std VGA (10.1.x doesn't work at all without it, the others get the ability to change resolution and color depth). Building the ROM is tricky and requires CodeWarrior for MacOS so I include a pre-built binary. So, I believe qemu convention is to include the ROM source via a submodule - even though it won't typically be built from there and the prebuilt blob will be used instead. Not sure who the right person to talk to about that would be. I think Stefan handles the logistics there now. CC'ed him. The reason for the submodule is so that on tar releases, the source gets included automatically. That way we can ensure that we always include all GPL sources that we deliver binaries for. Alex
Re: [Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
On Wed, Jul 27, 2016 at 06:27:33PM +1000, Benjamin Herrenschmidt wrote: > The project is at https://github.com/ozbenh/QemuMacDrivers > > This adds a native MacOS driver in ROM (which can be picked up > by MacOS once OpenBIOS has been updated if Mark accepts > the patches I sent him) which allows MacOS classic > (tested 9.2.1) and MacOS X (tested 10.1.4 and 10.4) > to properly use QEMU std VGA (10.1.x doesn't work at all > without it, the others get the ability to change resolution > and color depth). > > Building the ROM is tricky and requires CodeWarrior for MacOS > so I include a pre-built binary. So, I believe qemu convention is to include the ROM source via a submodule - even though it won't typically be built from there and the prebuilt blob will be used instead. Not sure who the right person to talk to about that would be. > > Signed-off-by: Benjamin Herrenschmidt> --- > hw/ppc/mac_newworld.c | 8 > pc-bios/qemu_vga.ndrv | Bin 0 -> 12808 bytes > 2 files changed, 8 insertions(+) > create mode 100644 pc-bios/qemu_vga.ndrv > > diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c > index 7d25106..5029345 100644 > --- a/hw/ppc/mac_newworld.c > +++ b/hw/ppc/mac_newworld.c > @@ -511,6 +511,13 @@ static int core99_kvm_type(const char *arg) > return 2; > } > > +#define MAC_CORE99_COMPAT \ > +{ \ > +.driver = "pci-vga", \ > +.property = "romfile", \ > +.value= "qemu_vga.ndrv",\ > +}, > + > static void core99_machine_class_init(ObjectClass *oc, void *data) > { > MachineClass *mc = MACHINE_CLASS(oc); > @@ -520,6 +527,7 @@ static void core99_machine_class_init(ObjectClass *oc, > void *data) > mc->max_cpus = MAX_CPUS; > mc->default_boot_order = "cd"; > mc->kvm_type = core99_kvm_type; > +SET_MACHINE_COMPAT(mc, MAC_CORE99_COMPAT); > } > > static const TypeInfo core99_machine_info = { > diff --git a/pc-bios/qemu_vga.ndrv b/pc-bios/qemu_vga.ndrv > new file mode 100644 > index > ..0b1549d1c5978f87aed2b6e496a23fbaf18dbea4 > GIT binary patch > literal 12808 > zcmcIq4RBl4mA;amWZ5{0p=Q^?KY3{!Mof}_b>&0>89PD20;gS=wQRj4+L0xV >
[Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM
The project is at https://github.com/ozbenh/QemuMacDrivers This adds a native MacOS driver in ROM (which can be picked up by MacOS once OpenBIOS has been updated if Mark accepts the patches I sent him) which allows MacOS classic (tested 9.2.1) and MacOS X (tested 10.1.4 and 10.4) to properly use QEMU std VGA (10.1.x doesn't work at all without it, the others get the ability to change resolution and color depth). Building the ROM is tricky and requires CodeWarrior for MacOS so I include a pre-built binary. Signed-off-by: Benjamin Herrenschmidt--- hw/ppc/mac_newworld.c | 8 pc-bios/qemu_vga.ndrv | Bin 0 -> 12808 bytes 2 files changed, 8 insertions(+) create mode 100644 pc-bios/qemu_vga.ndrv diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 7d25106..5029345 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -511,6 +511,13 @@ static int core99_kvm_type(const char *arg) return 2; } +#define MAC_CORE99_COMPAT \ +{ \ +.driver = "pci-vga", \ +.property = "romfile", \ +.value= "qemu_vga.ndrv",\ +}, + static void core99_machine_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); @@ -520,6 +527,7 @@ static void core99_machine_class_init(ObjectClass *oc, void *data) mc->max_cpus = MAX_CPUS; mc->default_boot_order = "cd"; mc->kvm_type = core99_kvm_type; +SET_MACHINE_COMPAT(mc, MAC_CORE99_COMPAT); } static const TypeInfo core99_machine_info = { diff --git a/pc-bios/qemu_vga.ndrv b/pc-bios/qemu_vga.ndrv new file mode 100644 index ..0b1549d1c5978f87aed2b6e496a23fbaf18dbea4 GIT binary patch literal 12808 zcmcIq4RBl4mA;amWZ5{0p=Q^?KY3{!Mof}_b>&0>89PD20;gS=wQRj4+L0xV