All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
@ 2021-08-27 18:14 John Arbuckle
  2021-08-27 21:15 ` BALATON Zoltan
  2021-08-29 10:16 ` Mark Cave-Ayland
  0 siblings, 2 replies; 17+ messages in thread
From: John Arbuckle @ 2021-08-27 18:14 UTC (permalink / raw)
  To: groug, david, qemu-ppc, qemu-devel, hsp.cat7; +Cc: John Arbuckle

I was having a problem with missing video resolutions in my Mac OS 9 VM. When I
ran QEMU it gave no indication as to why these resolutions were missing. I found
out that the OpenFirmware VGA driver was not being loaded. To prevent anyone from
going thru the same trouble I went thru I added messages that the user can see
when a problem takes place with loading this driver in the future.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
---
 hw/ppc/mac_newworld.c | 6 ++++++
 hw/ppc/mac_oldworld.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 7bb7ac3997..c1960452b8 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -526,8 +526,14 @@ static void ppc_core99_init(MachineState *machine)
 
         if (g_file_get_contents(filename, &ndrv_file, &ndrv_size, NULL)) {
             fw_cfg_add_file(fw_cfg, "ndrv/qemu_vga.ndrv", ndrv_file, ndrv_size);
+        } else {
+            printf("Warning: failed to load driver %s. This may cause video"
+                   " problems.\n");
         }
         g_free(filename);
+    } else {
+        printf("Warning: driver %s not found. This may cause video problems.\n",
+               NDRV_VGA_FILENAME);
     }
 
     qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index de2be960e6..96603fe9cf 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -367,8 +367,14 @@ static void ppc_heathrow_init(MachineState *machine)
 
         if (g_file_get_contents(filename, &ndrv_file, &ndrv_size, NULL)) {
             fw_cfg_add_file(fw_cfg, "ndrv/qemu_vga.ndrv", ndrv_file, ndrv_size);
+        } else {
+            printf("Warning: failed to load driver %s. This may cause video"
+                   " problems.\n");
         }
         g_free(filename);
+    } else {
+        printf("Warning: driver %s not found. This may cause video problems.\n",
+               NDRV_VGA_FILENAME);
     }
 
     qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
-- 
2.24.3 (Apple Git-128)



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-27 18:14 [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets John Arbuckle
@ 2021-08-27 21:15 ` BALATON Zoltan
  2021-08-28  5:29   ` David Gibson
  2021-08-29 10:16 ` Mark Cave-Ayland
  1 sibling, 1 reply; 17+ messages in thread
From: BALATON Zoltan @ 2021-08-27 21:15 UTC (permalink / raw)
  To: John Arbuckle; +Cc: qemu-devel, hsp.cat7, qemu-ppc, groug, david

On Fri, 27 Aug 2021, John Arbuckle wrote:
> I was having a problem with missing video resolutions in my Mac OS 9 VM. When I
> ran QEMU it gave no indication as to why these resolutions were missing. I found
> out that the OpenFirmware VGA driver was not being loaded. To prevent anyone from
> going thru the same trouble I went thru I added messages that the user can see
> when a problem takes place with loading this driver in the future.
>
> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
> ---
> hw/ppc/mac_newworld.c | 6 ++++++
> hw/ppc/mac_oldworld.c | 6 ++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
> index 7bb7ac3997..c1960452b8 100644
> --- a/hw/ppc/mac_newworld.c
> +++ b/hw/ppc/mac_newworld.c
> @@ -526,8 +526,14 @@ static void ppc_core99_init(MachineState *machine)
>
>         if (g_file_get_contents(filename, &ndrv_file, &ndrv_size, NULL)) {
>             fw_cfg_add_file(fw_cfg, "ndrv/qemu_vga.ndrv", ndrv_file, ndrv_size);
> +        } else {
> +            printf("Warning: failed to load driver %s. This may cause video"
> +                   " problems.\n");

I think you should use warn_report for these instead of printf and watch 
out if that needs \n or not (some functions add \n while some others may 
not and I always forget which is which but checkpatch should warn for it 
so you should get nofified if you leave \n there but it's not needed).

Regards,
BALATON Zoltan

>         }
>         g_free(filename);
> +    } else {
> +        printf("Warning: driver %s not found. This may cause video problems.\n",
> +               NDRV_VGA_FILENAME);
>     }
>
>     qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
> diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
> index de2be960e6..96603fe9cf 100644
> --- a/hw/ppc/mac_oldworld.c
> +++ b/hw/ppc/mac_oldworld.c
> @@ -367,8 +367,14 @@ static void ppc_heathrow_init(MachineState *machine)
>
>         if (g_file_get_contents(filename, &ndrv_file, &ndrv_size, NULL)) {
>             fw_cfg_add_file(fw_cfg, "ndrv/qemu_vga.ndrv", ndrv_file, ndrv_size);
> +        } else {
> +            printf("Warning: failed to load driver %s. This may cause video"
> +                   " problems.\n");
>         }
>         g_free(filename);
> +    } else {
> +        printf("Warning: driver %s not found. This may cause video problems.\n",
> +               NDRV_VGA_FILENAME);
>     }
>
>     qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-27 21:15 ` BALATON Zoltan
@ 2021-08-28  5:29   ` David Gibson
  0 siblings, 0 replies; 17+ messages in thread
From: David Gibson @ 2021-08-28  5:29 UTC (permalink / raw)
  To: BALATON Zoltan; +Cc: John Arbuckle, hsp.cat7, qemu-ppc, groug, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1980 bytes --]

On Fri, Aug 27, 2021 at 11:15:26PM +0200, BALATON Zoltan wrote:
> On Fri, 27 Aug 2021, John Arbuckle wrote:
> > I was having a problem with missing video resolutions in my Mac OS 9 VM. When I
> > ran QEMU it gave no indication as to why these resolutions were missing. I found
> > out that the OpenFirmware VGA driver was not being loaded. To prevent anyone from
> > going thru the same trouble I went thru I added messages that the user can see
> > when a problem takes place with loading this driver in the future.
> > 
> > Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
> > ---
> > hw/ppc/mac_newworld.c | 6 ++++++
> > hw/ppc/mac_oldworld.c | 6 ++++++
> > 2 files changed, 12 insertions(+)
> > 
> > diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
> > index 7bb7ac3997..c1960452b8 100644
> > --- a/hw/ppc/mac_newworld.c
> > +++ b/hw/ppc/mac_newworld.c
> > @@ -526,8 +526,14 @@ static void ppc_core99_init(MachineState *machine)
> > 
> >         if (g_file_get_contents(filename, &ndrv_file, &ndrv_size, NULL)) {
> >             fw_cfg_add_file(fw_cfg, "ndrv/qemu_vga.ndrv", ndrv_file, ndrv_size);
> > +        } else {
> > +            printf("Warning: failed to load driver %s. This may cause video"
> > +                   " problems.\n");
> 
> I think you should use warn_report for these instead of printf and watch out
> if that needs \n or not (some functions add \n while some others may not and
> I always forget which is which but checkpatch should warn for it so you
> should get nofified if you leave \n there but it's not needed).

Yes, it definitely should be warn_report() rather than a raw printf.
Patches for Macintosh should also go to the relevant maintainer Mark
Cave-Ayland <mark.cave-ayland@ilande.co.uk>.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-27 18:14 [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets John Arbuckle
  2021-08-27 21:15 ` BALATON Zoltan
@ 2021-08-29 10:16 ` Mark Cave-Ayland
  2021-08-29 12:17   ` Peter Maydell
  1 sibling, 1 reply; 17+ messages in thread
From: Mark Cave-Ayland @ 2021-08-29 10:16 UTC (permalink / raw)
  To: John Arbuckle, groug, david, qemu-ppc, qemu-devel, hsp.cat7

On 27/08/2021 19:14, John Arbuckle wrote:

> I was having a problem with missing video resolutions in my Mac OS 9 VM. When I
> ran QEMU it gave no indication as to why these resolutions were missing. I found
> out that the OpenFirmware VGA driver was not being loaded. To prevent anyone from
> going thru the same trouble I went thru I added messages that the user can see
> when a problem takes place with loading this driver in the future.
> 
> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
> ---
>   hw/ppc/mac_newworld.c | 6 ++++++
>   hw/ppc/mac_oldworld.c | 6 ++++++
>   2 files changed, 12 insertions(+)
> 
> diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
> index 7bb7ac3997..c1960452b8 100644
> --- a/hw/ppc/mac_newworld.c
> +++ b/hw/ppc/mac_newworld.c
> @@ -526,8 +526,14 @@ static void ppc_core99_init(MachineState *machine)
>   
>           if (g_file_get_contents(filename, &ndrv_file, &ndrv_size, NULL)) {
>               fw_cfg_add_file(fw_cfg, "ndrv/qemu_vga.ndrv", ndrv_file, ndrv_size);
> +        } else {
> +            printf("Warning: failed to load driver %s. This may cause video"
> +                   " problems.\n");
>           }
>           g_free(filename);
> +    } else {
> +        printf("Warning: driver %s not found. This may cause video problems.\n",
> +               NDRV_VGA_FILENAME);
>       }
>   
>       qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);
> diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
> index de2be960e6..96603fe9cf 100644
> --- a/hw/ppc/mac_oldworld.c
> +++ b/hw/ppc/mac_oldworld.c
> @@ -367,8 +367,14 @@ static void ppc_heathrow_init(MachineState *machine)
>   
>           if (g_file_get_contents(filename, &ndrv_file, &ndrv_size, NULL)) {
>               fw_cfg_add_file(fw_cfg, "ndrv/qemu_vga.ndrv", ndrv_file, ndrv_size);
> +        } else {
> +            printf("Warning: failed to load driver %s. This may cause video"
> +                   " problems.\n");
>           }
>           g_free(filename);
> +    } else {
> +        printf("Warning: driver %s not found. This may cause video problems.\n",
> +               NDRV_VGA_FILENAME);
>       }
>   
>       qemu_register_boot_set(fw_cfg_boot_set, fw_cfg);

This is by design: it's not the OpenFirmware VGA driver that's not being loaded here 
(that is already embedded in OpenBIOS), it's a optional MacOS client driver which 
just so happens to read the EDID to generate its list of available resolutions.

What I don't understand is that the binary is installed by default in QEMU's sharedir 
so everything works out of the box with "make install". Do you have some kind of 
custom installer which is doing something different?


ATB,

Mark.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-29 10:16 ` Mark Cave-Ayland
@ 2021-08-29 12:17   ` Peter Maydell
  2021-08-29 13:51     ` Programmingkid
  2021-08-30 20:29     ` Programmingkid
  0 siblings, 2 replies; 17+ messages in thread
From: Peter Maydell @ 2021-08-29 12:17 UTC (permalink / raw)
  To: Mark Cave-Ayland
  Cc: QEMU Developers, Greg Kurz, John Arbuckle, qemu-ppc,
	Howard Spoelstra, David Gibson

On Sun, 29 Aug 2021 at 11:18, Mark Cave-Ayland
<mark.cave-ayland@ilande.co.uk> wrote:
> What I don't understand is that the binary is installed by default in QEMU's sharedir
> so everything works out of the box with "make install". Do you have some kind of
> custom installer which is doing something different?

John has had problems before with the QEMU binary not being able to find
files at runtime (the previous example was the QEMU logo file). I suspect
we have a common underlying bug there. John -- do you run QEMU from
the build directory, or by installing it first and running the installed
binary, or in some other way ?

