* [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
@ 2019-07-24 1:51 rebecca
2019-07-24 1:51 ` [PATCH 2/2] OvmfPkg/build.sh: use $QEMU_FIRMWARE_DIR as QEMU fat root rebecca
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: rebecca @ 2019-07-24 1:51 UTC (permalink / raw)
To: devel, Jordan Justen, Laszlo Ersek, Ard Biesheuvel; +Cc: Rebecca Cran
Specify the firmware to use via the newer '-drive if=pflash' syntax
which allows specifying the raw format and readonly parameters. This
avoids warnings with newer version of QEMU.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
OvmfPkg/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index a2c4eff2a5..e2890ff762 100755
--- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh
@@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
fi
ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
if [[ "$ENABLE_FLASH" == "yes" ]]; then
- QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin"
+ QEMU_COMMAND="$QEMU_COMMAND -drive if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/bios.bin"
else
QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR"
fi
--
2.22.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/2] OvmfPkg/build.sh: use $QEMU_FIRMWARE_DIR as QEMU fat root
2019-07-24 1:51 [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu rebecca
@ 2019-07-24 1:51 ` rebecca
2019-07-24 3:09 ` Jordan Justen
2019-07-24 2:54 ` [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu Jordan Justen
` (2 subsequent siblings)
3 siblings, 1 reply; 15+ messages in thread
From: rebecca @ 2019-07-24 1:51 UTC (permalink / raw)
To: devel, Jordan Justen, Laszlo Ersek, Ard Biesheuvel; +Cc: Rebecca Cran
The $BUILD_ROOT_ARCH directory has too many files to
work as a fat filesystem. QEMU fails with the message:
Too many entries in root directory
Use the $QEMU_FIRMWARE_DIR as the root directory instead.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
OvmfPkg/build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index e2890ff762..b01de0fd55 100755
--- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh
@@ -273,7 +273,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR"
fi
if [[ "$ADD_QEMU_HDA" == "yes" ]]; then
- QEMU_COMMAND="$QEMU_COMMAND -hda fat:$BUILD_ROOT_ARCH"
+ QEMU_COMMAND="$QEMU_COMMAND -hda fat:$QEMU_FIRMWARE_DIR"
fi
echo Running: $QEMU_COMMAND "$@"
$QEMU_COMMAND "$@"
--
2.22.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 1:51 [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu rebecca
2019-07-24 1:51 ` [PATCH 2/2] OvmfPkg/build.sh: use $QEMU_FIRMWARE_DIR as QEMU fat root rebecca
@ 2019-07-24 2:54 ` Jordan Justen
2019-07-24 3:08 ` rebecca
2019-07-24 12:27 ` Philippe Mathieu-Daudé
2019-07-24 16:53 ` Michael D Kinney
2019-07-26 0:14 ` Laszlo Ersek
3 siblings, 2 replies; 15+ messages in thread
From: Jordan Justen @ 2019-07-24 2:54 UTC (permalink / raw)
To: Ard Biesheuvel, Laszlo Ersek, devel, rebecca; +Cc: Rebecca Cran
On 2019-07-23 18:51:00, wrote:
> Specify the firmware to use via the newer '-drive if=pflash' syntax
> which allows specifying the raw format and readonly parameters. This
> avoids warnings with newer version of QEMU.
>
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
> OvmfPkg/build.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index a2c4eff2a5..e2890ff762 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
> fi
> ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
> if [[ "$ENABLE_FLASH" == "yes" ]]; then
> - QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin"
> + QEMU_COMMAND="$QEMU_COMMAND -drive if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/bios.bin"
It looks like we set ENABLE_FLASH for qemu 1.6 and newer. Does this
work on 1.6?
Also, I don't think we want readonly. Read-write should allow
non-volatile variables to persist across multiple boot.
-Jordan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 2:54 ` [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu Jordan Justen
@ 2019-07-24 3:08 ` rebecca
2019-07-24 12:27 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 15+ messages in thread
From: rebecca @ 2019-07-24 3:08 UTC (permalink / raw)
To: devel, jordan.l.justen; +Cc: Ard Biesheuvel, Laszlo Ersek, rebecca
I tested with QEMU 1.6.2 and it works.
I’ll update the patch to make it read-write.
—
Rebecca Cran
> On Jul 23, 2019, at 8:54 PM, Jordan Justen <jordan.l.justen@intel.com> wrote:
>
>> On 2019-07-23 18:51:00, wrote:
>> Specify the firmware to use via the newer '-drive if=pflash' syntax
>> which allows specifying the raw format and readonly parameters. This
>> avoids warnings with newer version of QEMU.
>>
>> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
>> ---
>> OvmfPkg/build.sh | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
>> index a2c4eff2a5..e2890ff762 100755
>> --- a/OvmfPkg/build.sh
>> +++ b/OvmfPkg/build.sh
>> @@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
>> fi
>> ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
>> if [[ "$ENABLE_FLASH" == "yes" ]]; then
>> - QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin"
>> + QEMU_COMMAND="$QEMU_COMMAND -drive if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/bios.bin"
>
> It looks like we set ENABLE_FLASH for qemu 1.6 and newer. Does this
> work on 1.6?
>
> Also, I don't think we want readonly. Read-write should allow
> non-volatile variables to persist across multiple boot.
>
> -Jordan
>
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] OvmfPkg/build.sh: use $QEMU_FIRMWARE_DIR as QEMU fat root
2019-07-24 1:51 ` [PATCH 2/2] OvmfPkg/build.sh: use $QEMU_FIRMWARE_DIR as QEMU fat root rebecca
@ 2019-07-24 3:09 ` Jordan Justen
2019-07-24 21:31 ` rebecca
0 siblings, 1 reply; 15+ messages in thread
From: Jordan Justen @ 2019-07-24 3:09 UTC (permalink / raw)
To: Ard Biesheuvel, Laszlo Ersek, Rebecca Cran, devel; +Cc: Rebecca Cran
I'd kind of like to remove the ADD_QEMU_HDA support. I think, way, way
back qemu would not boot if no drives were added, so this kind of
helped. (OVMF can still load the shell with no drives.)
If qemu will still run the firmware without a drive, then maybe maybe
we can just dump ADD_QEMU_HDA.
-Jordan
On 2019-07-23 18:51:01, Rebecca Cran wrote:
> The $BUILD_ROOT_ARCH directory has too many files to
> work as a fat filesystem. QEMU fails with the message:
>
> Too many entries in root directory
>
> Use the $QEMU_FIRMWARE_DIR as the root directory instead.
>
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
> OvmfPkg/build.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index e2890ff762..b01de0fd55 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -273,7 +273,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
> QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR"
> fi
> if [[ "$ADD_QEMU_HDA" == "yes" ]]; then
> - QEMU_COMMAND="$QEMU_COMMAND -hda fat:$BUILD_ROOT_ARCH"
> + QEMU_COMMAND="$QEMU_COMMAND -hda fat:$QEMU_FIRMWARE_DIR"
> fi
> echo Running: $QEMU_COMMAND "$@"
> $QEMU_COMMAND "$@"
> --
> 2.22.0
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 2:54 ` [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu Jordan Justen
2019-07-24 3:08 ` rebecca
@ 2019-07-24 12:27 ` Philippe Mathieu-Daudé
2019-07-24 17:26 ` Jordan Justen
1 sibling, 1 reply; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-24 12:27 UTC (permalink / raw)
To: devel, jordan.l.justen, Ard Biesheuvel, Laszlo Ersek, rebecca
On 7/24/19 4:54 AM, Jordan Justen wrote:
> On 2019-07-23 18:51:00, wrote:
>> Specify the firmware to use via the newer '-drive if=pflash' syntax
>> which allows specifying the raw format and readonly parameters. This
>> avoids warnings with newer version of QEMU.
>>
>> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
>> ---
>> OvmfPkg/build.sh | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
>> index a2c4eff2a5..e2890ff762 100755
>> --- a/OvmfPkg/build.sh
>> +++ b/OvmfPkg/build.sh
>> @@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
>> fi
>> ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
>> if [[ "$ENABLE_FLASH" == "yes" ]]; then
>> - QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin"
>> + QEMU_COMMAND="$QEMU_COMMAND -drive if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/bios.bin"
>
> It looks like we set ENABLE_FLASH for qemu 1.6 and newer. Does this
> work on 1.6?
>
> Also, I don't think we want readonly. Read-write should allow
> non-volatile variables to persist across multiple boot.
This flash only contains the CODE, not the non-volatile VARS, using
readonly makes sense to me.
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 1:51 [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu rebecca
2019-07-24 1:51 ` [PATCH 2/2] OvmfPkg/build.sh: use $QEMU_FIRMWARE_DIR as QEMU fat root rebecca
2019-07-24 2:54 ` [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu Jordan Justen
@ 2019-07-24 16:53 ` Michael D Kinney
2019-07-25 15:46 ` rebecca
2019-07-26 0:14 ` Laszlo Ersek
3 siblings, 1 reply; 15+ messages in thread
From: Michael D Kinney @ 2019-07-24 16:53 UTC (permalink / raw)
To: devel@edk2.groups.io, rebecca@bsdio.com, Justen, Jordan L,
Laszlo Ersek, Ard Biesheuvel, Kinney, Michael D
Rebecca,
If you are interested, I prototyped using a python
script and POSTBUILD statement in the DSC file to
support 'run' targets for OVMF in the following
branch. This potentially allows the same code to
be used for all host OS environments to launch QEMU.
https://github.com/tianocore/edk2-staging/tree/Bug_1525_FmpDevicePkg_MultipleControllers_V2/OvmfPkg
https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers_V2/OvmfPkg/PostBuild.py
https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers_V2/OvmfPkg/Run.py
Could also be extended to support doing either QEMU or
KVM launch with a -D flag.
Mike
> -----Original Message-----
> From: devel@edk2.groups.io
> [mailto:devel@edk2.groups.io] On Behalf Of
> rebecca@bsdio.com
> Sent: Tuesday, July 23, 2019 6:51 PM
> To: devel@edk2.groups.io; Justen, Jordan L
> <jordan.l.justen@intel.com>; Laszlo Ersek
> <lersek@redhat.com>; Ard Biesheuvel
> <ard.biesheuvel@linaro.org>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Subject: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use
> newer '-drive if=pflash' syntax when running qemu
>
> Specify the firmware to use via the newer '-drive
> if=pflash' syntax which allows specifying the raw
> format and readonly parameters. This avoids warnings
> with newer version of QEMU.
>
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
> OvmfPkg/build.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh index
> a2c4eff2a5..e2890ff762 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
> fi
> ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
> if [[ "$ENABLE_FLASH" == "yes" ]]; then
> - QEMU_COMMAND="$QEMU_COMMAND -pflash
> $QEMU_FIRMWARE_DIR/bios.bin"
> + QEMU_COMMAND="$QEMU_COMMAND -drive
> if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/b
> ios.bin"
> else
> QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR"
> fi
> --
> 2.22.0
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this
> group.
>
> View/Reply Online (#44277):
> https://edk2.groups.io/g/devel/message/44277
> Mute This Topic: https://groups.io/mt/32580104/1643496
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [michael.d.kinney@intel.com]
> -=-=-=-=-=-=
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 12:27 ` Philippe Mathieu-Daudé
@ 2019-07-24 17:26 ` Jordan Justen
2019-07-24 17:39 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 15+ messages in thread
From: Jordan Justen @ 2019-07-24 17:26 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Ard Biesheuvel, Laszlo Ersek, devel,
rebecca
On 2019-07-24 05:27:28, Philippe Mathieu-Daudé wrote:
> On 7/24/19 4:54 AM, Jordan Justen wrote:
> > On 2019-07-23 18:51:00, wrote:
> >> Specify the firmware to use via the newer '-drive if=pflash' syntax
> >> which allows specifying the raw format and readonly parameters. This
> >> avoids warnings with newer version of QEMU.
> >>
> >> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> >> ---
> >> OvmfPkg/build.sh | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> >> index a2c4eff2a5..e2890ff762 100755
> >> --- a/OvmfPkg/build.sh
> >> +++ b/OvmfPkg/build.sh
> >> @@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
> >> fi
> >> ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
> >> if [[ "$ENABLE_FLASH" == "yes" ]]; then
> >> - QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin"
> >> + QEMU_COMMAND="$QEMU_COMMAND -drive if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/bios.bin"
> >
> > It looks like we set ENABLE_FLASH for qemu 1.6 and newer. Does this
> > work on 1.6?
> >
> > Also, I don't think we want readonly. Read-write should allow
> > non-volatile variables to persist across multiple boot.
>
> This flash only contains the CODE, not the non-volatile VARS, using
> readonly makes sense to me.
That's not the case here. The build.sh support uses a combined
code/vars binary. Originally the qemu pflash support only supported a
single binary. At this point we can probably assume that a new enough
version of qemu is available that supports multiple pflash devices, so
build.sh could be upgraded to use the split binaries.
Hmm, it looks like qemu 2.0 is when the multiple flash device support
was added: https://wiki.qemu.org/ChangeLog/2.0
The build.sh script currently attempts to detect 1.6 and newer for
flash support. pflash first appeared in 1.1, but kvm support was added
in 1.6. I think it'd be reasonable to alter the script to not use
flash for qemu < 2.0, to enable using separate code and vars binaries.
-Jordan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 17:26 ` Jordan Justen
@ 2019-07-24 17:39 ` Philippe Mathieu-Daudé
2019-07-24 21:29 ` rebecca
2019-07-24 21:57 ` Jordan Justen
0 siblings, 2 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-24 17:39 UTC (permalink / raw)
To: devel, jordan.l.justen, Ard Biesheuvel, Laszlo Ersek, rebecca
On 7/24/19 7:26 PM, Jordan Justen wrote:
> On 2019-07-24 05:27:28, Philippe Mathieu-Daudé wrote:
>> On 7/24/19 4:54 AM, Jordan Justen wrote:
>>> On 2019-07-23 18:51:00, wrote:
>>>> Specify the firmware to use via the newer '-drive if=pflash' syntax
>>>> which allows specifying the raw format and readonly parameters. This
>>>> avoids warnings with newer version of QEMU.
>>>>
>>>> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
>>>> ---
>>>> OvmfPkg/build.sh | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
>>>> index a2c4eff2a5..e2890ff762 100755
>>>> --- a/OvmfPkg/build.sh
>>>> +++ b/OvmfPkg/build.sh
>>>> @@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
>>>> fi
>>>> ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
>>>> if [[ "$ENABLE_FLASH" == "yes" ]]; then
>>>> - QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin"
>>>> + QEMU_COMMAND="$QEMU_COMMAND -drive if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/bios.bin"
>>>
>>> It looks like we set ENABLE_FLASH for qemu 1.6 and newer. Does this
>>> work on 1.6?
>>>
>>> Also, I don't think we want readonly. Read-write should allow
>>> non-volatile variables to persist across multiple boot.
>>
>> This flash only contains the CODE, not the non-volatile VARS, using
>> readonly makes sense to me.
>
> That's not the case here. The build.sh support uses a combined
> code/vars binary. Originally the qemu pflash support only supported a
> single binary. At this point we can probably assume that a new enough
> version of qemu is available that supports multiple pflash devices, so
> build.sh could be upgraded to use the split binaries.
Oh I did not know, this show how young I'm ;)
> Hmm, it looks like qemu 2.0 is when the multiple flash device support
> was added: https://wiki.qemu.org/ChangeLog/2.0
>
> The build.sh script currently attempts to detect 1.6 and newer for
> flash support. pflash first appeared in 1.1, but kvm support was added
> in 1.6. I think it'd be reasonable to alter the script to not use
> flash for qemu < 2.0, to enable using separate code and vars binaries.
Where can I find the range of QEMU versions used by EDK2?
I'm trying to understand why it is important to still maintain scripts
for a such old version.
Thanks,
Phil.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 17:39 ` Philippe Mathieu-Daudé
@ 2019-07-24 21:29 ` rebecca
2019-07-24 21:57 ` Jordan Justen
1 sibling, 0 replies; 15+ messages in thread
From: rebecca @ 2019-07-24 21:29 UTC (permalink / raw)
To: devel, philmd, jordan.l.justen, Ard Biesheuvel, Laszlo Ersek
On 2019-07-24 11:39, Philippe Mathieu-Daudé wrote:
>
> Where can I find the range of QEMU versions used by EDK2?
> I'm trying to understand why it is important to still maintain scripts
> for a such old version.
I was going to suggest it was because some distros move pretty slowly -
for example RHEL and Debian. But even Debian Jessie has QEMU 2.1
(https://packages.debian.org/jessie/qemu-system).
--
Rebecca Cran
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/2] OvmfPkg/build.sh: use $QEMU_FIRMWARE_DIR as QEMU fat root
2019-07-24 3:09 ` Jordan Justen
@ 2019-07-24 21:31 ` rebecca
0 siblings, 0 replies; 15+ messages in thread
From: rebecca @ 2019-07-24 21:31 UTC (permalink / raw)
To: Jordan Justen, Ard Biesheuvel, Laszlo Ersek, devel
On 2019-07-23 21:09, Jordan Justen wrote:
> I'd kind of like to remove the ADD_QEMU_HDA support. I think, way, way
> back qemu would not boot if no drives were added, so this kind of
> helped. (OVMF can still load the shell with no drives.)
>
> If qemu will still run the firmware without a drive, then maybe maybe
> we can just dump ADD_QEMU_HDA.
That sounds good! I did wonder why we were adding it. I'll update the patch.
--
Rebecca Cran
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 17:39 ` Philippe Mathieu-Daudé
2019-07-24 21:29 ` rebecca
@ 2019-07-24 21:57 ` Jordan Justen
2019-07-25 2:10 ` rebecca
1 sibling, 1 reply; 15+ messages in thread
From: Jordan Justen @ 2019-07-24 21:57 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Ard Biesheuvel, Laszlo Ersek, devel,
rebecca
On 2019-07-24 10:39:20, Philippe Mathieu-Daudé wrote:
> On 7/24/19 7:26 PM, Jordan Justen wrote:
> > Hmm, it looks like qemu 2.0 is when the multiple flash device support
> > was added: https://wiki.qemu.org/ChangeLog/2.0
> >
> > The build.sh script currently attempts to detect 1.6 and newer for
> > flash support. pflash first appeared in 1.1, but kvm support was added
> > in 1.6. I think it'd be reasonable to alter the script to not use
> > flash for qemu < 2.0, to enable using separate code and vars binaries.
>
> Where can I find the range of QEMU versions used by EDK2?
> I'm trying to understand why it is important to still maintain scripts
> for a such old version.
OvmfPkg/README mentions as far back as qemu 0.10. It seems it was
update from 0.9.1 to 0.10 in 2012.
(Oh, cool! OVMF just passed 10 years of being released as open source.
Since May of 2009! :)
I think we've tried to keep the range of versions that it works with
as wide as possible, but I think we could (and perhaps should) discuss
raising the minimum supported version of qemu. qemu 2.0 is over 5
years old now. qemu 0.10.0 is over 10 years old.
One thing that was originally problematic (for raising the qemu
requirement) was finding windows builds of newer qemu releases. The
main website seems to link to windows builds of the latest releases
now: https://www.qemu.org/download/#windows
-Jordan
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 21:57 ` Jordan Justen
@ 2019-07-25 2:10 ` rebecca
0 siblings, 0 replies; 15+ messages in thread
From: rebecca @ 2019-07-25 2:10 UTC (permalink / raw)
To: Jordan Justen, Philippe Mathieu-Daudé, Ard Biesheuvel,
Laszlo Ersek, devel
On 2019-07-24 15:57, Jordan Justen wrote:
>
> I think we've tried to keep the range of versions that it works with
> as wide as possible, but I think we could (and perhaps should) discuss
> raising the minimum supported version of qemu. qemu 2.0 is over 5
> years old now. qemu 0.10.0 is over 10 years old.
>
> One thing that was originally problematic (for raising the qemu
> requirement) was finding windows builds of newer qemu releases. The
> main website seems to link to windows builds of the latest releases
> now: https://www.qemu.org/download/#windows
I just tried navigating the OVMF setup menu under QEMU 1.6.2 and when I
tried to enter the "IPv4 Network Configuration" settings I was sent back
the initial screen. So we might want to recommend against running older
versions just because they don't work as well.
--
Rebecca Cran
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 16:53 ` Michael D Kinney
@ 2019-07-25 15:46 ` rebecca
0 siblings, 0 replies; 15+ messages in thread
From: rebecca @ 2019-07-25 15:46 UTC (permalink / raw)
To: devel, michael.d.kinney, Justen, Jordan L, Laszlo Ersek,
Ard Biesheuvel
[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]
On 2019-07-24 10:53, Michael D Kinney wrote:
> Rebecca,
>
> If you are interested, I prototyped using a python
> script and POSTBUILD statement in the DSC file to
> support 'run' targets for OVMF in the following
> branch. This potentially allows the same code to
> be used for all host OS environments to launch QEMU.
>
> https://github.com/tianocore/edk2-staging/tree/Bug_1525_FmpDevicePkg_MultipleControllers_V2/OvmfPkg
>
> https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers_V2/OvmfPkg/PostBuild.py
>
> https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers_V2/OvmfPkg/Run.py
>
> Could also be extended to support doing either QEMU or
> KVM launch with a -D flag.
Thanks. One issue I noticed is that the POSTBUILD line runs "python".
Can we use $PYTHON_COMMAND there instead? macOS (and FreeBSD) doesn't
install a 'python' symlink, so for macOS you need to run python3 or
python3.7 etc., while on FreeBSD we don't have python3 either, so you
need to use python3.7. Apart from that, the changes seem to work nicely:
the capsules were generated, and when I added 'run' to the build command
line, PuTTY opened and QEMU ran.
On a related subject, I noticed last week that the build still exits
with a return code of 0 if the postbuild step fails: I created
https://bugzilla.tianocore.org/show_bug.cgi?id=1977 .
- Postbuild Start -
TARGET is RELEASE
...
Write binary output file /home/bcran/workspace/Build/Vlv2TbltDevicePkg/Capsules//TestCert/MinnowMaxRelease.cap
Success
cp: MinnowMaxRelease.cap: No such file or directory
build.py...
: error F008: Postbuild process is not success!
- Failed -
Build end time: 21:31:38, Jul.12 2019
Build total time: 00:00:02
build returned 0
--
Rebecca Cran
[-- Attachment #2: Type: text/html, Size: 2953 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu
2019-07-24 1:51 [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu rebecca
` (2 preceding siblings ...)
2019-07-24 16:53 ` Michael D Kinney
@ 2019-07-26 0:14 ` Laszlo Ersek
3 siblings, 0 replies; 15+ messages in thread
From: Laszlo Ersek @ 2019-07-26 0:14 UTC (permalink / raw)
To: devel, rebecca, Jordan Justen, Ard Biesheuvel
On 07/24/19 03:51, rebecca@bsdio.com wrote:
> Specify the firmware to use via the newer '-drive if=pflash' syntax
> which allows specifying the raw format and readonly parameters. This
> avoids warnings with newer version of QEMU.
>
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
> OvmfPkg/build.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index a2c4eff2a5..e2890ff762 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
> fi
> ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
> if [[ "$ENABLE_FLASH" == "yes" ]]; then
> - QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin"
> + QEMU_COMMAND="$QEMU_COMMAND -drive if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/bios.bin"
> else
> QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR"
> fi
>
I'm late to reviewing the "OvmfPkg/build.sh" patches, but then again,
I'm glad that both Jordan and Phil are scrutinizing them :)
So I guess, on "OvmfPkg/build.sh" patches, I'll just defer to Jordan and
Phil. I appreciate the relief! (ask me about my day... or rather don't...)
Laszlo
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2019-07-26 0:14 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-24 1:51 [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu rebecca
2019-07-24 1:51 ` [PATCH 2/2] OvmfPkg/build.sh: use $QEMU_FIRMWARE_DIR as QEMU fat root rebecca
2019-07-24 3:09 ` Jordan Justen
2019-07-24 21:31 ` rebecca
2019-07-24 2:54 ` [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu Jordan Justen
2019-07-24 3:08 ` rebecca
2019-07-24 12:27 ` Philippe Mathieu-Daudé
2019-07-24 17:26 ` Jordan Justen
2019-07-24 17:39 ` Philippe Mathieu-Daudé
2019-07-24 21:29 ` rebecca
2019-07-24 21:57 ` Jordan Justen
2019-07-25 2:10 ` rebecca
2019-07-24 16:53 ` Michael D Kinney
2019-07-25 15:46 ` rebecca
2019-07-26 0:14 ` Laszlo Ersek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox