diff mbox series

Report any problems with loading the VGA driver for PPC Macintosh targets

Message ID 20210827181429.23609-1-programmingkidx@gmail.com
State New
Headers show
Series Report any problems with loading the VGA driver for PPC Macintosh targets | expand

Commit Message

Programmingkid Aug. 27, 2021, 6:14 p.m. UTC
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(+)

Comments

BALATON Zoltan Aug. 27, 2021, 9:15 p.m. UTC | #1
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);
>
David Gibson Aug. 28, 2021, 5:29 a.m. UTC | #2
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>.
Mark Cave-Ayland Aug. 29, 2021, 10:16 a.m. UTC | #3
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.
Peter Maydell Aug. 29, 2021, 12:17 p.m. UTC | #4
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
Programmingkid Aug. 29, 2021, 1:51 p.m. UTC | #5
> 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.
Programmingkid Aug. 30, 2021, 8:29 p.m. UTC | #6
> 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?
Peter Maydell Aug. 30, 2021, 8:59 p.m. UTC | #7
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
BALATON Zoltan Aug. 30, 2021, 9:47 p.m. UTC | #8
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
Programmingkid Aug. 31, 2021, 3:50 p.m. UTC | #9
> 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?
Programmingkid Aug. 31, 2021, 3:52 p.m. UTC | #10
> 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.
Peter Maydell Aug. 31, 2021, 3:57 p.m. UTC | #11
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
Programmingkid Aug. 31, 2021, 4:51 p.m. UTC | #12
> 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.
BALATON Zoltan Aug. 31, 2021, 9:08 p.m. UTC | #13
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
Programmingkid Aug. 31, 2021, 9:33 p.m. UTC | #14
> 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.
BALATON Zoltan Sept. 1, 2021, 9:08 a.m. UTC | #15
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
Programmingkid Sept. 1, 2021, 12:23 p.m. UTC | #16
> 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.
diff mbox series

Patch

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);