thanks
-- PMM


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-29 12:17   ` Peter Maydell
@ 2021-08-29 13:51     ` Programmingkid
  2021-08-30 20:29     ` Programmingkid
  1 sibling, 0 replies; 17+ messages in thread
From: Programmingkid @ 2021-08-29 13:51 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Mark Cave-Ayland, QEMU Developers, Greg Kurz, qemu-ppc,
	Howard Spoelstra, David Gibson



> On Aug 29, 2021, at 8:17 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> On Sun, 29 Aug 2021 at 11:18, Mark Cave-Ayland
> <mark.cave-ayland@ilande.co.uk> wrote:
>> What I don't understand is that the binary is installed by default in QEMU's sharedir
>> so everything works out of the box with "make install". Do you have some kind of
>> custom installer which is doing something different?
> 
> John has had problems before with the QEMU binary not being able to find
> files at runtime (the previous example was the QEMU logo file). I suspect
> we have a common underlying bug there. John -- do you run QEMU from
> the build directory, or by installing it first and running the installed
> binary, or in some other way ?
> 
> thanks
> -- PMM

I run QEMU from the build directory.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-29 12:17   ` Peter Maydell
  2021-08-29 13:51     ` Programmingkid
@ 2021-08-30 20:29     ` Programmingkid
  2021-08-30 20:59       ` Peter Maydell
  1 sibling, 1 reply; 17+ messages in thread
From: Programmingkid @ 2021-08-30 20:29 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Mark Cave-Ayland, QEMU Developers, Greg Kurz, qemu-ppc,
	Howard Spoelstra, David Gibson



> On Aug 29, 2021, at 8:17 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> On Sun, 29 Aug 2021 at 11:18, Mark Cave-Ayland
> <mark.cave-ayland@ilande.co.uk> wrote:
>> What I don't understand is that the binary is installed by default in QEMU's sharedir
>> so everything works out of the box with "make install". Do you have some kind of
>> custom installer which is doing something different?
> 
> John has had problems before with the QEMU binary not being able to find
> files at runtime (the previous example was the QEMU logo file). I suspect
> we have a common underlying bug there. John -- do you run QEMU from
> the build directory, or by installing it first and running the installed
> binary, or in some other way ?
> 
> thanks
> -- PMM

I found out that there are two pc-bios folders. One in the root directory and one in the build directory. QEMU is looking in the pc-bios folder located inside the build folder. The qemu_vga.ndrv file is only located in the root directory pc-bios folder. I think a good solution to this issue is to first remove one of the pc-bios folders. I'm not sure if it is just me who has two pc-bios folders or if everyone does. Anyone else see this?

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-30 20:29     ` Programmingkid
@ 2021-08-30 20:59       ` Peter Maydell
  2021-08-30 21:47         ` BALATON Zoltan
  2021-08-31 15:50         ` Programmingkid
  0 siblings, 2 replies; 17+ messages in thread
From: Peter Maydell @ 2021-08-30 20:59 UTC (permalink / raw)
  To: Programmingkid
  Cc: Mark Cave-Ayland, QEMU Developers, Greg Kurz, qemu-ppc,
	Howard Spoelstra, David Gibson

On Mon, 30 Aug 2021 at 21:29, Programmingkid <programmingkidx@gmail.com> wrote:
> I found out that there are two pc-bios folders. One in the root directory
> and one in the build directory. QEMU is looking in the pc-bios folder
> located inside the build folder. The qemu_vga.ndrv file is only located
> in the root directory pc-bios folder. I think a good solution to this
> issue is to first remove one of the pc-bios folders. I'm not sure if it
> is just me who has two pc-bios folders or if everyone does.

Having two pc-bios folders is expected. The one in the source tree is
the one which has the files we actually carry around in git. The one
in the build tree is created by 'configure' and populated with symbolic
links back to the files in the source tree. We need this one because
the QEMU executable doesn't (and shouldn't) know where the source tree is:
when it is looking for files it will look in places relative to the
location of the executable itself (ie relative to the build tree)
as well as places set by configure (used when you install QEMU and
its various supporting files).

The reason qemu_vga.ndrv is not in the pc-bios folder in the build
tree is because when that file was added we forgot to add handling
for it in configure. I'm not sure why nobody else has fallen over
this in the intervening 3 years: running QEMU from the build tree
will never find the file, and it will not be installed via
'make install' either.

(The pc-bios symlink stuff is a bit of a mess, as the comment about
it in configure notes. Perhaps meson now offers a cleaner way to
handle this? In particular pc-bios/meson.build already has to carry
around a complete list of all the bios blobs, so it could probably
create the symlink farm itself.)

thanks
-- PMM


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-30 20:59       ` Peter Maydell
@ 2021-08-30 21:47         ` BALATON Zoltan
  2021-08-31 15:52           ` Programmingkid
  2021-08-31 15:50         ` Programmingkid
  1 sibling, 1 reply; 17+ messages in thread
From: BALATON Zoltan @ 2021-08-30 21:47 UTC (permalink / raw)
  To: Peter Maydell
  Cc: QEMU Developers, Greg Kurz, Programmingkid, qemu-ppc,
	Howard Spoelstra, David Gibson

On Mon, 30 Aug 2021, Peter Maydell wrote:
> On Mon, 30 Aug 2021 at 21:29, Programmingkid <programmingkidx@gmail.com> wrote:
>> I found out that there are two pc-bios folders. One in the root directory
>> and one in the build directory. QEMU is looking in the pc-bios folder
>> located inside the build folder. The qemu_vga.ndrv file is only located
>> in the root directory pc-bios folder. I think a good solution to this
>> issue is to first remove one of the pc-bios folders. I'm not sure if it
>> is just me who has two pc-bios folders or if everyone does.
>
> Having two pc-bios folders is expected. The one in the source tree is
> the one which has the files we actually carry around in git. The one
> in the build tree is created by 'configure' and populated with symbolic
> links back to the files in the source tree. We need this one because
> the QEMU executable doesn't (and shouldn't) know where the source tree is:
> when it is looking for files it will look in places relative to the
> location of the executable itself (ie relative to the build tree)
> as well as places set by configure (used when you install QEMU and
> its various supporting files).
>
> The reason qemu_vga.ndrv is not in the pc-bios folder in the build
> tree is because when that file was added we forgot to add handling
> for it in configure. I'm not sure why nobody else has fallen over
> this in the intervening 3 years: running QEMU from the build tree
> will never find the file, and it will not be installed via
> 'make install' either.

This file is a driver for MacOS and not many people run that old OS. Those 
who do probably use Howard's binaries and follow his guides that tell you 
to use -L pc-bios on command line. I always wondered why that's needed 
when it should find it by default but this explains it and probably also 
your question why nobody complained.

Regards,
BALATON Zoltan


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-30 20:59       ` Peter Maydell
  2021-08-30 21:47         ` BALATON Zoltan
@ 2021-08-31 15:50         ` Programmingkid
  2021-08-31 15:57           ` Peter Maydell
  1 sibling, 1 reply; 17+ messages in thread
From: Programmingkid @ 2021-08-31 15:50 UTC (permalink / raw)
  To: Peter Maydell, Mark Cave-Ayland, Greg Kurz, David Gibson,
	qemu-ppc, QEMU Developers, Howard Spoelstra



> On Aug 30, 2021, at 4:59 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> On Mon, 30 Aug 2021 at 21:29, Programmingkid <programmingkidx@gmail.com> wrote:
>> I found out that there are two pc-bios folders. One in the root directory
>> and one in the build directory. QEMU is looking in the pc-bios folder
>> located inside the build folder. The qemu_vga.ndrv file is only located
>> in the root directory pc-bios folder. I think a good solution to this
>> issue is to first remove one of the pc-bios folders. I'm not sure if it
>> is just me who has two pc-bios folders or if everyone does.
> 
> Having two pc-bios folders is expected. The one in the source tree is
> the one which has the files we actually carry around in git. The one
> in the build tree is created by 'configure' and populated with symbolic
> links back to the files in the source tree. We need this one because
> the QEMU executable doesn't (and shouldn't) know where the source tree is:
> when it is looking for files it will look in places relative to the
> location of the executable itself (ie relative to the build tree)
> as well as places set by configure (used when you install QEMU and
> its various supporting files).
> 
> The reason qemu_vga.ndrv is not in the pc-bios folder in the build
> tree is because when that file was added we forgot to add handling
> for it in configure. I'm not sure why nobody else has fallen over
> this in the intervening 3 years: running QEMU from the build tree
> will never find the file, and it will not be installed via
> 'make install' either.
> 
> (The pc-bios symlink stuff is a bit of a mess, as the comment about
> it in configure notes. Perhaps meson now offers a cleaner way to
> handle this? In particular pc-bios/meson.build already has to carry
> around a complete list of all the bios blobs, so it could probably
> create the symlink farm itself.)
> 
> thanks
> -- PMM

I did try working on the pc-bios/meson.build file. I deleted all the entries in the 'blobs' list. Then I ran './configure --target-list=ppc-softmmu && make -j 9'. The pc-bios folder in the build directory was still populated with all the files (except for qemu_vga.ndrv). Anyone knows what exactly populates the pc-bios folder in the build folder?

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-30 21:47         ` BALATON Zoltan
@ 2021-08-31 15:52           ` Programmingkid
  2021-08-31 21:08             ` BALATON Zoltan
  0 siblings, 1 reply; 17+ messages in thread
From: Programmingkid @ 2021-08-31 15:52 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: Peter Maydell, QEMU Developers, Greg Kurz, qemu-ppc,
	Howard Spoelstra, David Gibson



> On Aug 30, 2021, at 5:47 PM, BALATON Zoltan <balaton@eik.bme.hu> wrote:
> 
> On Mon, 30 Aug 2021, Peter Maydell wrote:
>> On Mon, 30 Aug 2021 at 21:29, Programmingkid <programmingkidx@gmail.com> wrote:
>>> I found out that there are two pc-bios folders. One in the root directory
>>> and one in the build directory. QEMU is looking in the pc-bios folder
>>> located inside the build folder. The qemu_vga.ndrv file is only located
>>> in the root directory pc-bios folder. I think a good solution to this
>>> issue is to first remove one of the pc-bios folders. I'm not sure if it
>>> is just me who has two pc-bios folders or if everyone does.
>> 
>> Having two pc-bios folders is expected. The one in the source tree is
>> the one which has the files we actually carry around in git. The one
>> in the build tree is created by 'configure' and populated with symbolic
>> links back to the files in the source tree. We need this one because
>> the QEMU executable doesn't (and shouldn't) know where the source tree is:
>> when it is looking for files it will look in places relative to the
>> location of the executable itself (ie relative to the build tree)
>> as well as places set by configure (used when you install QEMU and
>> its various supporting files).
>> 
>> The reason qemu_vga.ndrv is not in the pc-bios folder in the build
>> tree is because when that file was added we forgot to add handling
>> for it in configure. I'm not sure why nobody else has fallen over
>> this in the intervening 3 years: running QEMU from the build tree
>> will never find the file, and it will not be installed via
>> 'make install' either.
> 
> This file is a driver for MacOS and not many people run that old OS. Those who do probably use Howard's binaries and follow his guides that tell you to use -L pc-bios on command line. I always wondered why that's needed when it should find it by default but this explains it and probably also your question why nobody complained.
> 
> Regards,
> BALATON Zoltan

This does sound like a good explanation. I am pretty sure I was able to use my Mac OS 9 VM without the -L option in the past and still have many video resolutions available. 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-31 15:50         ` Programmingkid
@ 2021-08-31 15:57           ` Peter Maydell
  2021-08-31 16:51             ` Programmingkid
  0 siblings, 1 reply; 17+ messages in thread
From: Peter Maydell @ 2021-08-31 15:57 UTC (permalink / raw)
  To: Programmingkid
  Cc: Mark Cave-Ayland, QEMU Developers, Greg Kurz, qemu-ppc,
	Howard Spoelstra, David Gibson

On Tue, 31 Aug 2021 at 16:50, Programmingkid <programmingkidx@gmail.com> wrote:
> Then I ran './configure --target-list=ppc-softmmu && make -j 9'.
> The pc-bios folder in the build directory was still populated with
> all the files (except for qemu_vga.ndrv). Anyone knows what exactly
> populates the pc-bios folder in the build folder?

As I said above, it is the configure script, which needs a fix
to add qemu_vga.ndrv to the list of symlinks it creates.

-- PMM


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-31 15:57           ` Peter Maydell
@ 2021-08-31 16:51             ` Programmingkid
  0 siblings, 0 replies; 17+ messages in thread
From: Programmingkid @ 2021-08-31 16:51 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Mark Cave-Ayland, QEMU Developers, Greg Kurz, qemu-ppc,
	Howard Spoelstra, David Gibson



> On Aug 31, 2021, at 11:57 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> On Tue, 31 Aug 2021 at 16:50, Programmingkid <programmingkidx@gmail.com> wrote:
>> Then I ran './configure --target-list=ppc-softmmu && make -j 9'.
>> The pc-bios folder in the build directory was still populated with
>> all the files (except for qemu_vga.ndrv). Anyone knows what exactly
>> populates the pc-bios folder in the build folder?
> 
> As I said above, it is the configure script, which needs a fix
> to add qemu_vga.ndrv to the list of symlinks it creates.
> 
> -- PMM

Thank you for the information. I created a new patch that should solve this problem.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-31 15:52           ` Programmingkid
@ 2021-08-31 21:08             ` BALATON Zoltan
  2021-08-31 21:33               ` Programmingkid
  0 siblings, 1 reply; 17+ messages in thread
From: BALATON Zoltan @ 2021-08-31 21:08 UTC (permalink / raw)
  To: Programmingkid
  Cc: Peter Maydell, QEMU Developers, Greg Kurz, qemu-ppc,
	Howard Spoelstra, David Gibson

On Tue, 31 Aug 2021, Programmingkid wrote:
>> On Aug 30, 2021, at 5:47 PM, BALATON Zoltan <balaton@eik.bme.hu> wrote:

>> On Mon, 30 Aug 2021, Peter Maydell wrote:
>>> On Mon, 30 Aug 2021 at 21:29, Programmingkid <programmingkidx@gmail.com> wrote:
>>>> I found out that there are two pc-bios folders. One in the root directory
>>>> and one in the build directory. QEMU is looking in the pc-bios folder
>>>> located inside the build folder. The qemu_vga.ndrv file is only located
>>>> in the root directory pc-bios folder. I think a good solution to this
>>>> issue is to first remove one of the pc-bios folders. I'm not sure if it
>>>> is just me who has two pc-bios folders or if everyone does.
>>>
>>> Having two pc-bios folders is expected. The one in the source tree is
>>> the one which has the files we actually carry around in git. The one
>>> in the build tree is created by 'configure' and populated with symbolic
>>> links back to the files in the source tree. We need this one because
>>> the QEMU executable doesn't (and shouldn't) know where the source tree is:
>>> when it is looking for files it will look in places relative to the
>>> location of the executable itself (ie relative to the build tree)
>>> as well as places set by configure (used when you install QEMU and
>>> its various supporting files).
>>>
>>> The reason qemu_vga.ndrv is not in the pc-bios folder in the build
>>> tree is because when that file was added we forgot to add handling
>>> for it in configure. I'm not sure why nobody else has fallen over
>>> this in the intervening 3 years: running QEMU from the build tree
>>> will never find the file, and it will not be installed via
>>> 'make install' either.
>>
>> This file is a driver for MacOS and not many people run that old OS. Those who do probably use Howard's binaries and follow his guides that tell you to use -L pc-bios on command line. I always wondered why that's needed when it should find it by default but this explains it and probably also your question why nobody complained.
>>
>> Regards,
>> BALATON Zoltan
>
> This does sound like a good explanation. I am pretty sure I was able to 
> use my Mac OS 9 VM without the -L option in the past and still have many 
> video resolutions available.

Depends how far back in the past was that. If before the meson conversion 
that introduced the build dir maybe you run it from the source dir (if 
used in-tree build) and it found the file. I'm not sure if it still works 
if you run from source dir such as build/qemu-system-ppc that is without 
changing current dir to build dir. If it works that way then maybe you 
ran it like that before. (Or maybe had an installed version and it picked 
up the file from there.)

Regards,
BALATON Zoltan


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-31 21:08             ` BALATON Zoltan
@ 2021-08-31 21:33               ` Programmingkid
  2021-09-01  9:08                 ` BALATON Zoltan
  0 siblings, 1 reply; 17+ messages in thread
From: Programmingkid @ 2021-08-31 21:33 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: Peter Maydell, Mark Cave-Ayland, QEMU Developers, Greg Kurz,
	qemu-ppc, Howard Spoelstra, David Gibson



> On Aug 31, 2021, at 5:08 PM, BALATON Zoltan <balaton@eik.bme.hu> wrote:
> 
> On Tue, 31 Aug 2021, Programmingkid wrote:
>>> On Aug 30, 2021, at 5:47 PM, BALATON Zoltan <balaton@eik.bme.hu> wrote:
> 
>>> On Mon, 30 Aug 2021, Peter Maydell wrote:
>>>> On Mon, 30 Aug 2021 at 21:29, Programmingkid <programmingkidx@gmail.com> wrote:
>>>>> I found out that there are two pc-bios folders. One in the root directory
>>>>> and one in the build directory. QEMU is looking in the pc-bios folder
>>>>> located inside the build folder. The qemu_vga.ndrv file is only located
>>>>> in the root directory pc-bios folder. I think a good solution to this
>>>>> issue is to first remove one of the pc-bios folders. I'm not sure if it
>>>>> is just me who has two pc-bios folders or if everyone does.
>>>> 
>>>> Having two pc-bios folders is expected. The one in the source tree is
>>>> the one which has the files we actually carry around in git. The one
>>>> in the build tree is created by 'configure' and populated with symbolic
>>>> links back to the files in the source tree. We need this one because
>>>> the QEMU executable doesn't (and shouldn't) know where the source tree is:
>>>> when it is looking for files it will look in places relative to the
>>>> location of the executable itself (ie relative to the build tree)
>>>> as well as places set by configure (used when you install QEMU and
>>>> its various supporting files).
>>>> 
>>>> The reason qemu_vga.ndrv is not in the pc-bios folder in the build
>>>> tree is because when that file was added we forgot to add handling
>>>> for it in configure. I'm not sure why nobody else has fallen over
>>>> this in the intervening 3 years: running QEMU from the build tree
>>>> will never find the file, and it will not be installed via
>>>> 'make install' either.
>>> 
>>> This file is a driver for MacOS and not many people run that old OS. Those who do probably use Howard's binaries and follow his guides that tell you to use -L pc-bios on command line. I always wondered why that's needed when it should find it by default but this explains it and probably also your question why nobody complained.
>>> 
>>> Regards,
>>> BALATON Zoltan
>> 
>> This does sound like a good explanation. I am pretty sure I was able to use my Mac OS 9 VM without the -L option in the past and still have many video resolutions available.
> 
> Depends how far back in the past was that. If before the meson conversion that introduced the build dir maybe you run it from the source dir (if used in-tree build) and it found the file. I'm not sure if it still works if you run from source dir such as build/qemu-system-ppc that is without changing current dir to build dir. If it works that way then maybe you ran it like that before. (Or maybe had an installed version and it picked up the file from there.)
> 
> Regards,
> BALATON Zoltan

That was around version 2.10 so a while back.

I just realized, I sent a patch to the developer list that fixes the missing qemu_vga.ndrv problem, but I do not know which maintainer to send it to. Who maintains the configure script? A search of the maintainers page was not clear as to who this is.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-08-31 21:33               ` Programmingkid
@ 2021-09-01  9:08                 ` BALATON Zoltan
  2021-09-01 12:23                   ` Programmingkid
  0 siblings, 1 reply; 17+ messages in thread
From: BALATON Zoltan @ 2021-09-01  9:08 UTC (permalink / raw)
  To: Programmingkid
  Cc: Peter Maydell, Mark Cave-Ayland, QEMU Developers, Greg Kurz,
	qemu-ppc, Howard Spoelstra, David Gibson

On Tue, 31 Aug 2021, Programmingkid wrote:
> I just realized, I sent a patch to the developer list that fixes the 
> missing qemu_vga.ndrv problem, but I do not know which maintainer to 
> send it to. Who maintains the configure script? A search of the 
> maintainers page was not clear as to who this is.

That's what the get_maintainer script is for, try
scripts/get_maintainer.pl -f configure
Interestingly there's no maintainer listed for configure, in that case 
probably pick the contributor with highest percentage and since it's a 
very simple patch you can also cc qemu-trivial list. See:
https://wiki.qemu.org/Contribute/SubmitAPatch
where all this should be explained.

Regards,
BALATON Zoltan


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets
  2021-09-01  9:08                 ` BALATON Zoltan
@ 2021-09-01 12:23                   ` Programmingkid
  0 siblings, 0 replies; 17+ messages in thread
From: Programmingkid @ 2021-09-01 12:23 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: Peter Maydell, Mark Cave-Ayland, QEMU Developers, Greg Kurz,
	qemu-ppc, Howard Spoelstra, David Gibson



> On Sep 1, 2021, at 5:08 AM, BALATON Zoltan <balaton@eik.bme.hu> wrote:
> 
> On Tue, 31 Aug 2021, Programmingkid wrote:
>> I just realized, I sent a patch to the developer list that fixes the missing qemu_vga.ndrv problem, but I do not know which maintainer to send it to. Who maintains the configure script? A search of the maintainers page was not clear as to who this is.
> 
> That's what the get_maintainer script is for, try
> scripts/get_maintainer.pl -f configure
> Interestingly there's no maintainer listed for configure, in that case probably pick the contributor with highest percentage and since it's a very simple patch you can also cc qemu-trivial list. See:
> https://wiki.qemu.org/Contribute/SubmitAPatch
> where all this should be explained.
> 
> Regards,
> BALATON Zoltan

Thank you for the advice. I have sent the patch to the trivial list and its maintainers.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-09-01 12:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 18:14 [PATCH] Report any problems with loading the VGA driver for PPC Macintosh targets John Arbuckle
2021-08-27 21:15 ` BALATON Zoltan
2021-08-28  5:29   ` David Gibson
2021-08-29 10:16 ` Mark Cave-Ayland
2021-08-29 12:17   ` Peter Maydell
2021-08-29 13:51     ` Programmingkid
2021-08-30 20:29     ` Programmingkid
2021-08-30 20:59       ` Peter Maydell
2021-08-30 21:47         ` BALATON Zoltan
2021-08-31 15:52           ` Programmingkid
2021-08-31 21:08             ` BALATON Zoltan
2021-08-31 21:33               ` Programmingkid
2021-09-01  9:08                 ` BALATON Zoltan
2021-09-01 12:23                   ` Programmingkid
2021-08-31 15:50         ` Programmingkid
2021-08-31 15:57           ` Peter Maydell
2021-08-31 16:51             ` Programmingkid

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.